Fix/warn credential permission failures#124
Merged
jpoehnelt merged 1 commit intogoogleworkspace:mainfrom Mar 5, 2026
Merged
Conversation
🦋 Changeset detectedLatest commit: ad69e9c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Member
|
Please fix the conflicts. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #124 +/- ##
==========================================
- Coverage 56.19% 56.18% -0.01%
==========================================
Files 38 38
Lines 13860 13862 +2
==========================================
Hits 7788 7788
- Misses 6072 6074 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Replaced silent `let _ =` on set_permissions calls in save_encrypted with eprintln! warnings so users are aware if their credential files end up with insecure permissions. Also log keyring access failures instead of silently falling through to file storage.
aa7f28b to
ad69e9c
Compare
jeftekhari
commented
Mar 5, 2026
jpoehnelt
approved these changes
Mar 5, 2026
Member
|
tested locally |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Replaced silent
let _ =onset_permissionscalls insave_encrypted()witheprintln!warnings so users are aware if their credential files end up with insecure permissions. Also log keyring access failures instead of silently falling through to file storage.This follows the existing pattern already used in
get_or_create_key()(lines 92-98) where permission failures are properly warned about.Changes:
save_encrypted: Warn if directory permissions (0o700) fail to setsave_encrypted: Warn if credentials file permissions (0o600) fail to setget_or_create_key: Log keyring errors instead of silently ignoring themChecklist:
AGENTS.mdguidelines (no generatedgoogle-*crates).cargo fmt --allto format the code perfectly.cargo clippy -- -D warningsand resolved all warnings.pnpx changeset) to document my changes.