-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Fix/history file permissions #10013
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
base: v2
Are you sure you want to change the base?
Fix/history file permissions #10013
Conversation
tests/functional/test_telemetry.py
Outdated
|
|
||
| def test_create_database_file_with_secure_permissions(self): | ||
| cache_dir = self.files.full_path('cache') | ||
| os.makedirs(cache_dir, mode=0o700) |
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.
Why are we making the directory in the test code? Isn't the code under test responsible for that?
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.
Updated to let the code create the directory in next revision
…, add cached credentials protection
Issue #, if available: N/A
Description of changes: Use specific permissions. Changes apply to: CLI history database, telemetry session database, Autoprompt history file.
Description of tests: Permission tests use the @skip_if_windows decorator since Unix permission bits don't apply to Windows. Windows relies on ACL inheritance from parent directories instead. The CI pipeline skips these tests on Windows builds as intended.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.