@intentsolutionsio/penetration-tester 2.0.0 → 3.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/.claude-plugin/plugin.json +8 -3
  2. package/README.md +8 -0
  3. package/commands/pentest.md +5 -0
  4. package/package.json +8 -3
  5. package/skills/analyzing-tls-config/SKILL.md +221 -0
  6. package/skills/analyzing-tls-config/references/AUTHORIZATION.md +133 -0
  7. package/skills/analyzing-tls-config/references/PLAYBOOK.md +267 -0
  8. package/skills/analyzing-tls-config/references/THEORY.md +128 -0
  9. package/skills/analyzing-tls-config/scripts/analyze_tls.py +415 -0
  10. package/skills/auditing-cors-policy/SKILL.md +186 -0
  11. package/skills/auditing-cors-policy/references/PLAYBOOK.md +220 -0
  12. package/skills/auditing-cors-policy/references/THEORY.md +142 -0
  13. package/skills/auditing-cors-policy/scripts/audit_cors.py +350 -0
  14. package/skills/auditing-npm-dependencies/SKILL.md +254 -0
  15. package/skills/auditing-npm-dependencies/references/PLAYBOOK.md +175 -0
  16. package/skills/auditing-npm-dependencies/references/THEORY.md +122 -0
  17. package/skills/auditing-npm-dependencies/scripts/audit_npm.py +408 -0
  18. package/skills/auditing-python-dependencies/SKILL.md +251 -0
  19. package/skills/auditing-python-dependencies/references/PLAYBOOK.md +193 -0
  20. package/skills/auditing-python-dependencies/references/THEORY.md +122 -0
  21. package/skills/auditing-python-dependencies/scripts/audit_python.py +459 -0
  22. package/skills/checking-http-security-headers/SKILL.md +176 -0
  23. package/skills/checking-http-security-headers/references/PLAYBOOK.md +212 -0
  24. package/skills/checking-http-security-headers/references/THEORY.md +137 -0
  25. package/skills/checking-http-security-headers/scripts/check_headers.py +362 -0
  26. package/skills/checking-license-compliance/SKILL.md +225 -0
  27. package/skills/checking-license-compliance/references/PLAYBOOK.md +161 -0
  28. package/skills/checking-license-compliance/references/THEORY.md +152 -0
  29. package/skills/checking-license-compliance/scripts/check_licenses.py +461 -0
  30. package/skills/composing-vulnerability-report/SKILL.md +212 -0
  31. package/skills/composing-vulnerability-report/references/PLAYBOOK.md +180 -0
  32. package/skills/composing-vulnerability-report/references/THEORY.md +178 -0
  33. package/skills/composing-vulnerability-report/scripts/compose_report.py +396 -0
  34. package/skills/confirming-pentest-authorization/SKILL.md +247 -0
  35. package/skills/confirming-pentest-authorization/references/PLAYBOOK.md +189 -0
  36. package/skills/confirming-pentest-authorization/references/THEORY.md +167 -0
  37. package/skills/confirming-pentest-authorization/scripts/check_authorization.py +457 -0
  38. package/skills/defining-pentest-scope/SKILL.md +227 -0
  39. package/skills/defining-pentest-scope/references/PLAYBOOK.md +238 -0
  40. package/skills/defining-pentest-scope/references/THEORY.md +170 -0
  41. package/skills/defining-pentest-scope/scripts/define_scope.py +472 -0
  42. package/skills/detecting-command-injection-patterns/SKILL.md +144 -0
  43. package/skills/detecting-command-injection-patterns/references/PLAYBOOK.md +302 -0
  44. package/skills/detecting-command-injection-patterns/references/THEORY.md +206 -0
  45. package/skills/detecting-command-injection-patterns/scripts/scan_cmdi.py +290 -0
  46. package/skills/detecting-debug-endpoints/SKILL.md +207 -0
  47. package/skills/detecting-debug-endpoints/references/PLAYBOOK.md +402 -0
  48. package/skills/detecting-debug-endpoints/references/THEORY.md +218 -0
  49. package/skills/detecting-debug-endpoints/scripts/probe_debug.py +518 -0
  50. package/skills/detecting-directory-listing/SKILL.md +206 -0
  51. package/skills/detecting-directory-listing/references/PLAYBOOK.md +277 -0
  52. package/skills/detecting-directory-listing/references/THEORY.md +203 -0
  53. package/skills/detecting-directory-listing/scripts/probe_directory_listing.py +180 -0
  54. package/skills/detecting-eval-exec-usage/SKILL.md +128 -0
  55. package/skills/detecting-eval-exec-usage/references/PLAYBOOK.md +306 -0
  56. package/skills/detecting-eval-exec-usage/references/THEORY.md +159 -0
  57. package/skills/detecting-eval-exec-usage/scripts/scan_eval.py +223 -0
  58. package/skills/detecting-exposed-secrets-files/SKILL.md +179 -0
  59. package/skills/detecting-exposed-secrets-files/references/PLAYBOOK.md +274 -0
  60. package/skills/detecting-exposed-secrets-files/references/THEORY.md +174 -0
  61. package/skills/detecting-exposed-secrets-files/scripts/probe_secrets.py +207 -0
  62. package/skills/detecting-insecure-deserialization/SKILL.md +148 -0
  63. package/skills/detecting-insecure-deserialization/references/PLAYBOOK.md +333 -0
  64. package/skills/detecting-insecure-deserialization/references/THEORY.md +199 -0
  65. package/skills/detecting-insecure-deserialization/scripts/scan_deserialization.py +250 -0
  66. package/skills/detecting-sql-injection-patterns/SKILL.md +161 -0
  67. package/skills/detecting-sql-injection-patterns/references/PLAYBOOK.md +317 -0
  68. package/skills/detecting-sql-injection-patterns/references/THEORY.md +261 -0
  69. package/skills/detecting-sql-injection-patterns/scripts/scan_sqli.py +354 -0
  70. package/skills/detecting-ssl-cert-issues/SKILL.md +182 -0
  71. package/skills/detecting-ssl-cert-issues/references/PLAYBOOK.md +203 -0
  72. package/skills/detecting-ssl-cert-issues/references/THEORY.md +133 -0
  73. package/skills/detecting-ssl-cert-issues/scripts/check_cert_chain.py +481 -0
  74. package/skills/detecting-weak-cryptography/SKILL.md +147 -0
  75. package/skills/detecting-weak-cryptography/references/PLAYBOOK.md +466 -0
  76. package/skills/detecting-weak-cryptography/references/THEORY.md +194 -0
  77. package/skills/detecting-weak-cryptography/scripts/scan_weak_crypto.py +417 -0
  78. package/skills/fingerprinting-server-software/SKILL.md +191 -0
  79. package/skills/fingerprinting-server-software/references/PLAYBOOK.md +337 -0
  80. package/skills/fingerprinting-server-software/references/THEORY.md +183 -0
  81. package/skills/fingerprinting-server-software/scripts/fingerprint_server.py +347 -0
  82. package/skills/generating-executive-summary/SKILL.md +261 -0
  83. package/skills/generating-executive-summary/references/PLAYBOOK.md +201 -0
  84. package/skills/generating-executive-summary/references/THEORY.md +195 -0
  85. package/skills/generating-executive-summary/scripts/exec_summary.py +538 -0
  86. package/skills/mapping-findings-to-owasp-top10/SKILL.md +235 -0
  87. package/skills/mapping-findings-to-owasp-top10/references/PLAYBOOK.md +193 -0
  88. package/skills/mapping-findings-to-owasp-top10/references/THEORY.md +160 -0
  89. package/skills/mapping-findings-to-owasp-top10/scripts/map_owasp.py +540 -0
  90. package/skills/performing-penetration-testing/SKILL.md +282 -190
  91. package/skills/performing-penetration-testing/references/OWASP_TOP_10.md +22 -0
  92. package/skills/performing-penetration-testing/references/REMEDIATION_PLAYBOOK.md +46 -0
  93. package/skills/performing-penetration-testing/references/SECURITY_HEADERS.md +41 -0
  94. package/skills/performing-penetration-testing/scripts/code_security_scanner.py +144 -79
  95. package/skills/performing-penetration-testing/scripts/dependency_auditor.py +116 -93
  96. package/skills/performing-penetration-testing/scripts/security_scanner.py +574 -446
  97. package/skills/probing-dangerous-http-methods/SKILL.md +182 -0
  98. package/skills/probing-dangerous-http-methods/references/PLAYBOOK.md +234 -0
  99. package/skills/probing-dangerous-http-methods/references/THEORY.md +145 -0
  100. package/skills/probing-dangerous-http-methods/scripts/probe_methods.py +263 -0
  101. package/skills/recording-pentest-engagement/SKILL.md +253 -0
  102. package/skills/recording-pentest-engagement/references/PLAYBOOK.md +203 -0
  103. package/skills/recording-pentest-engagement/references/THEORY.md +195 -0
  104. package/skills/recording-pentest-engagement/scripts/record_engagement.py +461 -0
  105. package/skills/scanning-for-hardcoded-secrets/SKILL.md +215 -0
  106. package/skills/scanning-for-hardcoded-secrets/references/PLAYBOOK.md +325 -0
  107. package/skills/scanning-for-hardcoded-secrets/references/THEORY.md +175 -0
  108. package/skills/scanning-for-hardcoded-secrets/scripts/scan_secrets.py +395 -0
  109. package/skills/tracing-transitive-vulnerabilities/SKILL.md +235 -0
  110. package/skills/tracing-transitive-vulnerabilities/references/PLAYBOOK.md +233 -0
  111. package/skills/tracing-transitive-vulnerabilities/references/THEORY.md +138 -0
  112. package/skills/tracing-transitive-vulnerabilities/scripts/trace_vulns.py +484 -0
