Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a "Preview secrets" feature that allows users to preview secret values while ensuring these values are sanitized.
- Updated get_secret_version_value API to accept a secret identifier string.
- Added a new helper function, sanitize_secrets, to mask sensitive secret values.
- Refactored secret loading and preview actions in the main application UI.
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/test_utils/test_gcp.py | Updated test to pass a secret identifier string instead of an object. |
| secrets_manager/utils/helpers.py | Added the sanitize_secrets function for masking secret values. |
| secrets_manager/utils/gcp.py | Modified get_secret_version_value to accept a secret identifier. |
| app.py | Refactored secret loading, listing, and preview modal integration. |
Files not reviewed (1)
- secrets_manager.tcss: Language not supported
| return None | ||
| if isinstance(value, bool): | ||
| return value | ||
| if isinstance(value, int | float): |
There was a problem hiding this comment.
Using 'int | float' in isinstance() might cause unexpected behavior. Consider changing this to 'if isinstance(value, (int, float)):' to ensure proper type checking.
Suggested change
| if isinstance(value, int | float): | |
| if isinstance(value, (int, float)): |
Owner
Author
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
Add ability to preview secrets by pression
p. Secrets preview sanitizes all values.