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

Log warning if secrets file is readable by other users #342

Conversation

johannaengland
Copy link
Contributor

Scope and purpose

Fixes #280.
I did not add an test that it actually logs the warning, but I manually tested it and added tests for the utils function.

Contributor Checklist

Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to Zino can be found in the
README.

  • Added a changelog fragment for towncrier
  • Added/amended tests for new/changed code
  • Added/changed documentation
  • Linted/formatted the code with black, ruff and isort, easiest by using pre-commit
  • The first line of the commit message continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See https://cbea.ms/git-commit/
  • If applicable: Created new issues if this PR does not fix the issue completely/there is further work to be done

@johannaengland johannaengland self-assigned this Aug 2, 2024
Copy link

codecov bot commented Aug 2, 2024

Codecov Report

Attention: Patch coverage is 76.92308% with 3 lines in your changes missing coverage. Please review.

Project coverage is 98.57%. Comparing base (168286a) to head (1ba3a5b).
Report is 1 commits behind head on master.

Files Patch % Lines
src/zino/zino.py 62.50% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #342      +/-   ##
==========================================
- Coverage   98.60%   98.57%   -0.03%     
==========================================
  Files          77       77              
  Lines        9688     9701      +13     
==========================================
+ Hits         9552     9562      +10     
- Misses        136      139       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/zino/utils.py Outdated Show resolved Hide resolved
changelog.d/280.added.md Outdated Show resolved Hide resolved
Copy link
Member

@lunkwill42 lunkwill42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me now, but you have merge conflict with master...

@johannaengland johannaengland force-pushed the feature/log-if-secrets-readable-by-others branch from a60788d to 1ba3a5b Compare August 21, 2024 10:45
Copy link

sonarcloud bot commented Aug 21, 2024

@johannaengland johannaengland merged commit 419305a into Uninett:master Aug 21, 2024
8 checks passed
@johannaengland johannaengland deleted the feature/log-if-secrets-readable-by-others branch August 21, 2024 11:12
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.

Log warning if secrets file is world-readable
2 participants