@@ -1,266 +1,358 @@
1
1
  ---
2
2
  name: performing-penetration-testing
3
3
  description: |
4
- Perform security testing on web applications, APIs, and codebases. Use when
5
- the user asks to "run a security scan", "check for vulnerabilities", "audit
6
- dependencies", "check security headers", "find security issues", "pentest",
7
- "security audit", or "scan for secrets". Trigger with "pentest", "security scan",
8
- "vulnerability check", "audit dependencies", "check headers", "find secrets".
9
- version: 2.0.0
10
- allowed-tools: Read, Write, Edit, Grep, Glob, Bash(python3:*), Bash(pip:*), Bash(npm:*), Bash(bandit:*)
11
- license: MIT
4
+ Orchestrate a penetration test by routing user intent to one or
5
+ more of the 25 narrow skills in this pack. Confirms authorization
6
+ + scope FIRST (cluster 5), runs the relevant scan skills (clusters
7
+ 1-4), then composes findings into the customer deliverables
8
+ (cluster 6) plus an integrity-attestable engagement archive
9
+ (cluster 5). Backward-compatible with v2 invocations — "pentest",
10
+ "security scan", "audit dependencies" still work but now route to
11
+ the narrow skills instead of the v2 monolithic scripts.
12
+ Use when: starting a security engagement, running an ad-hoc
13
+ scan, planning a multi-day pentest, or operating the full
14
+ authorization-to-deliverable workflow end-to-end.
15
+ Trigger with: "pentest", "security scan", "vulnerability
16
+ check", "audit dependencies", "check headers", "find secrets",
17
+ "OWASP scan", "security audit".
18
+ allowed-tools:
19
+ - Read
20
+ - Write
21
+ - Edit
22
+ - Glob
23
+ - Grep
24
+ - Bash(python3:*)
25
+ - Bash(pip:*)
26
+ - Bash(npm:*)
27
+ - Bash(bandit:*)
28
+ - Bash(pip-audit:*)
29
+ - Bash(pipdeptree:*)
30
+ - Bash(gpg:*)
31
+ - Bash(tar:*)
32
+ disallowed-tools:
33
+ - Bash(rm:*)
34
+ - Bash(curl:*)
35
+ - Bash(wget:*)
36
+ - Bash(nmap:*)
37
+ - Bash(nikto:*)
38
+ - Bash(sqlmap:*)
39
+ - Write(.env)
40
+ - Edit(.env)
41
+ version: 3.0.0
12
42
  author: Jeremy Longshore <jeremy@intentsolutions.io>
