Potential fix for code scanning alert no. 14: Clear-text logging of sensitive information - #3
Merged
Merged
Conversation
…ensitive information Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Pattern Validation Summary6 / 6 patterns valid
|
add a test for the new handler
…C_kwDO...), not the numeric REST database ID.
atyronesmith
marked this pull request as ready for review
August 21, 2026 18:56
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/atyronesmith/quickpat/security/code-scanning/14
General fix: avoid printing raw warning strings that may carry sensitive content. Instead, sanitize or redact warning messages at the display boundary so behavior is preserved (warnings still shown) while sensitive content is not exposed.
Best minimal fix here: in
quickpat/cli.py, add a small helper that masks secret-bearing warning text, then use it in_print_transform_resultfor both warning-printing loops (success and failure branches). This preserves control flow and user feedback while preventing clear-text leakage.Changes needed:
quickpat/cli.py_print_transform_resultand nearby helper definitions._sanitize_warning_for_display) that redacts content for secret-related warnings.print(f" {w}")withprint(f" {_sanitize_warning_for_display(w)}")in both warning loops.No functional pipeline changes are required; this is a safe output-layer mitigation.
Suggested fixes powered by Copilot Autofix. Review carefully before merging.