Skip to content

Report credentials in test code and template files at low confidence - #82

Merged
SizzleUnrlsd merged 2 commits into
mainfrom
fix/test-credentials
Sep 5, 2026
Merged

SizzleUnrlsd merged 2 commits into
mainfrom
fix/test-credentials

Conversation

@SizzleUnrlsd

Copy link
Copy Markdown
Contributor

Summary

Third item of #71: credentials in test code and template files are reported at low confidence.

  • Acceptance tests first (test: define the confidence of credentials in tests and examples), implementation follows.
  • plugins/secrets.py: credential_context classifies a path as test (a tests, test, testing, fixtures or __tests__ directory, a test_*.py, *_test.py or conftest.py file), example (.example, .sample, .dist, .tpl suffixes) or neither. A hardcoded-credential there is reported at low confidence with the context in its metadata; elsewhere it stays medium. Provider-format hardcoded-secret findings keep their confidence everywhere, since a real key in a test is still a key.
  • On healthchecks, 37 of the 40 credential findings sit in tests and one in .env.example; a consumer sorting or filtering on confidence now sees the three that matter first. Snapshots record rule and location only, so they are unchanged.
  • The usage guide documents the rule.

Part of #71.

@SizzleUnrlsd SizzleUnrlsd self-assigned this Sep 5, 2026
@SizzleUnrlsd
SizzleUnrlsd merged commit a7ac030 into main Sep 5, 2026
10 checks passed
@SizzleUnrlsd
SizzleUnrlsd deleted the fix/test-credentials branch September 5, 2026 12:04
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