13
- compatible-with: claude-code, codex, openclaw
14
- tags: [security, testing, audit]
43
+ license: MIT
44
+ compatibility: Designed for Claude Code
45
+ tags:
46
+ - security
47
+ - testing
48
+ - pentest
49
+ - orchestration
15
50
  ---
16
- # Penetration Testing Skill
17
51
 
18
- Security testing toolkit with three specialized scanners for web applications,
19
- dependency chains, and source code.
52
+ # Performing Penetration Testing
20
53
 
21
54
  ## Overview
22
55
 
23
- This skill provides three real, working security scanners:
56
+ v3.0.0 of `penetration-tester` is a 25-skill pack. Each skill is
57
+ narrow and heavy-hitter compliant (≥250 LOC scripts, ≥2 reference
58
+ docs, 8-field SKILL.md frontmatter). This orchestrator routes
59
+ user intent to the right combination of narrow skills.
24
60
 
25
- 1. **security_scanner.py** -- HTTP security header analysis, SSL/TLS certificate
26
- checks, exposed endpoint probing, dangerous HTTP method detection, and CORS
27
- misconfiguration testing. Targets live URLs.
61
+ The 25 skills group into 7 clusters:
28
62
 
29
- 2. **dependency_auditor.py** -- Unified vulnerability scanner for project
30
- dependencies. Wraps `npm audit` and `pip-audit` with normalized severity
31
- output. Targets project directories.
63
+ - **Cluster 0** this orchestrator
64
+ - **Cluster 1 (5 skills)** Network / transport
65
+ - **Cluster 2 (4 skills)** — Information disclosure
66
+ - **Cluster 3 (6 skills)** — Source-code static analysis
67
+ - **Cluster 4 (4 skills)** — Dependency analysis
68
+ - **Cluster 5 (3 skills)** — Engagement governance
69
+ - **Cluster 6 (3 skills)** — Reporting
32
70
 
33
- 3. **code_security_scanner.py** -- Static analysis combining `bandit` (Python)
34
- with custom regex patterns for hardcoded secrets, SQL injection, command
35
- injection, eval/exec usage, and insecure deserialization. Targets codebases.
71
+ Cluster 5 + 6 are the v3 additions versus v2. Cluster 5 runs
72
+ BEFORE any scan and refuses to proceed if authorization is
73
+ missing or scope is malformed. Cluster 6 runs AFTER scans and
74
+ produces the deliverable artifacts (vulnerability report, OWASP
75
+ coverage report, executive summary, chain-of-custody archive).
36
76
 
