Security Scan
Pre-commit secret and credential scanner with remediation checklist — scans staged changes for API keys, tokens, private keys, hardcoded credentials, insecure defaults
Use the security-scan skill to [describe your task].Install: npx skills add Reactive-Skills/skills --skill security-scan
- States
- 12
- Hierarchical nodes
- Initial State
- COLLECT_STAGED
- Bootstrap entrypoint
- Allowed Tools
- 4
- Whitelisted for safety
- Deliverables
- 3
- Automated projections
Statechart (optional)
Visual state machine topology parsed directly from the official STATECHART.md in Reactive-Skills/skills:
States & Deterministic Guards
Each state is an isolated operational slice. Transitions occur only when typed signals satisfy programmatic guard conditions.
- COLLECT_STAGEDINITIALrun_commandview_filegrep_search
Collect git-staged files for scanning
Outgoing Transitions
- STAGED_FILESSCAN_PIPELINEguard:
Array.isArray(event.payload.staged_files) && event.payload.staged_files.length > 0
- STAGED_FILESSCAN_PIPELINEguard:
- SCAN_PIPELINE
Composite state: secrets scan, credentials scan, config scan
Outgoing Transitions
- CRITICAL_SECRET_FOUNDBLOCKEDguard:
event.payload.severity === 'critical'
- CRITICAL_SECRET_FOUNDBLOCKEDguard:
- SCAN_PIPELINE.SECRETS_SCANrun_commandgrep_searchview_file
Scan for API keys, tokens, private keys using regex + entropy heuristics
Outgoing Transitions
- SECRETS_SCANNEDSCAN_PIPELINE.CREDENTIALS_SCANguard:
event.payload.exit_code === 0
- SECRETS_SCANNEDSCAN_PIPELINE.CREDENTIALS_SCANguard:
- SCAN_PIPELINE.CREDENTIALS_SCANrun_commandgrep_searchview_file
Scan for hardcoded credentials (passwords, API keys in config)
Outgoing Transitions
- CREDENTIALS_SCANNEDSCAN_PIPELINE.CONFIG_SCANguard:
event.payload.exit_code === 0
- CREDENTIALS_SCANNEDSCAN_PIPELINE.CONFIG_SCANguard:
- SCAN_PIPELINE.CONFIG_SCANrun_commandgrep_searchview_file
Scan for insecure defaults, hardcoded IPs, debug mode in production
Outgoing Transitions
- CONFIG_SCANNEDREPORTguard:
event.payload.exit_code === 0
- CONFIG_SCANNEDREPORTguard:
- REPORT
Composite state: generate findings summary and remediation checklist
Outgoing Transitions
- REPORT_ERRORERROR
- REPORT.VIOLATION_SUMMARYview_filewrite_to_file
Summarize all findings by severity and category
Outgoing Transitions
- SUMMARY_GENERATEDREPORT.REMEDIATION
- REPORT.REMEDIATIONview_filewrite_to_file
Generate actionable remediation checklist for each finding
Outgoing Transitions
- REMEDIATION_GENERATEDGATE
- GATE
Human review gate: pass, request remediation, or block
Outgoing Transitions
- USER_APPROVEDCOMPLETEDguard:
event.payload.approved === true - REQUEST_REMEDIATIONSCAN_PIPELINEguard:
event.payload.remediation_requested === true - USER_REJECTEDBLOCKEDguard:
event.payload.rejected === true
- USER_APPROVEDCOMPLETEDguard:
- COMPLETEDTERMINAL
Terminal state: Scan complete, no critical issues
- BLOCKEDTERMINAL
Terminal state: Critical secrets or credentials found, commit blocked
- ERRORTERMINAL
Terminal state: Unrecoverable error occurred