Skip to content

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

Draft
H-Sihan wants to merge 1 commit into
devfrom
alert-autofix-31
Draft

Potential fix for code scanning alert no. 31: Clear-text logging of sensitive information#220
H-Sihan wants to merge 1 commit into
devfrom
alert-autofix-31

Conversation

@H-Sihan

@H-Sihan H-Sihan commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Potential fix for https://github.com/openshield-org/openshield/security/code-scanning/31

To fix this safely without changing functionality, keep the error handling behavior but stop logging raw end_dt_str. Replace the current debug statement so it logs only non-sensitive context (for example app_id) and a generic message indicating invalid endDateTime format. This preserves observability (you still know which app had bad data) while eliminating clear-text output of tainted credential-derived content.

In scanner/rules/az_idn_006.py, edit the except ValueError: block around lines 73–77:

  • remove %r placeholder and end_dt_str argument
  • keep app_id in the log for correlation
  • no new imports or dependencies are needed

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

…ensitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

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.

1 participant