37
- ## Prerequisites
77
+ ## Instructions
38
78
 
39
- - Python 3.9+
40
- - `requests` library (for security_scanner.py)
41
- - Optional: `bandit` (for code scanning), `pip-audit` (for dependency auditing)
42
- - Optional: `npm` (for JavaScript dependency auditing)
79
+ The orchestrator's job is intent routing — given a user utterance, decide which of the 25 narrow skills to invoke and in what order. Four steps:
43
80
 
44
- Run the setup script to install all dependencies:
81
+ ### Step 1 Parse the user intent
45
82
 
46
- ```bash
47
- bash ${CLAUDE_PLUGIN_ROOT}/skills/performing-penetration-testing/scripts/setup_pentest_env.sh
48
- ```
83
+ Match the utterance against the intent-routing table below. The leftmost matching row determines the routing. If no exact match, default to the cluster-1-4 governance-first sequence and pare back based on context.
49
84
 
50
- Or with a virtual environment (recommended):
85
+ ### Step 2 Run authorization-first
51
86
 
52
- ```bash
53
- bash ${CLAUDE_PLUGIN_ROOT}/skills/performing-penetration-testing/scripts/setup_pentest_env.sh --venv
54
- ```
87
+ Before any cluster 1-4 scan invocation, run `confirming-pentest-authorization`. If it emits any CRITICAL finding, HALT — do not invoke any scan skill. The user must resolve the authorization issue before proceeding.
55
88
 
56
- ## Instructions
89
+ ### Step 3 — Run the matched skills in order
57
90
 
58
- Step 1. Confirm Authorization
91
+ Invoke each skill from the routing-table row, in the listed order. Each skill emits its findings as JSON/JSONL/markdown via `lib/report.py`. Persist per-skill output into `engagement/findings/<skill>-<date>.jsonl` so the cluster 6 skills can consume them.
59
92
 
60
- Before running any scan, verify the user has authorization to test the target.
61
- Ask explicitly:
93
+ ### Step 4 Compose deliverables
62
94
 
63
- > "Do you have authorization to perform security testing on this target? I need
64
- > confirmation before proceeding."
95
+ After scan skills complete, run cluster 6 in sequence: `mapping-findings-to-owasp-top10`, then `composing-vulnerability-report`, then `generating-executive-summary`, then `recording-pentest-engagement` for the chain-of-custody archive.
65
96
 
66
- If testing a URL, confirm the user owns or has written permission to test it.
67
- If testing local code/dependencies, confirm it's the user's own project.
97
+ ## Intent routing (the table)
68
98
 
69
- **Never scan targets without explicit authorization.**
99
+ | User intent / trigger phrase | Skills to invoke (in order) |
100
+ |---|---|
101
+ | "pentest", "full security scan" | confirming-pentest-authorization → defining-pentest-scope → cluster 1-4 (all) → mapping-findings-to-owasp-top10 → composing-vulnerability-report → generating-executive-summary → recording-pentest-engagement |
102
+ | "check headers" / "scan URL" | confirming-pentest-authorization → checking-http-security-headers + analyzing-tls-config + detecting-ssl-cert-issues |
103
+ | "CORS check" | confirming-pentest-authorization → auditing-cors-policy |
104
+ | "check SSL" / "certificate" | analyzing-tls-config + detecting-ssl-cert-issues |
105
+ | "audit npm dependencies" | auditing-npm-dependencies |
106
+ | "audit python dependencies" / "pip-audit" | auditing-python-dependencies |
107
+ | "find vulnerable deps" | auditing-npm-dependencies + auditing-python-dependencies + tracing-transitive-vulnerabilities |
108
+ | "license check" / "GPL contamination" | checking-license-compliance |
109
+ | "find hardcoded secrets" / "credential scan" | scanning-for-hardcoded-secrets |
110
+ | "SQL injection scan" | detecting-sql-injection-patterns |
111
+ | "command injection scan" | detecting-command-injection-patterns |
112
+ | "code audit" / "static analysis" | cluster 3 (all 6 skills) |
113
+ | "OWASP scan" / "OWASP coverage" | cluster 1-4 → mapping-findings-to-owasp-top10 |
114
+ | "confirm authorization" / "verify ROE" | confirming-pentest-authorization |
115
+ | "define scope" / "generate allowlist" | defining-pentest-scope |
116
+ | "write report" / "generate exec summary" | composing-vulnerability-report → generating-executive-summary |
117
+ | "archive engagement" / "chain of custody" | recording-pentest-engagement |
70
118
 
71
- Step 2. Define Scope
119
+ When unsure which to invoke, prefer the governance-first sequence
120
+ (authorization + scope) and add cluster-1-4 skills based on what
121
+ the user described.
72
122
 
73
- Determine what to scan based on the user's request:
123
+ ## Full 25-skill index
74
124
 
