Potential fix for code scanning alert no. 12: Clear-text storage of sensitive information#910
Closed
inimaz wants to merge 2 commits into
Closed
Potential fix for code scanning alert no. 12: Clear-text storage of sensitive information#910inimaz wants to merge 2 commits into
inimaz wants to merge 2 commits into
Conversation
…ensitive information Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Contributor
|
Not sure that's the way to go. Seems like a way to complicate the setup without adding real security. |
Collaborator
Author
|
I agree, I think it gets flagged as vulnerability just because later in the code one can print it for instance. But closing this as not needed for now, thanks! |
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.
Potential fix for https://github.com/mlco2/codecarbon/security/code-scanning/12
To address the issue, sensitive data such as
settings.fief_admin_passwordshould be encrypted before being written to files. Thecryptographylibrary can be used to encrypt the sensitive data. A symmetric encryption key can be generated and stored securely, and the sensitive data can be encrypted using this key before being written to the.envfiles. The decryption process should only occur when the data is needed.Steps to fix:
cryptographylibrary and set up a symmetric encryption mechanism.settings.fief_admin_password) before writing it to the.envfiles.replacefunction to handle encrypted values appropriately.Suggested fixes powered by Copilot Autofix. Review carefully before merging.