Giter Club home page Giter Club logo

Comments (8)

dkess avatar dkess commented on June 9, 2024 1

I don't see it as a change in security model at all. There are two cases:

  • The site is a regular WordPress site, in which case it works properly
  • The site is compromised, in which case it can run whatever code it wants, so interaction with this script doesn't matter

from utils.

kpengboy avatar kpengboy commented on June 9, 2024

One must take into account security considerations too. Specifically, last time I checked, wp-cli operates by evaluating the Wordpress PHP code, which is dangerous if the Wordpress files have been compromised. We do not want makemysql to accidentally run malicious code.

from utils.

dkess avatar dkess commented on June 9, 2024

Good point. If the site is compromised, it is already able to run malicious code, so we just have to make sure that wpcli is run with the same permissions as the user.

from utils.

kpengboy avatar kpengboy commented on June 9, 2024

Still, though, I think people expect makemysql to be a "safe" command. Allowing it to execute arbitrary code, even as the same user, would still be a major change in the security model of this script.

from utils.

kpengboy avatar kpengboy commented on June 9, 2024

Still, I suppose there could, at least in principle, be an issue with makemysql triggering the execution of malicious code that could, for instance, detect when the database password is being changed through wp-cli and email the new password off to the attacker. Or something.

I would suggest putting the wp-cli stuff behind a command line option, or at least having an option to skip it.

from utils.

gundralaa avatar gundralaa commented on June 9, 2024

Hi! Me and snarain worked on a small commit to the initial makemysql script that creates a db pass and assigns it to a temp file that the makemysql-real python script reads. We cant run the modified python script due to privileges but can someone could look at our commit on?
https://github.com/ocf/utils/tree/wp-automatic-db-pass

from utils.

dkess avatar dkess commented on June 9, 2024

Thanks for working on this! You should still be able to test the script locally by installing Wordpress on your personal OCF account and running the script from your home directory.

nvmd, I'm wrong about this, can a root staffer please test this? I'll be out of town for the next week and don't expect to have the time to test this.

from utils.

cg505 avatar cg505 commented on June 9, 2024

Done in #129, although we may want to polish some ends (like not failing when there's no wp installation)

from utils.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.