75
- | User says | Scanner to use | Target |
76
- |-----------|---------------|--------|
77
- | "check headers" / "scan URL" | security_scanner.py | URL |
78
- | "audit dependencies" / "check packages" | dependency_auditor.py | Directory |
79
- | "find secrets" / "code audit" | code_security_scanner.py | Directory |
80
- | "full security scan" | All three | URL + Directory |
81
- | "check SSL" / "certificate" | security_scanner.py --checks ssl | URL |
82
- | "CORS check" | security_scanner.py --checks cors | URL |
125
+ ### Cluster 0 Orchestration
83
126
 
84
- Step 3. Run Scans
127
+ - `performing-penetration-testing` this skill
85
128
 
86
- Execute the appropriate scanner(s):
129
+ ### Cluster 1 — Network / transport (5)
87
130
 
88
- **Web application scan:**
89
- ```bash
90
- python3 ${CLAUDE_PLUGIN_ROOT}/skills/performing-penetration-testing/scripts/security_scanner.py TARGET_URL
91
- ```
131
+ - `analyzing-tls-config` — TLS protocol versions, cipher suites, HSTS
132
+ - `detecting-ssl-cert-issues` — cert validity, expiry, chain integrity
133
+ - `auditing-cors-policy` — origin reflection, credential bypass, wildcard
134
+ - `checking-http-security-headers` — CSP, HSTS, X-Frame-Options, etc.
135
+ - `probing-dangerous-http-methods` — TRACE, DELETE, PUT exposure
92
136
 
93
- With specific checks:
94
- ```bash
95
- python3 ${CLAUDE_PLUGIN_ROOT}/skills/performing-penetration-testing/scripts/security_scanner.py TARGET_URL --checks headers,ssl,endpoints,methods,cors
96
- ```
137
+ ### Cluster 2 — Information disclosure (4)
97
138
 
98
- **Dependency audit:**
99
- ```bash
100
- python3 ${CLAUDE_PLUGIN_ROOT}/skills/performing-penetration-testing/scripts/dependency_auditor.py /path/to/project
101
- ```
102
-
103
- With severity filter:
104
- ```bash
105
- python3 ${CLAUDE_PLUGIN_ROOT}/skills/performing-penetration-testing/scripts/dependency_auditor.py /path/to/project --min-severity high
106
- ```
107
-
108
- **Code security scan:**
109
- ```bash
110
- python3 ${CLAUDE_PLUGIN_ROOT}/skills/performing-penetration-testing/scripts/code_security_scanner.py /path/to/code
111
- ```
139
+ - `detecting-exposed-secrets-files` — `.env`, `.git`, backup files
140
+ - `detecting-debug-endpoints` — `/server-status`, admin panels
141
+ - `fingerprinting-server-software` — Server-header version exposure
142
+ - `detecting-directory-listing` — Apache/nginx autoindex
112
143
 
113
- With specific tools:
114
- ```bash
115
- python3 ${CLAUDE_PLUGIN_ROOT}/skills/performing-penetration-testing/scripts/code_security_scanner.py /path/to/code --tools bandit,regex --severity high
116
- ```
144
+ ### Cluster 3 — Source-code static analysis (6)
117
145
 
118
- Step 4. Analyze Results
146
+ - `scanning-for-hardcoded-secrets` AWS / GitHub / Stripe / Slack / API keys
147
+ - `detecting-sql-injection-patterns` — string-concat SQL, unsanitized input
148
+ - `detecting-command-injection-patterns` — shell exec with user input
149
+ - `detecting-eval-exec-usage` — eval/exec with dynamic content
150
+ - `detecting-insecure-deserialization` — pickle/yaml.load/Marshal use
151
+ - `detecting-weak-cryptography` — MD5/SHA1/DES, hardcoded IVs, ECB mode
119
152
 
120
- Review the scanner output. Each finding includes:
121
- 1. **Severity** -- critical, high, medium, low, or info
122
- 2. **Title** -- what was found
123
- 3. **Detail** -- technical explanation
124
- 4. **Remediation** -- how to fix it
153
+ ### Cluster 4 Dependency analysis (4)
125
154
 
126
- Prioritize findings by severity: critical and high findings first.
155
+ - `auditing-npm-dependencies` `npm audit` wrapper with v1/v2 parsers
156
+ - `auditing-python-dependencies` — `pip-audit` wrapper with OSV scoring
157
+ - `checking-license-compliance` — SPDX classification + copyleft contamination
158
+ - `tracing-transitive-vulnerabilities` — dep-graph leverage analysis
127
159
 
128
- Step 5. Report Findings
160
+ ### Cluster 5 Engagement governance (3, new in v3)
129
161
 
130
- Present results to the user in a clear format:
131
- 5. Start with a summary (total findings by severity)
132
- 6. Group findings by severity
133
- 7. For each finding, explain the risk and provide the remediation steps
134
- 8. Reference the appropriate playbook entry from references/
162
+ - `confirming-pentest-authorization` Rules of Engagement validation
163
+ - `defining-pentest-scope` target enumeration + IP allowlist
164
+ - `recording-pentest-engagement` SHA-256 manifest + GPG signing
135
165
 
