Skip to content

feat: add PII detection patterns to secret scanner (issue #82)#147

Merged
Agentscreator merged 2 commits intoAgentscreator:mainfrom
ismaeldouglasdev:feat/pii-detection
Apr 9, 2026
Merged

feat: add PII detection patterns to secret scanner (issue #82)#147
Agentscreator merged 2 commits intoAgentscreator:mainfrom
ismaeldouglasdev:feat/pii-detection

Conversation

@ismaeldouglasdev
Copy link
Copy Markdown

Summary

Extends the existing secret scanner to catch accidental PII commits, following the same enforcement model as secrets (hard reject, not advisory).

What changed

Added PII detection patterns to src/engram/secrets.py:

  • Email addresses
  • US phone numbers (E.164 and US format)
  • SSN (US format)
  • Credit card numbers with Luhn validation

Added 6 new tests in tests/test_secrets.py covering:

  • Email detection
  • US phone detection
  • SSN detection
  • Credit card detection (valid Luhn)
  • Invalid credit card rejection (invalid Luhn)

Validation

  • All 67 tests pass
  • New PII tests: 6 passing
  • Manual testing confirms detection works for all PII types

…or#82)

Add detection for:
- Email addresses
- US phone numbers
- SSN (US format)
- Credit card numbers with Luhn validation

This extends the existing secret scanner to catch accidental PII commits,
following the same enforcement model as secrets (hard reject, not advisory).

Added 6 new tests for PII patterns.
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 9, 2026

Someone is attempting to deploy a commit to the agentscreator's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Agentscreator Agentscreator merged commit 9051376 into Agentscreator:main Apr 9, 2026
4 of 5 checks 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.

2 participants