Skip to content
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

secure jsondb user perms #404

Merged
merged 1 commit into from
Aug 11, 2023
Merged

Conversation

cameronaw13
Copy link
Contributor

@cameronaw13 cameronaw13 commented Jul 10, 2023

Fixes #143

Allows only user access to all jsondb files preventing the exposure of private keys and other sensitive information in the database

@cameronaw13
Copy link
Contributor Author

In regards to Zerogiven's note about rootless docker compatiblity in issue #143, I've tested this pr in a rootless docker instance and everything works as it should.

@ngoduykhanh ngoduykhanh merged commit 7488f28 into ngoduykhanh:master Aug 11, 2023
@cameronaw13 cameronaw13 deleted the perms-fix branch August 13, 2023 23:34
@systemcrash
Copy link
Contributor

systemcrash commented Sep 22, 2023

one potential problem I see with this addition is that the errors returned and checked are only for writing the file: nothing is ever checked for the permissions being set - or whether that fails/succeeds.

I recommend a follow-up commit that encapsulates os.Chmod(....) in a helper function which actually checks the return values (for errors) and handles them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible Security Issue
3 participants