136
- Step 6. Suggest Remediations
166
+ ### Cluster 6 Reporting (3, new in v3)
137
167
 
138
- For each finding, provide:
139
- 9. The specific code change or configuration needed
140
- 10. Reference to REMEDIATION_PLAYBOOK.md for copy-paste templates
141
- 11. Verification steps to confirm the fix works
168
+ - `composing-vulnerability-report` unified deliverable report
169
+ - `mapping-findings-to-owasp-top10` A0X classification + coverage rollup
170
+ - `generating-executive-summary` 0-100 risk score + top-3 priorities
142
171
 
143
- ## Scanner Reference
172
+ ## End-to-end workflow
144
173
 
145
- ### security_scanner.py
174
+ For a typical engagement, the orchestrator routes through:
146
175
 
147
176
  ```
148
- Usage: python3 security_scanner.py URL [OPTIONS]
149
-
150
- Options:
151
- --checks CHECKS Comma-separated: headers,ssl,endpoints,methods,cors (default: all)
152
- --output FILE Write JSON report to file
153
- --timeout SECS Request timeout in seconds (default: 10)
154
- --verbose Show detailed progress
155
- --help Show help
177
+ +----------------------------------+
178
+ | confirming-pentest-authorization |
179
+ +-------------+--------------------+
180
+ | (CRITICAL halts here)
181
+ v
182
+ +----------------------------------+
183
+ | defining-pentest-scope |
184
+ +-------------+--------------------+
185
+ |
186
+ v
187
+ +-------------+-------------+-------------+-------------+
188
+ | Cluster 1 | Cluster 2 | Cluster 3 | Cluster 4 |
189
+ | (5 skills) | (4 skills) | (6 skills) | (4 skills) |
190
+ +-------------+-------------+-------------+-------------+
191
+ |
192
+ v
193
+ +----------------------------------+
194
+ | mapping-findings-to-owasp-top10 |
195
+ +-------------+--------------------+
196
+ |
197
+ v
198
+ +----------------------------------+
199
+ | composing-vulnerability-report |
200
+ +-------------+--------------------+
201
+ |
202
+ v
203
+ +----------------------------------+
204
+ | generating-executive-summary |
205
+ +-------------+--------------------+
206
+ |
207
+ v
208
+ +----------------------------------+
209
+ | recording-pentest-engagement |
210
+ +----------------------------------+
156
211
  ```
157
212
 
158
- Checks performed:
159
- - Security headers: CSP, HSTS, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy
160
- - SSL/TLS: certificate validity, expiry, protocol version
161
- - Exposed endpoints: .git, .env, admin panels, server-status, directory listing
162
- - HTTP methods: dangerous methods (PUT, DELETE, TRACE)
163
- - CORS: wildcard origins, reflected origins, credentials misconfiguration
213
+ ## Backward compatibility
214
+
215
+ The v2 monolithic scripts (`security_scanner.py`,
216
+ `dependency_auditor.py`, `code_security_scanner.py`) remain in
217
+ `scripts/` as the underlying engine for the original v2
218
+ invocation patterns. The v3 narrow skills re-implement and
219
+ extend that logic with the canonical `lib/finding.py` schema and
220
+ the shared `lib/report.py` output module.
221
+
222
+ If a downstream user has scripted invocations of the v2 scripts,
223
+ those still work. New work should use the narrow skills directly.
224
+
225
+ The orchestrator's old "Step 1 / Step 2 / Step 3" instructions
226
+ in v2 are subsumed by the intent-routing table above. The v2
227
+ checks correspond to:
228
+
229
+ | v2 invocation | v3 equivalent |
230
+ |---|---|
231
+ | `security_scanner.py URL --checks headers` | `checking-http-security-headers` |
232
+ | `security_scanner.py URL --checks ssl` | `analyzing-tls-config` + `detecting-ssl-cert-issues` |
233
+ | `security_scanner.py URL --checks cors` | `auditing-cors-policy` |
234
+ | `security_scanner.py URL --checks endpoints` | `detecting-exposed-secrets-files` + `detecting-debug-endpoints` |
235
+ | `security_scanner.py URL --checks methods` | `probing-dangerous-http-methods` |
236
+ | `dependency_auditor.py DIR --scanners npm` | `auditing-npm-dependencies` |
237
+ | `dependency_auditor.py DIR --scanners pip` | `auditing-python-dependencies` |
238
+ | `code_security_scanner.py DIR --tools regex` | cluster 3 skills (per pattern type) |
239
+ | `code_security_scanner.py DIR --tools bandit` | cluster 3 skills (bandit pattern subset) |
164
240
 
165
- ### dependency_auditor.py
241
+ ## Prerequisites
166
242
 
