Skip to content

Fix security gate tripping on unit test file containing fake secrets#47

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-security-gate-issue
Draft

Fix security gate tripping on unit test file containing fake secrets#47
Copilot wants to merge 2 commits intomainfrom
copilot/fix-security-gate-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 5, 2026

The CI security gate was failing because tests/test_unit_security_gate.py contains intentional fake API keys to verify pattern detection — and those keys matched the scanner's own regexes.

Changes

  • SCAN_EXCLUSIONS was never applied — the set was defined but the scan loop in main() never checked it; added the skip guard:
    for filepath_str in tracked:
        if filepath_str in SCAN_EXCLUSIONS:
            continue
  • Added the test file to SCAN_EXCLUSIONS alongside the existing entries (bin/security_gate.py, SECURITY.md) — these files contain patterns/examples, not real secrets.

Copilot AI changed the title [WIP] Fix security gate trips on test_unit_security_gate.py Fix security gate tripping on unit test file containing fake secrets Apr 5, 2026
Copilot AI requested a review from techwavedev April 5, 2026 03:01
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.

Security Gate trips on test_unit_security_gate.py

2 participants