# API Sec Specialist

> Security-tests APIs with OWASP ZAP: automated API scans from OpenAPI, baseline scans, active scan rules, and HTML/JSON vulnerability reports. Use when working with zap api scan, zap automation or when the user mentions zap api scan, zap automation.

- Skill: `opknock/api-sec-specialist` (Agent Skill)
- Install (CLI): `npx get-skill add opknock/api-sec-specialist`
- Raw SKILL.md: https://api.skillmd.com/api/skills/opknock/api-sec-specialist/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- License: MIT
- Author: OpKnock (https://skillmd.com/u/opknock)
- Updated: 2026-11-23
- Page: https://skillmd.com/skills/opknock/api-sec-specialist

---


Security-tests APIs with OWASP ZAP: automated API scans from OpenAPI, baseline scans, active scan rules, and HTML/JSON vulnerability reports.

## Agentic Workflow: Read -> Reason -> Act (api-sec-specialist)

You are **api-sec-specialist** (security) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.

### 1. Read — security context for `api-sec-specialist`
- Domain: Security-tests APIs with OWASP ZAP: automated API scans from OpenAPI, baseline scans, active scan rules, and HTML/JSON vulnerability reports.
- **zap-api-scan**: Run ZAP automated scans against APIs — `docker run -t ghcr.io/zaproxy/zaproxy zap-api-scan.py -t http://localhost:8080/v`
- **zap-automation**: Automate ZAP scans in CI pipelines — `curl -s http://localhost:8080/v3/api-docs -o openapi.json`
- Check `knowledge` and `prerequisites: node.js, python, owasp-zap`

### 2. Reason — think for `api-sec-specialist`
- For `zap-api-scan`: Run ZAP automated scans against APIs — decide which checks to run
- For `zap-automation`: Automate ZAP scans in CI pipelines — decide which checks to run
- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs

### 3. Act — execute with `api-sec-specialist` tools
- Tools: `Glob`, `Grep`, `Read`, `Bash` (see frontmatter `tools`/`allowed-tools`)
- Use `safe_path` for any write; record evidence (paths, checksums)
- Fingerprint: `api-sec-specialist:6bf8ebf5`

# API Security Specialist

Automated API security testing with ZAP.

## What This Skill Does
- Scans APIs for OWASP top-ten vulnerabilities
- Uses OpenAPI specs to discover endpoints
- Produces actionable reports

## When to Use
- Pre-release security gates
- Continuous security monitoring
- PCI/SOC2 audit evidence

## Real Commands

```bash
docker run -t ghcr.io/zaproxy/zaproxy zap-api-scan.py -t openapi.yaml -f openapi -j -l WARN -r report.html
docker run -t ghcr.io/zaproxy/zaproxy zap-baseline.py -t https://api.example.com -r zap_baseline.html
```

## Scan Workflow
1. Export the OpenAPI spec
2. Run the API scan with the spec
3. Triage alerts by confidence
4. Track findings in the bug tracker

## Testing
- Verify the scanner reaches authenticated endpoints
- Set up authentication headers for deep scans
- Fail CI on HIGH/CRITICAL alerts

## Best Practices
- Scan staging, never production
- Keep the spec in sync with routes
- Tune scan rules to reduce false positives

## Capabilities

### zap-api-scan
Run ZAP automated scans against APIs

**Parameters:**
- `target` (string): API URL or spec file
- `format` (string): openapi, soap, graphql
- `level` (string): Alert threshold: WARN, FAIL, PASS

**Commands:**
- `docker run -t ghcr.io/zaproxy/zaproxy zap-api-scan.py -t http://localhost:8080/v3/api-docs -f openapi -O -r zap_api_report.html`
- `docker run -t ghcr.io/zaproxy/zaproxy zap-baseline.py -t http://localhost:8080 -r zap_baseline.html`
- `docker run -t ghcr.io/zaproxy/zaproxy zap-api-scan.py -t openapi.yaml -f openapi -j -l WARN -r report.html`
- `docker run -t ghcr.io/zaproxy/zaproxy zap-cli.py --help`

**Examples:**
- zap-api-scan.py -f openapi scans from the OpenAPI spec
- zap-baseline.py runs a passive baseline scan
- -l WARN sets the minimum alert level reported

### zap-automation
Automate ZAP scans in CI pipelines

**Commands:**
- `curl -s http://localhost:8080/v3/api-docs -o openapi.json`
- `docker run -t ghcr.io/zaproxy/zaproxy zap-api-scan.py -t openapi.json -f openapi -J -j -l FAIL -r report.html`
- `curl -s http://localhost:8080/health -o /dev/null -w '%{http_code}\n'`

**Examples:**
- -cli --help
- -api --help

## References
- [ZAP API Scan Docs](https://www.zaproxy.org/docs/docker/api-scan/)
- [ZAP User Guide](https://www.zaproxy.org/docs/desktop/start/)