167
- ```
168
- set -euo pipefail
169
- Usage: python3 dependency_auditor.py DIRECTORY [OPTIONS]
170
-
171
- Options:
172
- --scanners SCANNERS Comma-separated: npm,pip (default: auto-detect)
173
- --min-severity LEVEL Minimum severity: critical,high,moderate,low (default: low)
174
- --output FILE Write JSON report to file
175
- --verbose Show detailed progress
176
- --help Show help
177
- ```
243
+ Per-skill prerequisites are documented in each skill's
244
+ `SKILL.md`. The shared module `lib/` requires Python 3.9+ and
245
+ the standard library only.
178
246
 
179
- Auto-detects project type from package.json, requirements.txt, pyproject.toml, etc.
247
+ Optional tools used by individual skills:
180
248
 
181
- ### code_security_scanner.py
249
+ - `bandit` (Python static-analysis backend, cluster 3)
250
+ - `pip-audit` (cluster 4 Python dependency audit)
251
+ - `pipdeptree` (cluster 4 transitive trace)
252
+ - `gpg` (cluster 5 evidence signing)
253
+ - `npm` (cluster 4 npm dependency audit)
182
254
 
183
- ```
184
- Usage: python3 code_security_scanner.py DIRECTORY [OPTIONS]
185
-
186
- Options:
187
- --tools TOOLS Comma-separated: bandit,regex (default: all available)
188
- --output FILE Write JSON report to file
189
- --severity LEVEL Minimum severity: critical,high,medium,low (default: low)
190
- --exclude PATTERNS Comma-separated glob patterns to exclude
191
- --verbose Show detailed progress
192
- --help Show help
193
- ```
255
+ Each skill emits a graceful INFO Finding when an optional
256
+ dependency is missing and falls back to a degraded but functional
257
+ mode where possible.
194
258
 
195
- Detects: hardcoded secrets, SQL injection, command injection, eval/exec, insecure
196
- deserialization, weak cryptography, disabled SSL verification.
259
+ ## Authorization is non-negotiable
197
260
 
198
- ## Examples
261
+ The orchestrator REFUSES to invoke cluster 1-4 skills until
262
+ `confirming-pentest-authorization` has emitted no CRITICAL or
263
+ HIGH findings against the ROE. The cost of running an authorized
264
+ scan is delay until the ROE is verified. The cost of running an
265
+ unauthorized scan is potential criminal liability under CFAA
266
+ (US), Computer Misuse Act (UK), or equivalent foreign statutes.
199
267
 
200
- ### Quick header check
268
+ For details on the legal framework + ROE structure, see
269
+ `confirming-pentest-authorization/references/THEORY.md`.
201
270
 
202
- User: "Check the security headers on https://example.com"
271
+ ## Examples
203
272
 
204
- ```bash
205
- python3 ${CLAUDE_PLUGIN_ROOT}/skills/performing-penetration-testing/scripts/security_scanner.py https://example.com --checks headers
206
- ```
273
+ ### Example 1 — Full engagement, end to end
207
274
 
208
- ### Full project security audit
275
+ ```
276
+ User: "Run a full pentest on engagements/acme-2026-q2/"
277
+ ```
209
278
 
210
- User: "Run a full security audit on my project"
279
+ Orchestrator routes:
211
280
 
212
- ```bash
213
- # 1. Scan dependencies
214
- python3 ${CLAUDE_PLUGIN_ROOT}/skills/performing-penetration-testing/scripts/dependency_auditor.py .
281
+ 1. `confirming-pentest-authorization --roe engagements/acme-2026-q2/roe.yaml`
282
+ 2. (if no CRITICAL findings) `defining-pentest-scope --roe engagements/acme-2026-q2/roe.yaml`
283
+ 3. Cluster 1-4 skills against each in-scope target, emitting per-skill JSONLs into `engagements/acme-2026-q2/findings/`
284
+ 4. `mapping-findings-to-owasp-top10 engagements/acme-2026-q2/`
285
+ 5. `composing-vulnerability-report engagements/acme-2026-q2/`
286
+ 6. `generating-executive-summary engagements/acme-2026-q2/`
287
+ 7. `recording-pentest-engagement engagements/acme-2026-q2/ --sign --tar ...`
215
288
 
216
- # 2. Scan code for security issues
217
- python3 ${CLAUDE_PLUGIN_ROOT}/skills/performing-penetration-testing/scripts/code_security_scanner.py .
289
+ ### Example 2 Ad-hoc header check
218
290
 
219
- # 3. If the project has a deployed URL, scan it too
220
- python3 ${CLAUDE_PLUGIN_ROOT}/skills/performing-penetration-testing/scripts/security_scanner.py https://the-deployed-url.com
221
291
  ```
292
+ User: "Check security headers on https://app.acme.example"
293
+ ```
294
+
295
+ Orchestrator routes:
222
296
 
223
- ### Code-only audit for secrets
297
+ 1. `confirming-pentest-authorization` (operator must confirm authz; fast path for own-system testing)
298
+ 2. `checking-http-security-headers https://app.acme.example`
224
299
 
