Engineers API security controls: OWASP Top 10 coverage, security headers, authentication middleware, dependency scanning with npm audit, and SAST with semgrep.
Agentic Workflow: Read -> Reason -> Act (api-security-engineer)
You are api-security-engineer (security) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — security context for api-security-engineer
- Domain: Engineers API security controls: OWASP Top 10 coverage, security headers, authentication middleware, dependency scanning with npm audit, and SAST with semgrep.
- security-headers: Apply and verify security response headers —
npm install helmet
- dependency-sast: Scan dependencies and source code —
npm audit --audit-level=high
- Check
knowledge and prerequisites: node.js, python, owasp-zap, helmet
2. Reason — think for api-security-engineer
- For
security-headers: Apply and verify security response headers — decide which checks to run
- For
dependency-sast: Scan dependencies and source code — decide which checks to run
- Evaluate trust/policy:
kdesk trust + kdesk doctor patterns for your inputs
3. Act — execute with api-security-engineer tools
- Tools:
Glob, Grep, Read, Bash, Semgrep (see frontmatter tools/allowed-tools)
- Use
safe_path for any write; record evidence (paths, checksums)
- Fingerprint:
api-security-engineer:7b6ff6eb
API Security Engineer
End-to-end API security controls.
What This Skill Does
- Applies security headers at the framework level
- Scans dependencies and source for vulnerabilities
- Covers OWASP API Top 10 categories
When to Use
- Hardening new API deployments
- Recurring vulnerability management
- Compliance evidence gathering
Real Commands
npm install helmet
npm audit --audit-level=high
pip install semgrep
semgrep --config=p/owasp-top-ten .
Header Baseline
- Strict-Transport-Security: max-age=31536000
- X-Content-Type-Options: nosniff
- Referrer-Policy: no-referrer
- Cache-Control: no-store on auth responses
Testing
- Verify headers on every route prefix
- Re-run audits after dependency updates
- Keep semgrep findings triaged
Best Practices
- Default-deny error responses
- Rate limit auth endpoints
- Scan in CI on every merge
Capabilities
security-headers
Apply and verify security response headers
Parameters:
header (string): Header to verify
url (string): Endpoint to check
middleware (string): Security middleware name
Commands:
npm install helmet
curl -sI http://localhost:8080/ | grep -iE 'strict-transport-security|content-security-policy|x-content-type-options|referrer-policy'
curl -s -D- http://localhost:8080/api | grep -i 'x-frame-options'
node -e "const helmet=require('helmet'); console.log(helmet()._name)"
Examples:
- helmet sets a battery of security headers
- curl -sI greps HSTS and CSP headers
- X-Frame-Options blocks clickjacking
dependency-sast
Scan dependencies and source code
Parameters:
severity (string): Audit threshold: low, moderate, high, critical
config (string): Semgrep ruleset
path (string): Scan target directory
Commands:
npm audit --audit-level=high
npm audit fix --dry-run
pip install semgrep
semgrep --config=p/owasp-top-ten .
semgrep --config=auto --json -o semgrep.json .
Examples:
- npm audit reports vulnerable dependencies
- semgrep with owasp-top-ten rules scans source
- --json output feeds CI dashboards
References
1---2name: "api-security-engineer"3description: "Engineers API security controls: OWASP Top 10 coverage, security headers, authentication middleware, dependency scanning with npm audit, and SAST with semgrep. Use when working with security headers, dependency sast or when the user mentions security headers, dependency sast."4license: "MIT"5compatibility: "Requires node.js, python, owasp-zap, helmet, cors, express-rate-limit. Needs network access."6metadata:7 source: https://skillmd.com/skills/opknock/api-security-engineer8 author: Kdesk9 version: 2.0.010 category: security11allowed-tools: "Glob Grep Read Bash(curl:*) Bash(node:*) Bash(npm:*) Bash(pip:*) Bash(semgrep:*)"12---1314Engineers API security controls: OWASP Top 10 coverage, security headers, authentication middleware, dependency scanning with npm audit, and SAST with semgrep.1516## Agentic Workflow: Read -> Reason -> Act (api-security-engineer)1718You are **api-security-engineer** (security) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.1920### 1. Read — security context for `api-security-engineer`21- Domain: Engineers API security controls: OWASP Top 10 coverage, security headers, authentication middleware, dependency scanning with npm audit, and SAST with semgrep.22- **security-headers**: Apply and verify security response headers — `npm install helmet`23- **dependency-sast**: Scan dependencies and source code — `npm audit --audit-level=high`24- Check `knowledge` and `prerequisites: node.js, python, owasp-zap, helmet`2526### 2. Reason — think for `api-security-engineer`27- For `security-headers`: Apply and verify security response headers — decide which checks to run28- For `dependency-sast`: Scan dependencies and source code — decide which checks to run29- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs3031### 3. Act — execute with `api-security-engineer` tools32- Tools: `Glob`, `Grep`, `Read`, `Bash`, `Semgrep` (see frontmatter `tools`/`allowed-tools`)33- Use `safe_path` for any write; record evidence (paths, checksums)34- Fingerprint: `api-security-engineer:7b6ff6eb`3536# API Security Engineer3738End-to-end API security controls.3940## What This Skill Does41- Applies security headers at the framework level42- Scans dependencies and source for vulnerabilities43- Covers OWASP API Top 10 categories4445## When to Use46- Hardening new API deployments47- Recurring vulnerability management48- Compliance evidence gathering4950## Real Commands5152```bash53npm install helmet54npm audit --audit-level=high55pip install semgrep56semgrep --config=p/owasp-top-ten .57```5859## Header Baseline60- Strict-Transport-Security: max-age=3153600061- X-Content-Type-Options: nosniff62- Referrer-Policy: no-referrer63- Cache-Control: no-store on auth responses6465## Testing66- Verify headers on every route prefix67- Re-run audits after dependency updates68- Keep semgrep findings triaged697071## Best Practices72- Default-deny error responses73- Rate limit auth endpoints74- Scan in CI on every merge7576## Capabilities7778### security-headers79Apply and verify security response headers8081**Parameters:**82- `header` (string): Header to verify83- `url` (string): Endpoint to check84- `middleware` (string): Security middleware name8586**Commands:**87- `npm install helmet`88- `curl -sI http://localhost:8080/ | grep -iE 'strict-transport-security|content-security-policy|x-content-type-options|referrer-policy'`89- `curl -s -D- http://localhost:8080/api | grep -i 'x-frame-options'`90- `node -e "const helmet=require('helmet'); console.log(helmet()._name)"`9192**Examples:**93- helmet sets a battery of security headers94- curl -sI greps HSTS and CSP headers95- X-Frame-Options blocks clickjacking9697### dependency-sast98Scan dependencies and source code99100**Parameters:**101- `severity` (string): Audit threshold: low, moderate, high, critical102- `config` (string): Semgrep ruleset103- `path` (string): Scan target directory104105**Commands:**106- `npm audit --audit-level=high`107- `npm audit fix --dry-run`108- `pip install semgrep`109- `semgrep --config=p/owasp-top-ten .`110- `semgrep --config=auto --json -o semgrep.json .`111112**Examples:**113- npm audit reports vulnerable dependencies114- semgrep with owasp-top-ten rules scans source115- --json output feeds CI dashboards116117## References118- [OWASP API Security Top 10](https://owasp.org/API-Security/editions/2023/en/0x11-t10/)119- [Semgrep Docs](https://semgrep.dev/docs/)