ln-761-secret-scanner
Scans codebase for hardcoded secrets with severity classification and remediation guidance. Use when auditing a project for leaked credentials.
What this skill does
> **Paths:** File paths (`references/`, `../ln-*`) are relative to this skill directory. # Secret Scanner **Type:** L3 Worker **Category:** 7XX Bootstrap Scans codebase for hardcoded secrets and credentials, returning structured findings for remediation. ## Purpose & Scope - Detect hardcoded secrets using available tools (gitleaks, trufflehog) or manual patterns - Classify findings by severity (Critical/High/Medium/Low) - Filter false positives via baseline and allowlists - Provide remediation guidance per finding type - Return normalized report to parent orchestrator (ln-760) ## When to Use - During project bootstrap (via ln-760-security-setup) - Pre-commit hook validation - CI/CD security pipeline - Manual security audit --- ## Workflow ### Phase 1: Tool Detection **Step 1: Check Available Scanners** - Check if gitleaks is installed (preferred) - Check if trufflehog is installed (alternative) - If neither available: use manual pattern matching as fallback **Step 2: Load Configuration** - Load project `.gitleaks.toml` if exists (custom rules) - Load `.gitleaksbaseline` if exists (known false positives) - If no config: use default patterns from `references/detection_patterns.md` ### Phase 2: Scan Execution **Step 1: Run Available Scanner** - Execute scanner against project root - Capture output in structured format (JSON/SARIF preferred) - If tool unavailable: run manual grep patterns for high-confidence secrets **Step 2: Parse Results** - Normalize output to common format: file, line, pattern, raw_match - Preserve original severity if provided by tool ### Phase 3: Report Generation **Step 1: Severity Classification** - Map findings to severity levels per `references/detection_patterns.md` - Critical: AWS keys, private keys, JWT secrets - High: Generic passwords, connection strings - Medium: API keys (may be test data) - Low: Potential secrets requiring manual review **Step 2: False Positive Filtering** - Apply baseline exclusions - Apply allowlist patterns (placeholders, test data, docs) - Mark filtered items as "excluded" with reason **Step 3: Build Report** - Group findings by severity - Include file path, line number, pattern matched - Do NOT include actual secret values in report ### Phase 4: Remediation Guidance **Step 1: Attach Remediation Actions** - For each finding, attach remediation steps from `references/remediation_guide.md` - For Critical findings: emphasize immediate rotation requirement **Step 2: Return Results** - Return structured findings list to orchestrator - Include summary: total scanned, total found, by severity --- ## Critical Rules 1. **Never log actual secret values** - redact in all outputs 2. **Treat any found secret as compromised** - rotation required for Critical 3. **Preserve baseline** - do not remove existing baseline entries 4. **Pre-commit priority** - recommend pre-commit hook if not configured 5. **Git history awareness** - warn if secret may exist in history (requires git-filter-repo) --- ## Definition of Done - [ ] Scan completed using available tool or manual patterns - [ ] Findings classified by severity - [ ] False positives filtered via baseline/allowlist - [ ] Remediation guidance attached to each finding - [ ] Report returned in normalized format (no raw secret values) - [ ] Critical findings flagged with rotation requirement --- ## Reference Files | File | Purpose | |------|---------| | `references/detection_patterns.md` | Secret patterns by confidence level | | `references/templates/gitleaks_config_template.toml` | Template for project gitleaks config | | `references/remediation_guide.md` | Rotation procedures by secret type | --- **Version:** 2.0.0 **Last Updated:** 2026-01-10
Related in Security
mac-ops
IncludedComprehensive macOS workstation operations — diagnose kernel panics, identify failing drives, audit launchd startup items, decode wake reasons, triage TCC permission denials, manage APFS snapshots, recover from no-boot. Use for: Mac is slow, slow bootup, won't boot, kernel panic, kernel_task hot, mds_stores CPU, photoanalysisd, cloudd, login loop, gray screen, sleep wake failure, drive failing, IO errors, APFS snapshots eating space, Time Machine local snapshots, Spotlight indexing, launchd, LaunchAgent, LaunchDaemon, login items, TCC permissions, Full Disk Access, Screen Recording denied, Gatekeeper, quarantine, com.apple.quarantine, app is damaged, helper tool, /Library/PrivilegedHelperTools, pmset, wake reasons, dark wake, sysdiagnose, panic.ips, DiagnosticReports, configuration profile, MDM profile, remote diagnostics over SSH.
a11y-audit
IncludedRun accessibility audits on web projects combining automated scanning (axe-core, Lighthouse) with WCAG 2.1 AA compliance mapping, manual check guidance, and structured reporting. Output is configurable: markdown report only, markdown plus machine-readable JSON, or markdown plus issue tracker integration. Use this skill whenever the user mentions "accessibility audit", "a11y audit", "WCAG audit", "accessibility check", "compliance scan", or asks to check a web project for accessibility issues. Also trigger when the user wants to verify WCAG conformance or map findings to a specific standard (CAN-ASC-6.2, EN 301 549, ADA/AODA).
erpclaw
IncludedAI-native ERP system with self-extending OS. Full accounting, invoicing, inventory, purchasing, tax, billing, HR, payroll, advanced accounting (ASC 606/842, intercompany, consolidation), and financial reporting. 413 actions across 14 domains, 43 expansion modules. Constitutional guardrails, adversarial audit, schema migration. Double-entry GL, immutable audit trail, US GAAP.
assess
IncludedAssesses and rates quality 0-10 across multiple dimensions (correctness, maintainability, security, performance, testability, simplicity) with pros/cons analysis. Compares against project conventions and prior decisions from memory. Produces structured evaluation reports with actionable improvement suggestions. Use when evaluating code, designs, architectures, or comparing alternative approaches.
spring-boot-security-jwt
IncludedProvides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based access control using Spring Security 6.x. Use when implementing authentication or authorization in Spring Boot applications.
code-hardcode-audit
IncludedDetect hardcoded values, magic numbers, and leaked secrets. TRIGGERS - hardcode audit, magic numbers, PLR2004, secret scanning.