Skip to content

feat: add debug statement leakage detection pattern#22

Merged
aliksir merged 1 commit into
masterfrom
feat/debug-statement-leakage
Apr 7, 2026
Merged

feat: add debug statement leakage detection pattern#22
aliksir merged 1 commit into
masterfrom
feat/debug-statement-leakage

Conversation

@aliksir

@aliksir aliksir commented Apr 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add pattern 27 debug_statement_leakage to mcp-response-inspector.mjs
  • 7 language-specific regex patterns detecting print/console.log/echo statements that output credentials
  • Covers: Python, Node.js, Bash, PowerShell, and generic logger patterns
  • Severity: CRITICAL

Background

Research audit of 17,022 AI agent skills found 73.5% of credential leaks caused by residual debug output statements. This pattern detects the combination of output functions + sensitive environment variables/keywords.

Test plan

  • Pattern syntax validated (no regex errors)
  • Patterns target function+secret combos to minimize false positives
  • Integration test via /full-security-check on next run

🤖 Generated with Claude Code

intent(security): detect print/console.log statements that leak credentials in skill scripts
decision(pattern): 7 language-specific regexes (Python/Node/Bash/PowerShell/Logger) targeting env var + secret keyword combos
learned(research): 73.5% of AI skill credential leaks caused by residual debug output (17,022 skill audit)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@aliksir
aliksir merged commit a66a3b9 into master Apr 7, 2026
1 check passed
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