Secret Detector
Nothing sensitive exits the local machine without explicit human awareness.
When This Skill Activates
- Any content is about to be written outside
~/.starlight/to an external destination - Any vault export is generated for a platform adapter
- Any content is passed to an external MCP server
- Keywords: "export", "publish", "send", "upload", "share", "transmit"
- Default for: Starlight Sentinel
What This Skill Does
Scans content for credential patterns, personal identifiers, and sensitive data before it leaves the local machine. Blocks export if secrets are found. Never auto-redacts — always surfaces findings to the user for an explicit decision.
Procedures
Procedure 1: Pre-Export Scan
Receive content blob pending export
Run pattern detection against the full content:
Pattern Example Action on match API keys sk-...,pk_...,ghp_...,xoxb-...BLOCK + report Private keys -----BEGIN PRIVATE KEY-----BLOCK + report Passwords in config password=,passwd=,secret=BLOCK + report Email addresses user@domain.comin unexpected contextWARN + report Phone numbers +1-555-..., formatted phone patternsWARN + report Credit card patterns 16-digit sequences with separators BLOCK + report Government IDs SSN patterns, national ID formats BLOCK + report If BLOCK patterns found: halt export, generate SECRET_SCAN_REPORT.md, present to user
If WARN patterns found: present to user with option to proceed or redact
If clean: return APPROVED for export
Procedure 2: Scan Report Generation
- Create
/security/SECRET_SCAN_REPORT.md - Include: content source, patterns detected, line references (not the secrets themselves)
- Present options: [redact and retry] / [cancel export] / [I confirm this is safe, proceed]
- Log the decision with user action
Procedure 3: False Positive Handling
- User declares a detected pattern is not sensitive
- Record the declaration with timestamp + user confirmation
- Add to local allowlist for this session (not persisted globally)
- Proceed with export
Integration Points
- Vaults: No vault access needed — operates purely on content in transit
- Agents: Starlight Sentinel
- Skills: Composes with
private-public-splitfor structural classification;permission-gatefor the approval flow - Claws: Called by every Claw that generates exports (Memory, Creator, Attestation, Reclamation)
Quality Criteria
- Zero false negatives on common credential patterns
- False positives surface clearly as warnings, not blocks (where safe)
- User is always in control — no silent redaction or silent pass
- Scan report is human-readable, not a raw regex dump