/spring-boot-skills:pentest-auditfrom Spring Boot Skills
Runs OWASP ZAP DAST scans and manual probes for auth, headers, CORS, actuator, and error leakage on a running Spring Boot app. Produces a findings report with fixes. Use when asked to pentest an app or audit end-to-end security.
Ships in Spring Boot Skills. 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.
Attacks a running Spring Boot app like an external adversary, then reports what held and what
broke. Runtime testing only — build-time scanning (dependencies, SBOM, container images) belongs
to security-hardening.
SKILL_DIR = directory containing this SKILL.md file.
Only ever run this against apps the user owns or is authorized to test. Confirm the target is theirs before sending a single probe.
Load SKILL_DIR/references/pentest-checklist.md before Step 4 — it has the exact probe commands
and pass/fail criteria.
| Field | Required | Notes |
|---|---|---|
targetUrl | No | http://localhost:8080 (default) |
authToken | No | valid JWT/session for authenticated probes — ask the user |
openApiUrl | No | auto-detected: try /v3/api-docs |
scope | No | path prefix to limit scanning (e.g. /api) |
If the app handles real user data or runs beyond localhost, confirm written authorization before continuing.
Next: read the project to know what you are attacking.
cat pom.xml
grep -rn "SecurityFilterChain\|@PreAuthorize\|permitAll" src/main/java/ | head -20
cat src/main/resources/application.yml 2>/dev/null || cat src/main/resources/application.properties
grep -rn "management.endpoints\|actuator" src/main/resources/ 2>/dev/null
Note for later: which endpoints exist, which are public, whether Spring Security is present, and what actuator exposes.
Next: quick static sweep before spending time on runtime probes.
Fast greps that often end the audit early:
grep -rn "csrf.disable\|csrf(AbstractHttpConfigurer::disable)" src/main/java/
grep -rn "permitAll" src/main/java/
grep -rn "password\s*=\s*\"\|secret\s*=\s*\"\|apiKey\s*=\s*\"" src/main/ --include=*.java --include=*.yml
grep -rn "DEBUG\|TRACE" src/main/resources/application.yml 2>/dev/null
grep -rn "allowedOrigins(\"\\*\")\|allowedOriginPatterns(\"\\*\")" src/main/java/
Each hit is a candidate finding — confirm or discard it with a runtime probe in Step 4.
Next: start the app.
./mvnw spring-boot:run
# or, if docker-compose.yml exists:
docker compose up -d
Wait for readiness:
until curl -sf -o /dev/null http://localhost:8080/actuator/health || curl -sf -o /dev/null http://localhost:8080/; do sleep 2; done
If the app needs external services (database, broker), use the project's compose file — do not stub them; the audit must hit the real stack.
Next: manual probes.
Work through SKILL_DIR/references/pentest-checklist.md top to bottom. For every probe record:
the command, the response evidence, and PASS or FAIL with one line of why.
Do not skip the authenticated probes when authToken was provided — IDOR and method tampering
only show up with a valid identity.
Next: automated DAST with ZAP.
ZAP runs in Docker; the image is ghcr.io/zaproxy/zaproxy:2.17.0. Before writing, confirm
2.17.0 is still the latest release (see https://github.com/zaproxy/zaproxy/releases/tag/v2.17.0):
curl -s "https://api.github.com/repos/zaproxy/zaproxy/releases/latest" \
| python3 -c "import json,sys; print(json.load(sys.stdin)['tag_name'])"
Baseline scan (passive + light active, safe default):
docker run --rm --network host -v "$PWD/zap:/zap/wrk:rw" \
ghcr.io/zaproxy/zaproxy:2.17.0 zap-baseline.py \
-t http://localhost:8080 -r zap/baseline-report.html
API scan when an OpenAPI doc exists (much better coverage than spidering):
docker run --rm --network host -v "$PWD/zap:/zap/wrk:rw" \
ghcr.io/zaproxy/zaproxy:2.17.0 zap-api-scan.py \
-t http://localhost:8080/v3/api-docs -f openapi -r zap/api-report.html
Notes:
--network host so the container reaches localhost; on Docker Desktop use
host.docker.internal as the target instead.-z "-connection timeoutInMs=10000" if the app is slow.zap-full-scan.py) mutates data aggressively — only with explicit user
approval, never against shared environments.If there is no OpenAPI doc, offer to add one with api-design — the API scan is where ZAP earns
its keep.
Next: write the report.
Copy SKILL_DIR/assets/templates/pentest-report.md to pentest-report.md in the project root
and fill it in:
Hand off fixes:
spring-security.security-hardening.api-design.Next step for the user: fix the Critical/High findings, then re-run this audit to confirm.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub dancan254/spring-boot-skills --plugin spring-boot-skills17 skills in this plugin
/api-designAdd OpenAPI docs and REST conventions to an existing Spring Boot 4 Maven project — SpringDoc, API versioning, ProblemDetail error schemas, DTO conventions. Use when asked to add OpenAPI or Swagger, document or version an API, or define REST conventions. Not for auth — use spring-security./devops-scaffoldAdd or update Dockerfile, docker-compose.yml, and GitHub Actions CI for an existing Spring Boot Maven project; reads the project first. Use when asked to dockerize a project, add CI or GitHub Actions, or set up DevOps. Not for security scanning — use security-hardening. Not for new projects — use spring-scaffold./http-resilienceMake outbound HTTP calls resilient in an existing Spring Boot 4 Maven project — circuit breakers, retries, and timeouts with RestClient and Resilience4j, plus tests that prove failures degrade gracefully. Use when asked to add retries or a circuit breaker, call external APIs reliably, or protect against a flaky downstream. Not for inbound rate limiting — use redis-setup./kafka-setupAdd Apache Kafka producers and consumers to an existing Spring Boot 4 Maven project — Spring Kafka config, JSON events, dead-letter topics, Testcontainers tests, compose wiring. Use when asked to add Kafka, Kafka topics, or event streaming. If messaging is requested without naming a broker, ask Kafka or RabbitMQ first./legacy-migrationMigrate a Spring Boot 2.x or 3.x app to Boot 4.x (Maven or Gradle) — audit first, then OpenRewrite-led version hops with a green build per hop, covering Jakarta, Jackson 3, modular starters, and runtime-only breakages. Use when asked to upgrade or migrate Spring Boot, or fix javax imports after an upgrade. Not for new projects./mcp-serverExpose an existing Spring Boot 4 Maven service as an MCP server with Spring AI — transport choice, @McpTool tools, tool hints, endpoint security, and verification with a real MCP client. Use when asked to add MCP, expose tools to an LLM or agent, or let an AI call my backend. Not for RAG — use spring-ai-rag.Other plugins' skills for the same job