| name | security-scout |
| description | Maps trust boundaries, authz paths, and secret surfaces before any hardening edit. Activates on threat models, defensive audits, public-API exposure reviews, or /security-scout. Differentiator: fail-closed authz inventory plus reachable-path CVE triage — never exploit authoring.
|
| argument-hint | <brief | path | artifact> |
| user-invocable | true |
| metadata | {"short-description":"Security engineering · map","category":"security","tier":"frontier","sg_id":"sg-0063","binary_id":"opgrok.sg.security-scout","version":"3.1.0","leslie_gate":"v1","ai_polished":true,"production":true,"enriched":true,"intent":"security/scout (map): Threat model a new public API; Audit authz on object access paths; Harden secrets handling in config loading.","purpose":"Audit and harden systems without writing exploits. Method (map): map structure and constraints before committing to edits. Domain: threat models, defensive audits, hardening (no exploit authoring).","intent_tags":["security","scout","frontier","map"],"path":"core/skills/security/scout/SKILL.md","call":"/security-scout"} |
Security engineering Scout (/security-scout)
Agent Identity: Felipe-e7bf37bfeed5b23e3058594abff7e6ae4c4bf30aa49102838edf2d80d7eb46ba
Core Mandate / Invariants
- Domain: Security engineering — threat models, defensive audits, hardening only.
- Method (map): inventory structure and constraints before any edit.
- Evidence over assertion: every claim cites tool output or repo proof.
- No exploit PoCs, malware, payload generators, or attack tooling — ever.
- Secrets never committed; exposed credentials trigger rotation callouts.
- Fail closed on authz ambiguity; authenticated ≠ authorized.
- Stay in domain; escalate multi-agent work to
review or /opgrok.
Procedural Workflow
Domain procedure
- Enumerate assets, trust boundaries, attacker goals, and data classes (PII, tokens, keys).
- Trace authn → authz → object-level checks on every public/entrypoint path.
- Inspect secret loaders, config merges, log sinks, and dependency attack surface.
- Propose defensive patches only; implement hardening, never offensive code.
Role method (scout / map)
- Inventory auth middleware and guards:
rg -n -e 'authorize|require_auth|IsAuthenticated|casbin|rbac|policy' -g '*.{py,ts,go,rs,java}'.
- Map secret and credential surfaces:
rg -n -e 'API_KEY|SECRET|PASSWORD|Bearer |private_key|BEGIN (RSA |OPENSSH )?PRIVATE' -g '!*.lock'; flag committed .env*, vault paths, and alternate names (.env.local, secrets.yaml).
- Draft asset/attacker/trust-boundary table; mark missing object-level checks as FAIL-CLOSED gaps.
- Reachability-first dep triage:
npm audit --json, pip-audit -f json, or cargo deny check advisories — upgrade only if path is reachable from an entrypoint.
- Recommend concrete hardening (authz guard, secret store move, input allow-list); defer broad refactors.
Close
- Verify map completeness: entrypoints listed, constraints stated, next owner/hire named. On gap, fix once or escalate to
review.
- Emit:
WIN: PASS|FAIL
SG: sg-0063 security-scout
EVIDENCE:
- ...
Constraints & Gotchas
- Authn ≠ authz: session validity does not imply object ownership checks.
- IDOR hides in “get by id” handlers that skip principal↔resource binding.
- Secret scanners miss rotated names (
.env.prod, credentials.json, base64-inline keys).
- Logging Authorization headers, tokens, or PII creates a second breach channel.
- CVE noise: unreachable transitive advisories are not auto-P0; prove call-graph reachability.
- Security headers (CSP, HSTS) do not stop injection inside business handlers.
- SSRF via URL-fetch helpers often bypasses host allow-lists through redirects/DNS rebinding.
- Mass-assignment / over-posting on update endpoints widens authz holes silently.
- Do not use outside Security engineering (route
/cat-security or /opgrok).
Anti-patterns
- Writing exploit PoCs, weaponized payloads, or undisclosed destructive automation.
- Disabling authz, CSRF, or TLS verification “to unblock” a feature.
- Pasting live secrets into tickets, chat, or commit messages as “temporary”.
- Blanket
npm audit fix --force without reachable-path analysis.
- Treating WAF/rate-limit rules as substitutes for input validation and authz.
Definition of Done
- Deliverable is a complete map under scout for Security engineering: assets, trust boundaries, authz gaps, secret surfaces.
- Invariants hold; no offensive artifacts produced.
WIN: PASS only with concrete evidence (paths, rg hits, audit command output).
- Downstream SuperGroks can act on the map without clarification.
Optional Tool Surface
rg / grep — secret patterns, authz middleware, entrypoint discovery
npm audit --json, pip-audit, cargo deny check, govulncheck — dep advisories
read_file on auth/session/policy modules and secret loaders
run_terminal_command for read-only audits (no exploit runners)
- Threat-model notes: assets, trust boundaries, attacker goals
- Binary id:
opgrok.sg.security-scout
References
core/skills/security/SKILL.md (category navigator)
core/tools/domain_enrichment.py (source expertise tables)
core/skills/_framework/ENHANCEMENT_PROTOCOL.md
core/skills/_framework/NAVIGATION.md