Skip to content

Conversation

dragomirp
Copy link
Contributor

@dragomirp dragomirp commented Nov 3, 2023

if scope not in [APP_SCOPE, UNIT_SCOPE]:
raise RuntimeError("Unknown secret scope.")
if not content.get(secret_key) or content[secret_key] == SECRET_DELETED_LABEL:
logger.error(f"Non-existing secret {scope}:{key} was attempted to be removed.")

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information

This expression logs [sensitive data (password)](1) as clear text. This expression logs [sensitive data (password)](2) as clear text. This expression logs [sensitive data (password)](3) as clear text. This expression logs [sensitive data (password)](4) as clear text. This expression logs [sensitive data (password)](5) as clear text. This expression logs [sensitive data (password)](6) as clear text. This expression logs [sensitive data (password)](7) as clear text. This expression logs [sensitive data (password)](8) as clear text.
try:
self._peer_data(scope).pop(key)
except KeyError:
logger.error(f"Non-existing secret {scope}:{key} was attempted to be removed.")

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information

This expression logs [sensitive data (password)](1) as clear text. This expression logs [sensitive data (password)](2) as clear text. This expression logs [sensitive data (password)](3) as clear text. This expression logs [sensitive data (password)](4) as clear text. This expression logs [sensitive data (password)](5) as clear text. This expression logs [sensitive data (password)](6) as clear text. This expression logs [sensitive data (password)](7) as clear text. This expression logs [sensitive data (password)](8) as clear text.
@dragomirp dragomirp force-pushed the dpe-2838-secret-labels branch from 3cf8a80 to d33402f Compare November 3, 2023 16:11
Copy link
Contributor

@juditnovak juditnovak left a comment

Choose a reason for hiding this comment

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

❤️ ❤️ ❤️

Thank U so much @dragomirp 4 this one!!!!!!!!!!!!!!!
(And all your help provided on mine :-) )

@dragomirp dragomirp merged commit 943e4bf into main Nov 24, 2023
@dragomirp dragomirp deleted the dpe-2838-secret-labels branch November 24, 2023 17:31
BON4 pushed a commit to BON4/postgresql-operator that referenced this pull request Apr 23, 2024
* Secret labels

* Missing arg

* Pop the right databag

* Copy over safe secret get
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants