Skip to content

/etc/matrixcli/config.py shouldn't be world-readable #9

Description

@martinvonwittich
host ~ # find /etc/matrixcli -ls
 49284276      4 drwxr-xr-x   2 root     root         4096 Sep 30 15:20 /etc/matrixcli
 49284482      4 -rw-r--r--   1 root     root          927 Sep 30 15:20 /etc/matrixcli/config.py

Either /etc/matrixcli/config.py should default to 600, or /etc/matrixcli should default to 700. Currently, it's very likely that a user might put a password into config.py, which is then world-readable for all users on the system.

Note that Python will create a subfolder __pycache__ with a cached version of config.py in it; the cached version will copy the permissions of config.py. So if you want to secure your installation, you need to change the permissions on both:

chmod 600 /etc/matrixcli/config.py
chmod 600 /etc/matrixcli/__pycache__/config.*.pyc

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions