java/src/main/resources/targets/claude/skills/conditional/security/x-security-dast/SKILL.md
Dynamic Application Security Testing -- tests the running application for XSS, injection, misconfiguration, and information disclosure using OWASP ZAP or Nuclei.
npx skillsauth add edercnj/claude-environment x-security-dastInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Orchestrate Dynamic Application Security Testing against a running application. DAST complements SAST by testing from outside-in, simulating real attacks to detect runtime vulnerabilities that static analysis cannot find: missing security headers, insecure cookies, CORS misconfiguration, injection flaws, and information disclosure.
Include this skill when security.scanning.dast = true in the project configuration.
/x-security-dast --target http://localhost:8080 -- scan local app with default passive mode/x-security-dast --target http://localhost:8080 --mode active -- active scan in local/x-security-dast --target https://app.staging.com --env homolog -- scan homolog (auto-downgrades)/x-security-dast --target https://app.example.com --env prod --confirm-prod -- production passive scan| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| --target | URL | Yes | (none) | Target application URL (http/https) |
| --env | Enum | No | local | Environment: local, dev, homolog, prod |
| --mode | Enum | No | passive | Scan mode: passive, active, full |
| --confirm-prod | Flag | No | false | Required confirmation for production scans |
| --openapi | Path | No | (none) | OpenAPI spec path to expand scan coverage |
| --auth-token | String | No | (none) | Bearer token for authenticated endpoint scanning |
Verify --target is a valid URL (http/https scheme).
| Environment | Passive | Active | Full | Requirements |
|-------------|---------|--------|------|-------------|
| local | Yes | Yes | Yes | None |
| dev | Yes | Yes | Yes | None |
| homolog | Yes | Yes (non-destructive) | No | Full auto-downgrades to active |
| prod | Yes | No | No | Requires --confirm-prod; active/full auto-downgrade to passive |
Guard logic:
--env=prod and --confirm-prod NOT provided: BLOCK scan with error--env=prod and --mode is active or full: AUTO-DOWNGRADE to passive--env=homolog and --mode=full: AUTO-DOWNGRADE to active (non-destructive)Check for scanning tools in order of preference:
| Priority | Tool | Use Case | |----------|------|----------| | Preferred | OWASP ZAP | Full DAST scanner: passive interception, active scanning, fuzzing, OpenAPI import | | Fallback | Nuclei | Template-based scanner: fast, targeted checks for known CVEs and misconfigurations | | Lightweight | nikto | Quick web server misconfiguration checks |
Set mode, import OpenAPI spec if provided, configure auth token, and execute.
Extract raw findings from tool output. Map each finding to category:
| Category | Description | OWASP Mapping | |----------|-------------|---------------| | injection | SQL, NoSQL, LDAP, OS command injection | A03:2021 | | authentication | Weak auth, session fixation, credential exposure | A07:2021 | | misconfiguration | Missing headers, CORS, TLS issues, verbose errors | A05:2021 | | info-disclosure | Stack traces, internal paths, version info, debug endpoints | A01:2021 |
Produce SARIF 2.1.0 compliant output with all findings.
Start at 100, deduct per finding severity:
| Severity | Deduction | |----------|-----------| | CRITICAL | -25 | | HIGH | -15 | | MEDIUM | -5 | | LOW | -2 | | INFO | 0 |
| Grade | Score Range | Criteria | |-------|-------------|----------| | A | 90-100 | No CRITICAL or HIGH findings | | B | 75-89 | No CRITICAL, up to 2 HIGH | | C | 60-74 | No CRITICAL, 3+ HIGH or 5+ MEDIUM | | D | 40-59 | 1+ CRITICAL or 5+ HIGH | | F | 0-39 | Multiple CRITICAL findings |
Produce Markdown summary report with configuration, environment guard, findings by category, OWASP coverage, and recommendations.
| Scenario | Action |
|----------|--------|
| No DAST tool found | Report error with installation instructions for ZAP, Nuclei, or nikto |
| --env=prod without --confirm-prod | Block scan immediately, no requests sent |
| Target URL unreachable | Report connection failure with target URL |
| Scan timeout | Report partial findings collected so far |
# GitHub Actions example
- name: DAST Scan
run: |
/x-security-dast \
--target ${{ env.APP_URL }} \
--env ${{ env.ENVIRONMENT }} \
--mode passive \
--openapi docs/openapi.yaml
- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: dast-report.sarif
tools
Documentation automation v2: stack-aware generation from documentation.targets.
development
Generates or updates CI/CD pipelines per project stack with actionlint validation.
tools
Generates ADRs from architecture-plan mini-ADRs with sequential numbering and index update.
development
Formats source code; first step of the pre-commit chain (format -> lint -> compile).