fix: use secure file permissions for config files#3726
Conversation
Change config file permissions from 0777 to 0600 and directory permissions from 0777 to 0755 to follow security best practices. Changes: - Config files now use 0600 (owner read/write only) - Config directories use 0755 (owner rwx, group/others rx) - Added tests to verify correct permissions are applied Security impact: - Prevents unauthorized users from reading sensitive config data - Prevents unauthorized modification of configuration - Follows industry standard (kubectl, docker, git use 0600) Fixes: Config files were world-readable and world-writable
|
Hi @Itx-Psycho0. Thanks for your PR. I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
PTAL @lkingland |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3726 +/- ##
==========================================
+ Coverage 56.90% 56.96% +0.06%
==========================================
Files 181 181
Lines 20933 21116 +183
==========================================
+ Hits 11912 12029 +117
- Misses 7811 7863 +52
- Partials 1210 1224 +14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
FYI I found https://specifications.freedesktop.org/basedir/latest/ which states
so maybe we could go even more strict 😄 |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Itx-Psycho0, matejvasek The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Summary
Fixes config file permissions from 0777 to 0600 for security.
Changes
Security Impact
Testing
TestWrite_FilePermissionsandTestCreatePaths_DirectoryPermissionsmake checkpassesFixes #3725