@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.
- package/.claude-plugin/plugin.json +8 -3
- package/README.md +8 -0
- package/commands/pentest.md +5 -0
- package/package.json +8 -3
- package/skills/analyzing-tls-config/SKILL.md +221 -0
- package/skills/analyzing-tls-config/references/AUTHORIZATION.md +133 -0
- package/skills/analyzing-tls-config/references/PLAYBOOK.md +267 -0
- package/skills/analyzing-tls-config/references/THEORY.md +128 -0
- package/skills/analyzing-tls-config/scripts/analyze_tls.py +415 -0
- package/skills/auditing-cors-policy/SKILL.md +186 -0
- package/skills/auditing-cors-policy/references/PLAYBOOK.md +220 -0
- package/skills/auditing-cors-policy/references/THEORY.md +142 -0
- package/skills/auditing-cors-policy/scripts/audit_cors.py +350 -0
- package/skills/auditing-npm-dependencies/SKILL.md +254 -0
- package/skills/auditing-npm-dependencies/references/PLAYBOOK.md +175 -0
- package/skills/auditing-npm-dependencies/references/THEORY.md +122 -0
- package/skills/auditing-npm-dependencies/scripts/audit_npm.py +408 -0
- package/skills/auditing-python-dependencies/SKILL.md +251 -0
- package/skills/auditing-python-dependencies/references/PLAYBOOK.md +193 -0
- package/skills/auditing-python-dependencies/references/THEORY.md +122 -0
- package/skills/auditing-python-dependencies/scripts/audit_python.py +459 -0
- package/skills/checking-http-security-headers/SKILL.md +176 -0
- package/skills/checking-http-security-headers/references/PLAYBOOK.md +212 -0
- package/skills/checking-http-security-headers/references/THEORY.md +137 -0
- package/skills/checking-http-security-headers/scripts/check_headers.py +362 -0
- package/skills/checking-license-compliance/SKILL.md +225 -0
- package/skills/checking-license-compliance/references/PLAYBOOK.md +161 -0
- package/skills/checking-license-compliance/references/THEORY.md +152 -0
- package/skills/checking-license-compliance/scripts/check_licenses.py +461 -0
- package/skills/composing-vulnerability-report/SKILL.md +212 -0
- package/skills/composing-vulnerability-report/references/PLAYBOOK.md +180 -0
- package/skills/composing-vulnerability-report/references/THEORY.md +178 -0
- package/skills/composing-vulnerability-report/scripts/compose_report.py +396 -0
- package/skills/confirming-pentest-authorization/SKILL.md +247 -0
- package/skills/confirming-pentest-authorization/references/PLAYBOOK.md +189 -0
- package/skills/confirming-pentest-authorization/references/THEORY.md +167 -0
- package/skills/confirming-pentest-authorization/scripts/check_authorization.py +457 -0
- package/skills/defining-pentest-scope/SKILL.md +227 -0
- package/skills/defining-pentest-scope/references/PLAYBOOK.md +238 -0
- package/skills/defining-pentest-scope/references/THEORY.md +170 -0
- package/skills/defining-pentest-scope/scripts/define_scope.py +472 -0
- package/skills/detecting-command-injection-patterns/SKILL.md +144 -0
- package/skills/detecting-command-injection-patterns/references/PLAYBOOK.md +302 -0
- package/skills/detecting-command-injection-patterns/references/THEORY.md +206 -0
- package/skills/detecting-command-injection-patterns/scripts/scan_cmdi.py +290 -0
- package/skills/detecting-debug-endpoints/SKILL.md +207 -0
- package/skills/detecting-debug-endpoints/references/PLAYBOOK.md +402 -0
- package/skills/detecting-debug-endpoints/references/THEORY.md +218 -0
- package/skills/detecting-debug-endpoints/scripts/probe_debug.py +518 -0
- package/skills/detecting-directory-listing/SKILL.md +206 -0
- package/skills/detecting-directory-listing/references/PLAYBOOK.md +277 -0
- package/skills/detecting-directory-listing/references/THEORY.md +203 -0
- package/skills/detecting-directory-listing/scripts/probe_directory_listing.py +180 -0
- package/skills/detecting-eval-exec-usage/SKILL.md +128 -0
- package/skills/detecting-eval-exec-usage/references/PLAYBOOK.md +306 -0
- package/skills/detecting-eval-exec-usage/references/THEORY.md +159 -0
- package/skills/detecting-eval-exec-usage/scripts/scan_eval.py +223 -0
- package/skills/detecting-exposed-secrets-files/SKILL.md +179 -0
- package/skills/detecting-exposed-secrets-files/references/PLAYBOOK.md +274 -0
- package/skills/detecting-exposed-secrets-files/references/THEORY.md +174 -0
- package/skills/detecting-exposed-secrets-files/scripts/probe_secrets.py +207 -0
- package/skills/detecting-insecure-deserialization/SKILL.md +148 -0
- package/skills/detecting-insecure-deserialization/references/PLAYBOOK.md +333 -0
- package/skills/detecting-insecure-deserialization/references/THEORY.md +199 -0
- package/skills/detecting-insecure-deserialization/scripts/scan_deserialization.py +250 -0
- package/skills/detecting-sql-injection-patterns/SKILL.md +161 -0
- package/skills/detecting-sql-injection-patterns/references/PLAYBOOK.md +317 -0
- package/skills/detecting-sql-injection-patterns/references/THEORY.md +261 -0
- package/skills/detecting-sql-injection-patterns/scripts/scan_sqli.py +354 -0
- package/skills/detecting-ssl-cert-issues/SKILL.md +182 -0
- package/skills/detecting-ssl-cert-issues/references/PLAYBOOK.md +203 -0
- package/skills/detecting-ssl-cert-issues/references/THEORY.md +133 -0
- package/skills/detecting-ssl-cert-issues/scripts/check_cert_chain.py +481 -0
- package/skills/detecting-weak-cryptography/SKILL.md +147 -0
- package/skills/detecting-weak-cryptography/references/PLAYBOOK.md +466 -0
- package/skills/detecting-weak-cryptography/references/THEORY.md +194 -0
- package/skills/detecting-weak-cryptography/scripts/scan_weak_crypto.py +417 -0
- package/skills/fingerprinting-server-software/SKILL.md +191 -0
- package/skills/fingerprinting-server-software/references/PLAYBOOK.md +337 -0
- package/skills/fingerprinting-server-software/references/THEORY.md +183 -0
- package/skills/fingerprinting-server-software/scripts/fingerprint_server.py +347 -0
- package/skills/generating-executive-summary/SKILL.md +261 -0
- package/skills/generating-executive-summary/references/PLAYBOOK.md +201 -0
- package/skills/generating-executive-summary/references/THEORY.md +195 -0
- package/skills/generating-executive-summary/scripts/exec_summary.py +538 -0
- package/skills/mapping-findings-to-owasp-top10/SKILL.md +235 -0
- package/skills/mapping-findings-to-owasp-top10/references/PLAYBOOK.md +193 -0
- package/skills/mapping-findings-to-owasp-top10/references/THEORY.md +160 -0
- package/skills/mapping-findings-to-owasp-top10/scripts/map_owasp.py +540 -0
- package/skills/performing-penetration-testing/SKILL.md +282 -190
- package/skills/performing-penetration-testing/references/OWASP_TOP_10.md +22 -0
- package/skills/performing-penetration-testing/references/REMEDIATION_PLAYBOOK.md +46 -0
- package/skills/performing-penetration-testing/references/SECURITY_HEADERS.md +41 -0
- package/skills/performing-penetration-testing/scripts/code_security_scanner.py +144 -79
- package/skills/performing-penetration-testing/scripts/dependency_auditor.py +116 -93
- package/skills/performing-penetration-testing/scripts/security_scanner.py +574 -446
- package/skills/probing-dangerous-http-methods/SKILL.md +182 -0
- package/skills/probing-dangerous-http-methods/references/PLAYBOOK.md +234 -0
- package/skills/probing-dangerous-http-methods/references/THEORY.md +145 -0
- package/skills/probing-dangerous-http-methods/scripts/probe_methods.py +263 -0
- package/skills/recording-pentest-engagement/SKILL.md +253 -0
- package/skills/recording-pentest-engagement/references/PLAYBOOK.md +203 -0
- package/skills/recording-pentest-engagement/references/THEORY.md +195 -0
- package/skills/recording-pentest-engagement/scripts/record_engagement.py +461 -0
- package/skills/scanning-for-hardcoded-secrets/SKILL.md +215 -0
- package/skills/scanning-for-hardcoded-secrets/references/PLAYBOOK.md +325 -0
- package/skills/scanning-for-hardcoded-secrets/references/THEORY.md +175 -0
- package/skills/scanning-for-hardcoded-secrets/scripts/scan_secrets.py +395 -0
- package/skills/tracing-transitive-vulnerabilities/SKILL.md +235 -0
- package/skills/tracing-transitive-vulnerabilities/references/PLAYBOOK.md +233 -0
- package/skills/tracing-transitive-vulnerabilities/references/THEORY.md +138 -0
- package/skills/tracing-transitive-vulnerabilities/scripts/trace_vulns.py +484 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "penetration-tester",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "25-skill pentest pack with engagement governance, network/code/dependency scans, OWASP Top 10 mapping, and exec-readable reporting. Heavy-hitter compliant; chain-of-custody attestable.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jeremy Longshore",
|
|
7
7
|
"email": "[email protected]"
|
|
@@ -13,7 +13,12 @@
|
|
|
13
13
|
"penetration-testing",
|
|
14
14
|
"pentesting",
|
|
15
15
|
"owasp",
|
|
16
|
-
"
|
|
16
|
+
"owasp-top-10",
|
|
17
|
+
"vulnerability-scanning",
|
|
18
|
+
"dependency-audit",
|
|
19
|
+
"license-compliance",
|
|
20
|
+
"engagement-governance",
|
|
21
|
+
"chain-of-custody",
|
|
17
22
|
"agent-skills"
|
|
18
23
|
]
|
|
19
24
|
}
|
package/README.md
CHANGED
|
@@ -38,21 +38,25 @@ Requires Python 3.9+. The setup script installs `requests`, `bandit`, and
|
|
|
38
38
|
## Quick Start
|
|
39
39
|
|
|
40
40
|
**Check security headers on a URL:**
|
|
41
|
+
|
|
41
42
|
```
|
|
42
43
|
> Check the security headers on https://example.com
|
|
43
44
|
```
|
|
44
45
|
|
|
45
46
|
**Audit project dependencies:**
|
|
47
|
+
|
|
46
48
|
```
|
|
47
49
|
> Audit the dependencies in this project for vulnerabilities
|
|
48
50
|
```
|
|
49
51
|
|
|
50
52
|
**Scan code for security issues:**
|
|
53
|
+
|
|
51
54
|
```
|
|
52
55
|
> Scan this codebase for hardcoded secrets and security issues
|
|
53
56
|
```
|
|
54
57
|
|
|
55
58
|
**Full security audit:**
|
|
59
|
+
|
|
56
60
|
```
|
|
57
61
|
> Run a full security audit on this project
|
|
58
62
|
```
|
|
@@ -70,6 +74,7 @@ python3 scripts/security_scanner.py https://example.com --output report.json
|
|
|
70
74
|
```
|
|
71
75
|
|
|
72
76
|
**Checks:**
|
|
77
|
+
|
|
73
78
|
- Security headers (CSP, HSTS, X-Frame-Options, X-Content-Type-Options,
|
|
74
79
|
Referrer-Policy, Permissions-Policy)
|
|
75
80
|
- SSL/TLS certificate validity and expiry
|
|
@@ -88,6 +93,7 @@ python3 scripts/dependency_auditor.py . --scanners npm,pip --output findings.jso
|
|
|
88
93
|
```
|
|
89
94
|
|
|
90
95
|
**Supports:**
|
|
96
|
+
|
|
91
97
|
- npm projects (via `npm audit`)
|
|
92
98
|
- Python projects (via `pip-audit`)
|
|
93
99
|
- Auto-detects project type from manifest files
|
|
@@ -103,6 +109,7 @@ python3 scripts/code_security_scanner.py . --exclude "test_*,*_test.py"
|
|
|
103
109
|
```
|
|
104
110
|
|
|
105
111
|
**Detects:**
|
|
112
|
+
|
|
106
113
|
- Hardcoded secrets (API keys, AWS keys, passwords, tokens)
|
|
107
114
|
- SQL injection (string concatenation in queries)
|
|
108
115
|
- Command injection (os.system, subprocess with shell=True)
|
|
@@ -114,6 +121,7 @@ python3 scripts/code_security_scanner.py . --exclude "test_*,*_test.py"
|
|
|
114
121
|
## Output
|
|
115
122
|
|
|
116
123
|
All scanners produce:
|
|
124
|
+
|
|
117
125
|
- Markdown-formatted reports for terminal display
|
|
118
126
|
- JSON reports via `--output` for programmatic use
|
|
119
127
|
- Risk scoring with severity levels (critical, high, medium, low, info)
|
package/commands/pentest.md
CHANGED
|
@@ -32,21 +32,25 @@ Ask the user what they want to test:
|
|
|
32
32
|
Based on the selected scope, run the appropriate scripts from the plugin:
|
|
33
33
|
|
|
34
34
|
### Web Application Scan
|
|
35
|
+
|
|
35
36
|
```bash
|
|
36
37
|
python3 ${CLAUDE_PLUGIN_ROOT}/skills/performing-penetration-testing/scripts/security_scanner.py TARGET_URL --verbose
|
|
37
38
|
```
|
|
38
39
|
|
|
39
40
|
### Dependency Audit
|
|
41
|
+
|
|
40
42
|
```bash
|
|
41
43
|
python3 ${CLAUDE_PLUGIN_ROOT}/skills/performing-penetration-testing/scripts/dependency_auditor.py TARGET_DIR --verbose
|
|
42
44
|
```
|
|
43
45
|
|
|
44
46
|
### Code Security Scan
|
|
47
|
+
|
|
45
48
|
```bash
|
|
46
49
|
python3 ${CLAUDE_PLUGIN_ROOT}/skills/performing-penetration-testing/scripts/code_security_scanner.py TARGET_DIR --verbose
|
|
47
50
|
```
|
|
48
51
|
|
|
49
52
|
Save JSON reports for any scan that finds critical or high issues:
|
|
53
|
+
|
|
50
54
|
```bash
|
|
51
55
|
python3 SCANNER --output /tmp/security-report-$(date +%Y%m%d).json
|
|
52
56
|
```
|
|
@@ -72,6 +76,7 @@ Offer to apply code fixes directly for code-level findings.
|
|
|
72
76
|
## Step 6: Generate Report
|
|
73
77
|
|
|
74
78
|
If the user wants a saved report, combine all findings into a single JSON file:
|
|
79
|
+
|
|
75
80
|
```bash
|
|
76
81
|
# Reports are saved via the --output flag on each scanner
|
|
77
82
|
```
|
package/package.json
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentsolutionsio/penetration-tester",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "3.0.4",
|
|
4
|
+
"description": "25-skill pentest pack with engagement governance, network/code/dependency scans, OWASP Top 10 mapping, and exec-readable reporting. Heavy-hitter compliant; chain-of-custody attestable.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"security",
|
|
7
7
|
"penetration-testing",
|
|
8
8
|
"pentesting",
|
|
9
9
|
"owasp",
|
|
10
|
-
"
|
|
10
|
+
"owasp-top-10",
|
|
11
|
+
"vulnerability-scanning",
|
|
12
|
+
"dependency-audit",
|
|
13
|
+
"license-compliance",
|
|
14
|
+
"engagement-governance",
|
|
15
|
+
"chain-of-custody",
|
|
11
16
|
"agent-skills",
|
|
12
17
|
"claude-code",
|
|
13
18
|
"claude-plugin",
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: analyzing-tls-config
|
|
3
|
+
description: |
|
|
4
|
+
Analyze a target's TLS configuration — negotiated protocol version, cipher
|
|
5
|
+
suite, certificate chain, expiry, and downgrade vectors.
|
|
6
|
+
Use when: SOC2 auditor flagged your endpoint for "weak TLS" but you don't
|
|
7
|
+
know which control failed (TSC CC6.7 transmission integrity vs CC6.6
|
|
8
|
+
encryption) or which cipher is the problem.
|
|
9
|
+
Threshold: any negotiated TLSv1.0 or TLSv1.1, OR a cipher with RC4 / 3DES /
|
|
10
|
+
null / EXPORT, OR a cert with under 30 days to expiry, OR a chain that fails
|
|
11
|
+
hostname verification.
|
|
12
|
+
Trigger with: "audit tls", "check ssl config", "weak tls", "analyze tls".
|
|
13
|
+
allowed-tools:
|
|
14
|
+
- Read
|
|
15
|
+
- Bash(python3:*)
|
|
16
|
+
- Bash(openssl:*)
|
|
17
|
+
disallowed-tools:
|
|
18
|
+
- Bash(rm:*)
|
|
19
|
+
- Edit(/etc/*)
|
|
20
|
+
- Write(/etc/*)
|
|
21
|
+
version: 3.0.0-dev
|
|
22
|
+
author: Jeremy Longshore <jeremy@intentsolutions.io>
|
|
23
|
+
license: MIT
|
|
24
|
+
compatibility: Designed for Claude Code
|
|
25
|
+
tags:
|
|
26
|
+
- security
|
|
27
|
+
- tls
|
|
28
|
+
- ssl
|
|
29
|
+
- pentest
|
|
30
|
+
- transport-layer
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
# Analyzing TLS Configuration
|
|
34
|
+
|
|
35
|
+
## Overview
|
|
36
|
+
|
|
37
|
+
This skill audits a target's TLS posture against current best practice
|
|
38
|
+
(NIST SP 800-52r2, Mozilla TLS Configuration Guidelines, PCI DSS v4.0 Req
|
|
39
|
+
4.2.1.1). It reports specific findings — not "your TLS is weak" but
|
|
40
|
+
"your server negotiated TLSv1.0 with RC4-SHA — see remediation".
|
|
41
|
+
|
|
42
|
+
## When the skill produces findings
|
|
43
|
+
|
|
44
|
+
Specific failure thresholds, in order of severity:
|
|
45
|
+
|
|
46
|
+
| Finding | Severity | Threshold | Affected control |
|
|
47
|
+
|---|---|---|---|
|
|
48
|
+
| TLSv1.0 or TLSv1.1 negotiated | **HIGH** | Any handshake completes at v1.0/v1.1 | NIST 800-52r2 §3.1, PCI DSS Req 4.2.1.1 |
|
|
49
|
+
| Null / EXPORT / anonymous cipher | **CRITICAL** | Any null / EXPORT / aNULL in negotiated suite | NIST 800-52r2 §3.3.1 |
|
|
50
|
+
| RC4 / 3DES cipher | **HIGH** | Sweet32, RC4 biases | NIST 800-52r2 §3.3.1, PCI DSS Req 4.2.1.1 |
|
|
51
|
+
| Cert expires in <7 days | **CRITICAL** | notAfter - now ≤ 7d | NIST 800-52r2 §4.1 |
|
|
52
|
+
| Cert expires in <30 days | **HIGH** | notAfter - now ≤ 30d | NIST 800-52r2 §4.1 |
|
|
53
|
+
| Cert hostname mismatch | **HIGH** | SAN/CN doesn't match target host | RFC 6125 |
|
|
54
|
+
| Self-signed or untrusted CA | **MEDIUM** | Chain doesn't validate to system CA | Mozilla TLS Guidelines |
|
|
55
|
+
| Weak key (RSA < 2048, ECDSA < 256) | **HIGH** | Public key bits below threshold | NIST 800-52r2 §3.4 |
|
|
56
|
+
| Forward secrecy absent | **MEDIUM** | No ECDHE / DHE in negotiated suite | NIST 800-52r2 §3.3.1 |
|
|
57
|
+
|
|
58
|
+
## Prerequisites
|
|
59
|
+
|
|
60
|
+
- Python 3.9+
|
|
61
|
+
- `openssl` CLI (used for cipher enumeration the Python `ssl` module can't introspect directly)
|
|
62
|
+
- Authorization to test the target (active scan — see `references/AUTHORIZATION.md`)
|
|
63
|
+
|
|
64
|
+
## Instructions
|
|
65
|
+
|
|
66
|
+
### Step 1 — Confirm Authorization
|
|
67
|
+
|
|
68
|
+
Active scan. Before invoking the scanner, ask the user verbatim:
|
|
69
|
+
|
|
70
|
+
> "Do you have authorization to perform TLS testing on this target?
|
|
71
|
+
> I need confirmation before proceeding."
|
|
72
|
+
|
|
73
|
+
If the user says yes, proceed. If unsure, ask them to obtain written
|
|
74
|
+
authorization. See `references/AUTHORIZATION.md` for the attestation
|
|
75
|
+
pattern. **Never run the scanner against a target the user does not own
|
|
76
|
+
or have written permission to test.**
|
|
77
|
+
|
|
78
|
+
### Step 2 — Run the scanner
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
python3 ${CLAUDE_PLUGIN_ROOT}/skills/analyzing-tls-config/scripts/analyze_tls.py \
|
|
82
|
+
https://target.example.com \
|
|
83
|
+
--authorized
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
The `--authorized` flag is required for any non-loopback / non-RFC1918
|
|
87
|
+
target (gate enforced in `lib/authz_check.py`).
|
|
88
|
+
|
|
89
|
+
Options:
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
Usage: analyze_tls.py URL [OPTIONS]
|
|
93
|
+
|
|
94
|
+
Options:
|
|
95
|
+
--authorized Attest authorization for non-local targets (required)
|
|
96
|
+
--port PORT Target port (default: 443)
|
|
97
|
+
--output FILE Write findings to FILE (default: stdout)
|
|
98
|
+
--format FMT json | jsonl | markdown (default: markdown)
|
|
99
|
+
--min-severity SEV Floor: critical|high|medium|low|info (default: info)
|
|
100
|
+
--timeout SECS Per-probe timeout (default: 10)
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Step 3 — Interpret findings
|
|
104
|
+
|
|
105
|
+
The scanner emits one `Finding` per detected issue. For each:
|
|
106
|
+
|
|
107
|
+
1. Read the **severity** band — CRITICAL and HIGH require immediate action.
|
|
108
|
+
2. Read the **affected control** — map to the framework the user is audited against.
|
|
109
|
+
3. Read the **remediation** — copy-paste-ready config snippets for nginx /
|
|
110
|
+
Caddy / Apache / HAProxy / AWS ALB / GCP LB.
|
|
111
|
+
4. Cross-reference `references/PLAYBOOK.md` for the full template if the
|
|
112
|
+
inline remediation is just a one-liner.
|
|
113
|
+
|
|
114
|
+
### Step 4 — Report to user
|
|
115
|
+
|
|
116
|
+
Group findings by severity. For each, lead with the specific symptom
|
|
117
|
+
("TLSv1.0 negotiated") rather than the category ("transport security
|
|
118
|
+
problem"). Pair every finding with one remediation step the user can
|
|
119
|
+
take in the next 30 minutes.
|
|
120
|
+
|
|
121
|
+
### Step 5 — Cross-skill chaining (optional)
|
|
122
|
+
|
|
123
|
+
If the user is doing a broader audit:
|
|
124
|
+
|
|
125
|
+
- After this skill runs, suggest **`detecting-ssl-cert-issues`** (skill #2)
|
|
126
|
+
for deeper cert-chain analysis (revocation, CT log presence,
|
|
127
|
+
intermediate-cert order).
|
|
128
|
+
- For HTTP-layer security headers that complement TLS findings, suggest
|
|
129
|
+
**`checking-http-security-headers`** (skill #4) to audit HSTS preload
|
|
130
|
+
status, which is meaningless without proper TLS.
|
|
131
|
+
|
|
132
|
+
## Examples
|
|
133
|
+
|
|
134
|
+
### Example 1 — SOC2 audit prep on a production endpoint
|
|
135
|
+
|
|
136
|
+
User says: "Auditor flagged our checkout endpoint for weak TLS. Help me figure out what's wrong."
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
python3 ${CLAUDE_PLUGIN_ROOT}/skills/analyzing-tls-config/scripts/analyze_tls.py \
|
|
140
|
+
https://checkout.example.com \
|
|
141
|
+
--authorized \
|
|
142
|
+
--min-severity high
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Expected output: a Markdown report with each HIGH/CRITICAL finding, the
|
|
146
|
+
specific NIST/PCI control it violates, and a copy-paste remediation
|
|
147
|
+
snippet for the target server type. Pair with `references/PLAYBOOK.md`
|
|
148
|
+
for full templates.
|
|
149
|
+
|
|
150
|
+
### Example 2 — CI integration on a staging gate
|
|
151
|
+
|
|
152
|
+
Pin the scan into the deploy pipeline before promotion:
|
|
153
|
+
|
|
154
|
+
```yaml
|
|
155
|
+
- name: TLS posture check (staging)
|
|
156
|
+
run: |
|
|
157
|
+
python3 plugins/security/penetration-tester/skills/analyzing-tls-config/scripts/analyze_tls.py \
|
|
158
|
+
https://staging.example.com \
|
|
159
|
+
--authorized \
|
|
160
|
+
--min-severity high \
|
|
161
|
+
--format json \
|
|
162
|
+
--output tls-report.json
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Exit code 1 fails the deploy if any HIGH/CRITICAL finding lands. The
|
|
166
|
+
JSON report uploads as a build artifact for the security team to
|
|
167
|
+
triage.
|
|
168
|
+
|
|
169
|
+
### Example 3 — Quick local check during dev
|
|
170
|
+
|
|
171
|
+
For local services (carve-out applies — no `--authorized` needed):
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
python3 ${CLAUDE_PLUGIN_ROOT}/skills/analyzing-tls-config/scripts/analyze_tls.py \
|
|
175
|
+
https://localhost:8443
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Useful when prototyping TLS-terminating proxies (Caddy, Traefik) before
|
|
179
|
+
shipping to staging.
|
|
180
|
+
|
|
181
|
+
## Output
|
|
182
|
+
|
|
183
|
+
Each finding includes:
|
|
184
|
+
|
|
185
|
+
- `skill_id`: `analyzing-tls-config`
|
|
186
|
+
- `title`: imperative — e.g. "Server negotiates obsolete TLSv1.0"
|
|
187
|
+
- `severity`: critical / high / medium / low / info
|
|
188
|
+
- `target`: the URL scanned
|
|
189
|
+
- `detail`: technical explanation of WHY this finding triggered
|
|
190
|
+
- `remediation`: specific fix
|
|
191
|
+
- `cvss_score` / `cwe_id`: when applicable
|
|
192
|
+
- `affected_control`: framework + control ID (e.g. `NIST 800-52r2 §3.1`)
|
|
193
|
+
- `references`: source URLs
|
|
194
|
+
|
|
195
|
+
JSON output is pipeable to `jq` for CI integration. Markdown output is
|
|
196
|
+
human-readable for direct sharing with the engineering team.
|
|
197
|
+
|
|
198
|
+
Exit codes: `0` clean (no high/critical), `1` findings (high or critical),
|
|
199
|
+
`2` error (auth missing, target unreachable, unparseable input).
|
|
200
|
+
|
|
201
|
+
## Error Handling
|
|
202
|
+
|
|
203
|
+
**`--authorized` missing for non-local target** → exit 2 with attestation
|
|
204
|
+
message pointing to `references/AUTHORIZATION.md`. Re-run with the flag
|
|
205
|
+
after confirming authorization.
|
|
206
|
+
|
|
207
|
+
**Target unreachable** → exit 2 with the underlying socket error. Common
|
|
208
|
+
causes: firewall blocks port 443, DNS resolution failure, server not
|
|
209
|
+
listening on the configured port (try `--port`).
|
|
210
|
+
|
|
211
|
+
**Certificate chain incomplete** → finding emitted at MEDIUM severity (the
|
|
212
|
+
scanner does not bail; it captures what was sent and reports the gap).
|
|
213
|
+
|
|
214
|
+
## Resources
|
|
215
|
+
|
|
216
|
+
- `references/THEORY.md` — How TLS negotiation works, why each finding
|
|
217
|
+
matters, primary RFC references
|
|
218
|
+
- `references/PLAYBOOK.md` — Copy-paste remediation templates per finding
|
|
219
|
+
for nginx, Caddy, Apache, HAProxy, AWS ALB, GCP LB
|
|
220
|
+
- `references/AUTHORIZATION.md` — Authorization attestation pattern + ROE
|
|
221
|
+
example for active scans
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Authorization Attestation Pattern
|
|
2
|
+
|
|
3
|
+
Active security scanning against a target you don't own is a federal
|
|
4
|
+
crime in the United States (Computer Fraud and Abuse Act, 18 U.S.C. §
|
|
5
|
+
1030) and similar offenses in most jurisdictions globally. Every
|
|
6
|
+
penetration-tester v3 active-scan skill enforces a two-step attestation
|
|
7
|
+
gate so no scan fires by accident.
|
|
8
|
+
|
|
9
|
+
## The two-step gate
|
|
10
|
+
|
|
11
|
+
### Step 1 — Verbal attestation in Claude's conversation
|
|
12
|
+
|
|
13
|
+
Before invoking the scanner, Claude is instructed (via the skill's
|
|
14
|
+
SKILL.md "Step 1 — Confirm Authorization" section) to ask the user
|
|
15
|
+
verbatim:
|
|
16
|
+
|
|
17
|
+
> "Do you have authorization to perform security testing on this target?
|
|
18
|
+
> I need confirmation before proceeding."
|
|
19
|
+
|
|
20
|
+
If the user says no, or is unsure, Claude refuses to proceed and points
|
|
21
|
+
the user at the ROE template below to obtain written authorization
|
|
22
|
+
first.
|
|
23
|
+
|
|
24
|
+
### Step 2 — `--authorized` flag on the scanner
|
|
25
|
+
|
|
26
|
+
The Python scanner also requires the `--authorized` flag for any target
|
|
27
|
+
that isn't obviously local (loopback / RFC1918 / link-local). The flag
|
|
28
|
+
must be passed explicitly each invocation — there is no environment-
|
|
29
|
+
variable fallback, because CI environment variables can be set by
|
|
30
|
+
anyone with repo write access and silently authorize scans against
|
|
31
|
+
arbitrary targets.
|
|
32
|
+
|
|
33
|
+
Carve-outs (no `--authorized` needed):
|
|
34
|
+
|
|
35
|
+
- `localhost`, `127.0.0.0/8`, `::1`
|
|
36
|
+
- RFC1918 ranges: `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`
|
|
37
|
+
- Link-local: `169.254.0.0/16`, `fe80::/10`
|
|
38
|
+
|
|
39
|
+
Anything else: gate fires; scanner exits with code 2 and instructional
|
|
40
|
+
message.
|
|
41
|
+
|
|
42
|
+
## Rules of Engagement (ROE) — minimum template
|
|
43
|
+
|
|
44
|
+
Use this as the starting point for written authorization to test a
|
|
45
|
+
target you don't otherwise own. Adapt to your local legal counsel's
|
|
46
|
+
guidance; this is a working template, not a substitute for legal review.
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
RULES OF ENGAGEMENT — Security Testing Authorization
|
|
50
|
+
|
|
51
|
+
Date: [YYYY-MM-DD]
|
|
52
|
+
Authorizing party: [organization name]
|
|
53
|
+
Authorizing signatory: [name, title, contact email]
|
|
54
|
+
Tester: [your name / org]
|
|
55
|
+
Engagement period: [YYYY-MM-DD] through [YYYY-MM-DD], inclusive.
|
|
56
|
+
|
|
57
|
+
Targets in scope:
|
|
58
|
+
[URL or IP range, one per line]
|
|
59
|
+
|
|
60
|
+
Targets explicitly out of scope:
|
|
61
|
+
[URL or IP range, one per line]
|
|
62
|
+
|
|
63
|
+
Permitted test types:
|
|
64
|
+
[ ] Passive enumeration (no traffic to target)
|
|
65
|
+
[ ] Active scanning (HTTP probes, TLS handshakes, port scans)
|
|
66
|
+
[ ] Authentication testing (default credentials, weak password lists)
|
|
67
|
+
[ ] Application-layer testing (SQL injection, XSS, command injection)
|
|
68
|
+
[ ] Denial-of-service testing — DEFAULT NO; check only if explicit
|
|
69
|
+
[ ] Social engineering — DEFAULT NO; check only if explicit
|
|
70
|
+
[ ] Physical access testing — DEFAULT NO; check only if explicit
|
|
71
|
+
|
|
72
|
+
Maintenance windows:
|
|
73
|
+
[Window during which tester may operate without notification]
|
|
74
|
+
|
|
75
|
+
Notification protocol:
|
|
76
|
+
Before starting: [Slack/Email/Phone to whom]
|
|
77
|
+
On finding any CRITICAL: [Slack/Email/Phone to whom, within how long]
|
|
78
|
+
On any service outage: [Phone to whom, within how long]
|
|
79
|
+
Daily status: [Email to whom, before what time]
|
|
80
|
+
|
|
81
|
+
Stop conditions:
|
|
82
|
+
The tester WILL halt all active scanning if:
|
|
83
|
+
- Target service goes down (regardless of cause)
|
|
84
|
+
- Authorizing party requests halt
|
|
85
|
+
- A finding suggests active exploitation by a third party
|
|
86
|
+
- The engagement period ends
|
|
87
|
+
|
|
88
|
+
Data handling:
|
|
89
|
+
All findings, evidence, and reports are confidential and shared only
|
|
90
|
+
with [list]. Tester will retain copies for [N] days post-engagement,
|
|
91
|
+
after which all materials are destroyed.
|
|
92
|
+
|
|
93
|
+
Signatures:
|
|
94
|
+
Authorizing signatory: _______________ Date: ___________
|
|
95
|
+
Tester: _______________ Date: ___________
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## What the skill does NOT enforce (you have to)
|
|
99
|
+
|
|
100
|
+
The `--authorized` flag is an attestation — it does not prove
|
|
101
|
+
authorization, just records that the tester asserts it. The tester
|
|
102
|
+
remains legally responsible for the truth of that assertion.
|
|
103
|
+
|
|
104
|
+
The skill does not:
|
|
105
|
+
|
|
106
|
+
- Verify the target is in scope of a real ROE.
|
|
107
|
+
- Verify the tester is who they say.
|
|
108
|
+
- Verify the engagement period is active.
|
|
109
|
+
- Notify the target party.
|
|
110
|
+
|
|
111
|
+
These are operator responsibilities. The skill provides the
|
|
112
|
+
defense-in-depth gate so a misconfigured CI workflow or a curious
|
|
113
|
+
engineer doesn't accidentally fire active scans at production third-
|
|
114
|
+
party targets.
|
|
115
|
+
|
|
116
|
+
## When to skip the gate
|
|
117
|
+
|
|
118
|
+
Never. If you find yourself wanting to bypass the gate, that is the
|
|
119
|
+
signal to stop and obtain authorization first. The gate exists because
|
|
120
|
+
silently disabled attestation has caused real legal exposure for
|
|
121
|
+
penetration testers in the past.
|
|
122
|
+
|
|
123
|
+
If you are scanning your own loopback / RFC1918 services and the gate
|
|
124
|
+
is misfiring (e.g., your DNS resolves a public hostname to a private
|
|
125
|
+
IP), use the `--port` flag against the IP directly rather than
|
|
126
|
+
disabling the gate.
|
|
127
|
+
|
|
128
|
+
## References
|
|
129
|
+
|
|
130
|
+
- [Computer Fraud and Abuse Act (CFAA), 18 U.S.C. § 1030](https://www.law.cornell.edu/uscode/text/18/1030)
|
|
131
|
+
- [Penetration Testing Execution Standard (PTES) — Pre-engagement Interactions](http://www.pentest-standard.org/index.php/Pre-engagement)
|
|
132
|
+
- [OWASP Web Security Testing Guide v4.2 § 2.1 — Set the scope](https://owasp.org/www-project-web-security-testing-guide/v42/)
|
|
133
|
+
- [NIST SP 800-115 — Technical Guide to Information Security Testing](https://csrc.nist.gov/publications/detail/sp/800-115/final)
|