agentleFS
vnykmshrvnykmshr/playbook/skills/pb-threat-hunt/SKILL.md

pb-threat-hunt

Skill4 starsChanged 4 months agoMITView on GitHub

12-step executable security threat hunt with automated sweep→grep→audit→verify pipeline. Uses workflow automation for mechanical steps (Pre-Hunt Sweeps, search passes, 3-vote adversarial verify) and stops for manual judgment (scoping, provider boundaries, fix application). Go default + Python/Node appendices.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Dependency boundary audit: - when integrating a new auth provider, payment processor, or identity system

    line 23
  2. Very specific:

    Run ./scripts/install.sh to install to ~/.claude/skills/pb-threat-hunt/.

    line 107

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Security Threat Hunt: Deep Audit Methodology

A 12-step executable security audit that treats every auth shortcut, redirect, token source, cookie, forwarded header, parser, cache, and cryptographic decision as a security boundary until proven otherwise. The default answer to "is this safe?" is "prove it."

Mindset: Apply /pb-preamble thinking (challenge every safety assumption) and /pb-design-rules thinking (fail noisily, distrust "one true way," recovery-oriented errors). The hunt is adversarial by design.

Resource Hint: opus - deep audit requires tracing decision paths end-to-end, evaluating cryptographic boundaries, and validating findings against exploit scenarios.

Language: This methodology targets Go projects by default. For Python equivalents, see references/methodology.md Appendix A. For Node, see Appendix B.


When to Use This Command

  • Deep security audit - full methodology, every step executed
  • Pre-release security gate - for L-tier changes touching auth, crypto, or input parsing
  • Post-incident review - hunt the vulnerability class that caused the incident across the codebase
  • Dependency boundary audit - when integrating a new auth provider, payment processor, or identity system

For quick pre-release checks, use /pb-security. This command is the deep pass.


Severity Rubric

LevelCriteria
CriticalRemote code execution, authentication bypass, credential exfiltration, privilege escalation to admin
HighData exfiltration (non-credential), token forgery, SSRF to internal services, broken access control on sensitive data
MediumInformation disclosure (non-sensitive), open redirect, DoS with restart requirement, debug info leak
LowConfiguration weakness (no direct exploit), missing security headers (defense-in-depth), verbose error messages
InfoHardening opportunity (no vulnerability), code pattern that could become exploitable with future changes

How This Skill Runs

The hunt splits into workflow-automated phases and manual-judgment steps:

Automated (workflow drives)Manual (you decide)
Pre-Hunt Sweeps (govulncheck, config drift, supply-chain)Step 1: Scope the hunt
Step 3: Targeted search passes (7 parallel greps)Step 2: Map decision paths
Step 4: URL/path canonicalization (16 payloads)Step 8: Provider and crypto boundaries
Step 5: Header trust + CSP auditStep 11: Report writing
Step 6: Token/cookie/session auditStep 12: Fix application
Step 7: Parser/DoS/panic boundaries
Step 9: Concurrency and cache safety
Step 10: 3-vote adversarial verify (with Scope Sweep gate)

Workflow phases run in sequence with step-completion enforcement: a phase producing shallow output is rejected, not passed. The 3-vote verify in Step 10 uses diverse skeptic prompts (threat-model reader, exploit-chain tracer, fix-site checker). Kill if ≥2 refute.


12-Step Summary

#StepMode
Pregovulncheck, config drift, supply-chain integrityWorkflow
1Scope the huntManual
2Map decision paths end-to-endManual
3Targeted search passes (7 grep patterns)Workflow
4URL/path canonicalization (16 adversarial payloads)Workflow
5Redirect, header trust, CSP contextual auditWorkflow
6Token, cookie, session securityWorkflow
7Parser, DoS, panic boundaries + race detectorWorkflow
8Provider and crypto boundariesManual
9Concurrency and cache safetyWorkflow
103-vote adversarial verify with Scope Sweep gateWorkflow
11Report per-finding (7-field template)Manual
12Fix conservatively with regression testsManual

Full step details, payload tables, and language-specific search passes in references/methodology.md.


Definition of Done

  • Scope documented (what was hunted, what was out of bounds)
  • Pre-Hunt Sweeps executed (govulncheck, config drift, supply-chain)
  • All 7 search passes from Step 3 executed (no skipped passes)
  • URL/path inputs tested against all 16 adversarial payloads
  • Every finding classified into one of 6 validation outcomes
  • ≥2 skeptics concur on each Confirmed/Likely (or --quick flag used)
  • Every Confirmed finding has a fix with a regression test
  • Provider boundaries checked (each present in this project)
  • go test -race ./... passes (or explained if not run)

File Structure

skills/pb-threat-hunt/
  SKILL.md                              ← You are here (~100 lines)
  references/
    methodology.md                       ← Full 12-step breakdown, payload tables, appendices
  workflows/
    threat-hunt.js                       ← Executable workflow template

Run ./scripts/install.sh to install to ~/.claude/skills/pb-threat-hunt/.


Related Commands

  • /pb-security - Quick pre-release security checklist (run first; use this for deep follow-up)
  • /pb-secrets - Secrets management lifecycle
  • /pb-hardening - Infrastructure hardening (servers, containers, networks)
  • /pb-incident - Incident response when a finding becomes an active threat
  • /pb-debug - Tracing exploit paths through code

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.