Install
openclaw skills install apishieldAPI endpoint security auditor — scans route definitions for missing auth, rate limiting, CORS issues, and input validation holes
openclaw skills install apishieldAPIShield scans your API route definitions for security vulnerabilities including missing authentication middleware, rate limiting gaps, input validation holes, CORS misconfigurations, and exposed debug endpoints. It supports Express, FastAPI, Flask, Django, Rails, and Next.js. All scanning happens locally using regex-based pattern matching -- no code is sent to external servers.
apishield scan [file|directory]One-shot security audit of API route files.
How to execute:
bash "<SKILL_DIR>/scripts/apishield.sh" scan [target]
What it does:
Example usage scenarios:
apishield scan .apishield scan src/routes/apishield scan app/apishield scan .apishield scan [file|directory] (unlimited)Full security audit with no file limit and all 20+ checks enabled.
How to execute:
bash "<SKILL_DIR>/scripts/apishield.sh" scan [target]
What it does (beyond free):
apishield hooks installInstall git pre-commit hooks that scan staged route files for security issues before every commit.
How to execute:
bash "<SKILL_DIR>/scripts/apishield.sh" hooks install
What it does:
apishield hooks uninstallRemove APIShield git hooks.
bash "<SKILL_DIR>/scripts/apishield.sh" hooks uninstall
apishield report [directory]Generate a markdown security audit report.
bash "<SKILL_DIR>/scripts/apishield.sh" report [directory]
What it does:
apishield inventory [directory]Generate a complete API endpoint inventory/catalog.
bash "<SKILL_DIR>/scripts/apishield.sh" inventory [directory]
What it does:
apishield compliance [directory]Map findings to OWASP Top 10 API Security Risks.
bash "<SKILL_DIR>/scripts/apishield.sh" compliance [directory]
What it does:
APIShield checks for 20+ security issues across 6 frameworks:
| Check | Description | Severity |
|---|---|---|
| Missing Auth Middleware | Routes without authentication middleware | Critical |
| Debug Endpoints Exposed | /debug, /test, /admin without auth | Critical |
| SQL Injection Risk | String interpolation in SQL queries | Critical |
| Sensitive Data Exposure | Routes returning passwords/tokens/secrets | High |
| Missing Rate Limiting | Public endpoints without rate limit middleware | High |
| CORS Misconfiguration | Access-Control-Allow-Origin: * or overly permissive CORS | High |
| Missing Input Validation | Routes accepting req.body/params without validation | High |
| Missing CSRF Protection | State-changing endpoints without CSRF tokens | High |
| Overly Permissive Methods | app.all() or wildcard method handlers | Medium |
| Error Handling Leaks | Routes that might expose stack traces | Medium |
| Missing HTTP Security Headers | No helmet/security headers middleware | Medium |
| Insecure Direct Object Refs | Route params used directly in DB queries | Medium |
Users can configure APIShield in ~/.openclaw/openclaw.json:
{
"skills": {
"entries": {
"apishield": {
"enabled": true,
"apiKey": "YOUR_LICENSE_KEY_HERE",
"config": {
"severityThreshold": "high",
"excludePatterns": ["**/node_modules/**", "**/dist/**", "**/.git/**"],
"reportFormat": "markdown"
}
}
}
}
}
hooks install, prompt to install itThe user might say things like:
brew install lefthook