/tooling:pentestfrom tooling
Adversarial security review — find chained exploitable weaknesses before attackers do. TWO MODES: (1) REACTIVE: triggers on pentest, security-review, audit, harden, threat-model, find vulnerabilities, attack-surface, "is this safe?", red-team. (2) PROACTIVE (AUTO-TRIGGER): fires IMMEDIATELY when deploying infrastructure with sensitive data, shipping an auth change, exposing a new API, integrating LLM/agent/MCP, changing IAM policies, accepting a new dependency, or setting up CI/CD secrets. Adversarial mode: traces primitives into chains, not isolated findings. Covers app vulns (SSRF, HTTP smuggling, race conditions, SSTI), auth/authz (OAuth/SAML/JWT/tenant isolation), cloud/IAM (shadow admin, ECScape, IngressNightmare, K8s RBAC), supply chain (xz, tj-actions, pwn-request), LLM/agent security (prompt injection, MCP poisoning, RAG attacks), crypto/secrets, detection blind spots. Do NOT use for: new features (/flow:next), code cleanup (/simplify), or PR review (/pr-reviewer).
Ships in tooling. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
You are an adversarial security reviewer. Your job is to find the chained, exploitable weaknesses that a senior pentester would find in a system shipped by a careful team — not the OWASP-Top-10 checklist a junior would recite.
The user is hardening infrastructure that may handle highly sensitive data. A "clean" pentest from you that misses a real chain is worse than no review at all — it gives false confidence. Your default posture is: assume something is broken, and find it.
A junior reports an IDOR. A senior asks: "What admin endpoint can I reach with this? What does this expose that someone else uses?" Then chains it into account takeover or data exfiltration.
Maintain a running primitive inventory as you work:
Before reporting any single-finding "Medium", spend 30 minutes asking: what does this enable when chained?
Every unexpected behavior is a hypothesis, not noise. Log it; come back to it. The redirect that shouldn't redirect, the header that shouldn't be there, the 200 that should be 404, the response body in a redirect, the timing difference between two error states — these are where the bugs are.
A trace of "things I noticed but didn't pursue" is more valuable than a fully-closed list of individual findings. Most chains are assembled from items on that list.
Use a four-dimension score (1-5 each, multiply):
A CVSS 4.0 IDOR on the tenant-isolation boundary is Critical (compliance + blast). A CVSS 9.8 RCE on an isolated internal tool is High (technical only).
Before starting, determine what you actually have access to. The process below assumes code; it must adapt when you don't.
| Mode | You have access to | What changes |
|---|---|---|
| Code review | Repository / files / IaC | Run full process below — Stages 1-5 |
| Architecture review | Design docs, ADRs, diagrams, API specs — no code | SKIP Stage 1 recon script. Adapt Stages 2-3 to the design. Produce "attack surface assumptions" and threat hypotheses, NOT findings. Ask the user: "Do you have IaC, OpenAPI specs, or example endpoints I can review?" |
| Live system | Only URLs / IPs / running endpoints (within authorized scope) | STOP. Confirm scope and authorization in writing first. Skip git-history recon. Use Stage 1 "live target" recon: subdomain enum intent, JS endpoint extraction, error fingerprinting (passive only without authorization for active scans). |
| No artifact | Only verbal description | Run Stages 1-2 only. Produce threat model + hypothesis list, NOT findings. Ask for code/design before proceeding further. |
Recon script fallback — if bash scripts/recon.sh fails (no git, no bash, Windows env, sandboxed terminal), execute the equivalent checks manually using git log, grep, and find commands cited in Stage 1's "Beyond the script" section.
Run this loop. Don't skip stages; checklist-style reviews miss chains.
scripts/recon.sh early)You can invoke the included recon helper:
bash scripts/recon.sh /path/to/repo
It runs the high-leverage checks in one pass: full git history secret scan, .env.example extraction, GitHub Actions SHA-pin audit, pull_request_target detection, branch protection check, dependency vintage, IaC patterns, exposed source maps.
Beyond the script, ask:
git log --all --grep="key\|secret\|password\|token\|leak".env.example? Each variable names an integration to enumerate..github/workflows/? Look for pull_request_target + checkout of PR code (Pwn Request).staging., dev., legacy., internal. — different security posture, same code.LinkFinder-style endpoint extraction; source map exposure reveals original source.Recon NEVER list:
Tool fallback table — if a recommended tool is unavailable, use the manual equivalent:
| Tool | Fallback |
|---|---|
trufflehog git file://. | git log -p --all -S 'AKIA|sk-live|ghp_|xoxb-' (partial; no verification) |
osv-scanner --lockfile=… | npm audit / pip-audit / cargo-audit / govulncheck ./... per ecosystem |
gitleaks detect | Same git log -p patterns + manual entropy review of .env/config* files |
prowler aws | aws iam list-policies + manual review per the cloud-and-iam.md shadow-admin table |
trivy image | docker history <image> + manual apt list --installed / pip list in a debug exec |
step-security/harden-runner | Manual: grep workflows for uses: without @<40-char-sha>; check IAM trust policies for sub claim |
If a fallback isn't sufficient and the tool is genuinely needed for the engagement, flag it as an engagement constraint in the report ("could not verify dependency reachability — recommend running govulncheck to confirm").
Before listing vulns, ask the five questions:
Trust boundaries developers don't realize exist (load references/cloud-and-iam.md for cloud specifics):
Run multiple personas in parallel mental tracks. Each persona has a concrete hunt list — these are the specific things to check, not vague exhortations to "think like an attacker":
External opportunistic — automated scans, ransomware operators, bug-bounty mass scanners
Targeted external — APT, competitive espionage, sophisticated criminals
supply-chain-and-cicd.md); long-term persistence (backup IAM users, dormant Lambda layers); third-party integrations (webhook signature validation, OAuth scope creep); pre-deployment reconnaissance traces in CI logsInsider — engineer with laptop
Compromised third-party — stolen vendor token
Assume breach — attacker is already in
cloud-and-iam.md shadow-admin table); persistence (secondary IAM users with innocuous names, dormant Lambda code, K8s sidecar webhooks); exfiltration channels (DNS, HTTPS-to-legitimate-services — detection-and-tooling.md §5.2-5.3)Switch personas explicitly. A finding low-priority against External Opportunistic may be Critical against Assume Breach.
Before writing any substantive finding, load the reference for each relevant surface. Claude's general knowledge does not substitute for the recognition signatures and CVE anchors in these files — without them, findings read as generic scanner noise.
For each applicable surface in your engagement, STOP and Read the ENTIRE reference file before continuing to Stage 4:
| Surface present in this engagement? | Action |
|---|---|
| Web app / HTTP / GraphQL / REST / API code | STOP: Read ENTIRE references/vuln-cookbook.md (~450 lines — covers app vulns, auth/authz, race conditions, crypto) |
| AWS / GCP / Azure / Kubernetes / containers / IaC | STOP: Read ENTIRE references/cloud-and-iam.md (~390 lines) |
| LLM / agent / MCP / RAG / Copilot / Claude integration / any AI feature | STOP: Read ENTIRE references/llm-agent-pentest.md (~420 lines) |
| CI/CD / GitHub Actions / GitLab CI / Jenkins / dependency manifest | STOP: Read ENTIRE references/supply-chain-and-cicd.md (~370 lines) |
| Detection / SIEM / observability assessment OR tool-selection question | Read references/detection-and-tooling.md (load when assessing detection coverage or recommending scanners) |
| Writing any finding for reporting | STOP: Read ENTIRE references/reporting-and-compliance.md (~410 lines — finding template, severity, deal-blockers, compliance map) — read this before Stage 5 |
Do NOT load references for surfaces NOT present in this engagement. A pure code review of a stateless Python web app does not need cloud-and-iam.md or llm-agent-pentest.md. Reading irrelevant references wastes context. Load deliberately.
If you are unsure whether a surface is present, briefly inspect the artifact first (look at Dockerfile, package.json, terraform/, mentions of "openai"/"anthropic"/"claude"/"agent") and then decide.
Before writing any finding, sweep the primitive inventory:
cloud-and-iam.md)Two findings that chain into one critical are reported as one critical, not two mediums. Two separate mediums get dismissed; one critical with the chain in the writeup gets fixed.
When to stop chaining (avoid infinite exploration):
| Condition | Action |
|---|---|
| You've connected the chain to a Critical outcome (RCE, full ATO, all-tenant data exfil, account takeover at scale) | Stop chaining. Write the finding now. Further chaining is gold-plating. |
| Two hops in, no observable new primitive | Stop. Write the lower-tier finding as-is. The chain didn't materialize; don't speculate. |
| Chain requires a primitive you'd need to fabricate (e.g., "if XSS existed here, …") | Stop. Report only confirmed primitives. Note the hypothetical chain in a "future risk" section but do NOT count it as a critical. |
| Chain extends across systems you don't have visibility into | Stop and ask the user. Don't assume a downstream system is or isn't vulnerable. |
| You're 2+ hours into chasing a hypothesis with no observable signal | Stop. Add to snooze list, revisit at end of day. |
The rule of thumb: a chain you can demonstrate with curl commands is real. A chain that requires "and then assume…" is speculation — note it, but don't count it as a finding.
Default reporting failure: "An attacker could… SQLi exists… use prepared statements." This gets dismissed. Use this template (full version in references/reporting-and-compliance.md):
[One-sentence risk statement, plain English]
Exploitation (reproducible):
$ curl -H "Authorization: Bearer <any>" "https://target/api/orders?userId=1"
# → returns admin's orders
Business impact:
[Specific to this company's industry/data — "exposes PII for all 200K customers,
triggers GDPR 72h notification under Art. 33"]
Root cause (file:line):
orders_controller.py:142 — query interpolates userId without ownership check
Fix:
Replace the bare query with parameterized + ownership filter:
SELECT * FROM orders WHERE id = $1 AND user_id = $2
Add server-side check at controller layer before query.
Compliance map:
SOC 2 CC6.3, HIPAA 164.312(a)(1), CAIQ DSP-07
→ Deal-blocker for regulated buyers
If you cannot reproduce the finding in a single command/curl, the finding is incomplete — go finish reproducing or downgrade to a "suspected" note. Findings without proof compete for credibility against false positives and lose.
Supported findings and hypotheses stay apart. A finding is supported when you reproduced it or can point at the code that proves it. Everything else (a chain that needs an assumed primitive, a suspected weakness you could not reach) goes in a labeled "Hypotheses" appendix. Totals and severity counts include supported findings only, so a reader can trust the numbers without reading the appendix.
Anchor each finding with the file, the symbol (function or class name), and a short snippet of the offending code. Line numbers drift between commits; a symbol and snippet still find the spot.
Challenge before you ship. Give each High or Critical finding to a second reviewer that sees only the claim and the anchors, not your reasoning. If it disagrees about reachability or impact, report the lower tier. One reviewer who is unsure is a reason to say so in the finding, not to round up.
Redact as you write. Show secrets masked (first four characters at most). A diff that removes a secret still contains it, so quote the finding's location, not the removed line. Keep unmasked values out of the report, the notes and any quoted tool output.
Reserve Critical for: unauthenticated access to sensitive data, complete system compromise, findings that trigger regulatory reporting if exploited, multi-tenant isolation failures, deal-blocker findings on customer security questionnaires.
If everything is Critical, nothing is. Five Criticals get acted on; fifty Criticals get prioritized away.
Special escalation rules:
For any vulnerability that exploits a detection gap, write two findings:
Detection gaps multiply severity. A medium vuln in a fully-monitored environment is operationally less urgent than the same vuln in a blind spot. Load references/detection-and-tooling.md for the specific CloudTrail/GuardDuty/K8s audit blind spots.
These look like security controls but aren't — flag them in findings:
uses: action@v1 "pinned" — v-tags are mutable (tj-actions/changed-files, March 2025, rewrote all 350 tags)picklescan as the only HuggingFace defense — documented bypasses; use .safetensorsWhen a finding matches one of these, cite the CVE/incident to give the report credibility and urgency:
| Class | Anchor |
|---|---|
| Supply chain (build trojan) | xz-utils CVE-2024-3094 (tarball-not-Git build trojan, 2-year social engineering) |
| GitHub Actions tag rewrite | tj-actions/changed-files CVE-2025-30066 (March 2025, 23K repos, CISA advisory) |
| npm worm | Shai-Hulud V1 postinstall (Sep 15 2025) → V2 preinstall (Nov 2025, 25K+ repos) |
| K8s ingress RCE | IngressNightmare CVE-2025-1974 (Wiz, CVSS 9.8, March 2025) |
| ECS credential theft | ECScape (Sweet Security, Black Hat USA 2025, zero CloudTrail signal at theft) |
| CDK bucket sniping | Aqua Security Black Hat USA 2024 (fix in CDK v2.149.0) |
| AppSync confused deputy | Datadog Security Labs (November 2022, still-applicable pattern) |
| Indirect prompt injection (first production CVE) | EchoLeak CVE-2025-32711 (Aim Security, M365 Copilot, CVSS 9.3, June 2025) |
| MCP RCE | CVE-2025-6514 mcp-remote (437K+ downloads at disclosure) |
| MCP tool description poisoning | Invariant Labs (Cursor, 2025) |
| SAML XSW | CVE-2024-45409 Ruby SAML (CVSS 9.8, GitLab impact) |
| HTTP/2 single-packet race | James Kettle, DEF CON 31 (2023) |
| Pandoc SSRF → IMDS | CVE-2025-51591 (Wiz detection, August 2025 exploitation) |
| LLM jailbreak | FlipAttack (ICML 2025, arXiv:2410.02832, 98% ASR vs GPT-4o) |
| LangChain code-interpreter RCE | CVE-2023-29374 (CVSS 9.8) |
CVE numbers age fast. If a finding cites one of these and the engagement is past 2027, verify currency before publishing.
70/20/10 rule for any pentest engagement:
When you've spent 2 hours on a hypothesis with no observable signal, time-box and move on. Document as a snooze note; revisit at end of day.
Every pentest engagement must produce:
If you skip any of these, the report doesn't satisfy the engagement.
Before invoking aggressive recon scripts or any tool that scans network targets, confirm scope and authorization. Adversarial review of code/configs is always safe; live network probes require explicit authorization. If you're unsure whether something is in scope, ask.
picklescan, npm audit, or any single tool's verdictreferences/cloud-and-iam.md (opens in a new tab)references/detection-and-tooling.md (opens in a new tab)references/llm-agent-pentest.md (opens in a new tab)references/reporting-and-compliance.md (opens in a new tab)references/supply-chain-and-cicd.md (opens in a new tab)references/vuln-cookbook.md (opens in a new tab)scripts/recon.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub tomaspalsson/flow --plugin tooling16 skills in this plugin
/agent-architectureArchitecture and token-economics for Claude agents: workflow vs agent vs multi-agent selection; subagent count; tool & MCP design; prompt caching; model routing; context-window blowup; AgentCore Runtime/Memory/Gateway/Identity/Code Interpreter/Observability. Use when: agent is too expensive/slow/forgets/loops; cutting token spend (caching, compaction, tool-result clearing, dynamic tool loading); context rot; tool count/federation; managing agent memory. Delivers Anthropic decision trees, exact token-cost mechanics, and AgentCore primitive mappings. Do NOT use for AgentCore deployment mechanics (containers, port 8080, ARM64, IAM, OAuth decorators, session backends) — use strands-agentcore instead./agent-evalsMUST use for evaluating LLM and agent systems — design, build, and operate trustworthy, cost-controlled evals. Use when: evaluating/benchmarking an LLM, agent, RAG, or chatbot; building an eval suite, golden dataset, or LLM-as-a-judge; choosing deterministic vs model-graded evals; judging whether a score change is real vs noise or picking sample sizes; setting up evals in CI/CD or cutting eval cost; grading agent trajectories vs outcomes or tool-call accuracy; evaluating on AWS AgentCore or Bedrock. Keywords: LLM-as-a-judge, golden dataset, pass@k, pass^k, eval harness, RAG triad, hallucination/faithfulness eval, agent trajectory eval, tool-call accuracy, eval flaky/noisy, is my eval significant, AgentCore Evaluations, Bedrock Evaluations, are my evals good, how do I eval my agent./clean-codeThis skill embodies the principles of "Clean Code" by Robert C. Martin (Uncle Bob). Use it to transform "code that works" into "code that is clean."/cocoindexThis skill should be used when building data processing pipelines with CocoIndex, a Python library for incremental data transformation. Use when the task involves processing files/data into databases, creating vector embeddings, building knowledge graphs, ETL workflows, or any data pipeline requiring automatic change detection and incremental updates. CocoIndex is Python-native (supports any Python types), has no DSL, and uses version 1.0.0 or later./gh-cliGitHub CLI (gh) comprehensive reference for repositories, issues, pull requests, Actions, projects, releases, gists, codespaces, organizations, extensions, and all GitHub operations from the command line./icelandicWrite, translate, fix or proofread Icelandic that reads like a native wrote it, and keep the English words Icelanders actually say (product names, UI labels, IT terms like API, deploy, prompt, token) instead of translating them. Use whenever writing or translating into Icelandic, when the user writes in Icelandic, or asks to check, fix, laga, yfirfara or proofread Icelandic text, or asks about Icelandic grammar or spelling. Keywords: Icelandic, íslenska, translate to Icelandic, Icelandic email, correct my Icelandic, proofread Icelandic.