Skip to content

Potential fix for code scanning alert no. 5: Clear-text logging of sensitive information#38

Open
rajivmucheli wants to merge 1 commit into
masterfrom
alert-autofix-5
Open

Potential fix for code scanning alert no. 5: Clear-text logging of sensitive information#38
rajivmucheli wants to merge 1 commit into
masterfrom
alert-autofix-5

Conversation

@rajivmucheli
Copy link
Copy Markdown
Collaborator

Potential fix for https://github.com/sapcc/PyKMIP/security/code-scanning/5

To fix the problem, we should avoid logging the secret ID in clear text. Instead, we can log a generic success message, similar to how other secret derivation operations are handled in this file (see lines 126 and 175). Specifically, in kmip/demos/pie/derive_key.py, replace the line that logs "Secret ID: {0}".format(secret_id) with a message indicating that a new secret has been derived, but its ID will not be logged for security reasons. No new imports or methods are required; just update the log statement.


Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…nsitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@rajivmucheli rajivmucheli marked this pull request as ready for review August 13, 2025 08:30
@rajivmucheli rajivmucheli requested a review from Scsabiii August 19, 2025 06:08
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.

2 participants