igorwarzocha/opencode-workflows/security-fastapi
Claude Code and agent skill by igorwarzocha/opencode-workflows
- community
Checking that the SKILL.md file is still in the repository.
Review FastAPI security audit patterns for dependencies and middleware. Use for auditing auth dependencies, CORS configuration, and TrustedHost middleware. Use proactively when reviewing FastAPI apps. Examples: - user: "Audit FastAPI route security" → check for Depends() and Security() usage - user: "Check FastAPI CORS setup" → verify origins when allow_credentials=True - user: "Review FastAPI middleware" → check TrustedHost and HTTPSRedirect config - user: "Secure FastAPI API keys" → move from query params to header schemes - user: "Scan for FastAPI footguns" → check starlette integration and dependency order
Install
npx vskill@latest install igorwarzocha/opencode-workflows/security-fastapiSKILL.md
<overview>
Security audit patterns for FastAPI applications covering authentication dependencies, CORS configuration, and middleware security.
</overview>
<vulnerabilities>
Core Risks to Check
Missing Auth on Routes
FastAPI expects authentication/authorization via dependencies on routes or routers. If no Depends()/Security() usage exists, review every route for unintended public access.
API Key Schemes
If using API keys, SHOULD prefer header-based schemes (APIKeyHeader) and validate the key server-side.
CORS: Avoid Wildcards with Credentials
Using allow_origins=["*"] excludes credentialed requests (cookies/Authorization). For authenticated browser clients, MUST explicitly list allowed origins.
Host Header and HTTPS Enforcement
SHOULD use Starlette middleware to prevent host-header attacks and enforce HTTPS in production.
</vulnerabilities>
<commands>
Quick Audit Commands
</commands>
<checklist>
Hardening Checklist
- [ ] All sensitive routes require
Depends()orSecurity()auth dependencies - [ ] API key schemes use headers (
APIKeyHeader), not query params - [ ]
allow_originsis explicit whenallow_credentials=True - [ ]
TrustedHostMiddlewareconfigured for production domains - [ ]
HTTPSRedirectMiddlewareenabled in production (or enforced by proxy)
</checklist>
<scripts>
Scripts
scripts/scan.sh- First-pass FastAPI security scan
</scripts>
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingagents/security-reviewer/.opencode/skill/security-fastapi/SKILL.md
Popularity
- Repository stars
- 111
- Repository forks
- 10
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 2 May 2026, 5 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/igorwarzocha/opencode-workflows/security-fastapi)