225
- User: "Check this codebase for hardcoded secrets"
300
+ ### Example 3 Dependency audit
226
301
 
227
- ```bash
228
- python3 ${CLAUDE_PLUGIN_ROOT}/skills/performing-penetration-testing/scripts/code_security_scanner.py . --tools regex --severity high
302
+ ```
303
+ User: "Audit dependencies in /path/to/project"
229
304
  ```
230
305
 
231
- ## Output
306
+ Orchestrator routes:
232
307
 
233
- All scanners produce structured security reports:
308
+ 1. `auditing-npm-dependencies /path/to/project` (if `package.json` present)
309
+ 2. `auditing-python-dependencies /path/to/project` (if Python project present)
310
+ 3. (if either produced HIGH/CRITICAL findings) `tracing-transitive-vulnerabilities /path/to/project --audit-input <previous output>`
234
311
 
235
- - **Console report**: Markdown-formatted findings with severity, description, and remediation
236
- - **JSON report**: Machine-readable output via `--output` flag for CI integration
237
- - **Exit codes**: 0 = no critical/high findings, 1 = critical/high findings found
238
- - **Risk score**: security_scanner.py provides a 0-100 score (100 = most secure)
239
- - **Severity levels**: critical, high, medium, low, info for each finding
240
- - **Remediation guidance**: Specific fix instructions for each finding
312
+ ## Output
241
313
 
242
- ## Error Handling
314
+ The orchestrator's output is the COMPOSITION of the called skills'
315
+ outputs. The canonical end-state deliverables of a full engagement:
243
316
 
244
- **Missing dependencies:**
245
- If a scanner fails because a tool isn't installed, run the setup script:
246
- ```bash
247
- bash ${CLAUDE_PLUGIN_ROOT}/skills/performing-penetration-testing/scripts/setup_pentest_env.sh
248
- ```
317
+ - `engagement/findings/all-with-owasp.jsonl` — enriched unified findings
318
+ - `engagement/reports/vulnerability-report.md` deep technical report
319
+ - `engagement/reports/owasp-coverage.md` — OWASP A0X rollup
320
+ - `engagement/reports/executive-summary.md` — C-level / board summary
321
+ - `engagement/manifest.sha256` (+ optional `.asc`) — chain-of-custody manifest
322
+ - `engagement/<archive>.tar.gz` — portable archive
249
323
 
250
- **Connection errors:**
251
- If security_scanner.py can't reach the target URL:
252
- - Verify the URL is correct and accessible
253
- - Check if the site requires VPN or special network access
254
- - Try with `--timeout 30` for slow servers
324
+ ## Error Handling
255
325
 
256
- **Permission errors:**
257
- If code_security_scanner.py can't read files:
258
- - Check file permissions in the target directory
259
- - Exclude protected directories with `--exclude`
326
+ The orchestrator delegates error handling to each invoked skill.
327
+ Cluster 5 errors (missing ROE, missing scope) HALT the engagement.
328
+ Cluster 1-4 errors (scanner missing, network unreachable) emit
329
+ INFO findings and continue. Cluster 6 errors (missing source
330
+ findings) emit HIGH operational findings and continue with a
331
+ partial deliverable.
260
332
 
261
333
  ## Resources
262
334
 
263
- For detailed reference material, see:
264
- - `references/OWASP_TOP_10.md` -- OWASP Top 10 risks with scanner mapping
265
- - `references/SECURITY_HEADERS.md` -- HTTP security header implementation guide
266
- - `references/REMEDIATION_PLAYBOOK.md` -- Copy-paste fix templates
335
+ - `references/OWASP_TOP_10.md` OWASP Top 10 risks (legacy v2
336
+ reference; the canonical OWASP table is now in
337
+ `mapping-findings-to-owasp-top10/references/THEORY.md`)
338
+ - `references/SECURITY_HEADERS.md` HTTP security header
339
+ implementation guide
340
+ - `references/REMEDIATION_PLAYBOOK.md` — copy-paste fix templates
341
+ - Per-skill `THEORY.md` + `PLAYBOOK.md` files under each
342
+ `skills/<skill-name>/references/`
343
+
344
+ ## v3.0.0 release notes
345
+
346
+ Released 2026-06-03. Major changes:
347
+
348
+ - 25 narrow heavy-hitter skills replace the v2 3-script monolith
349
+ - New cluster 5 (engagement governance) and cluster 6 (reporting)
350
+ - Canonical `lib/finding.py` + `lib/report.py` schema across all skills
351
+ - `disallowed-tools` defense-in-depth for high-risk patterns (rm, curl, wget, .env edits)
352
+ - v2 scripts (`security_scanner.py`, `dependency_auditor.py`,
353
+ `code_security_scanner.py`) preserved as backward-compatible
354
+ scripts under `scripts/`
355
+
356
+ Migration: existing v2 invocations continue to work. New work
357
+ should use the narrow skills directly. See the backward-compat
358
+ table above for the v2 → v3 mapping.