-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SEC-6587] Databricks CLI Tool Config File inherits default system umask #522
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code change looks good but please also add a unit test to tests/configure/test_provider.py
to verify that the file permissions are indeed 600.
648cfc6
to
eb7ae72
Compare
eb7ae72
to
087dae9
Compare
@shreyas-goenka Did you test or hypothesize how this works on Windows? It looks risky / like it might break on Windows. |
@pietern I did not think about this testing on windows. A quick look at the docs leads me to believe the happy path mostly should be fine i.e. when no I believe this because
In any case the python os docs don't make it clear what the behavior would be here. Do we have a windows VM to do a quick test? |
Yes, I'll be in touch with details. |
Why not just add |
@fjakobs We should, once 1) existing failing tests on Windows are fixed, and 2) we trim the # of builds (no need to test all Python versions on Windows, just 1 of them would be sufficient). Thinking about 2), it's probably easier to define a dedicated Windows test job... |
This PR makes changes so that .databrickscfg file has user only read write permissions at create time rather than the original workflow which is
create file -> write token to file -> change permission to user only read write (0o600)
which can be used by an adversary to read the tokenTested manually by looking that the permissions on the file after its creation