Works with the AI Agents you already use
FastAPI Config Security Audit
by CashonlyTian
Use when a user wants to know whether a FastAPI config is safe to run or ship.
$7
FastAPI Config Security Audit
Example session with this skill installed
Run a security audit on my FastAPI project located in the ./backend folder. Project name is 'StoreAPI'. Use default branding.
- Read your context and instructions
- Compiled the fastapi config security
Audit complete for project
StoreAPI. The scanner analyzed your configuration files, environment variables, and dependency manifests. No code was executed during this process.
Summary:
- Score: 65/100
- Grade: C
- Risk Level: MEDIUM
- Findings: 4 issues detected (1 High, 2 Medium, 1 Low)
FastAPI Security Scorecard
| Check | Status | Score |
|---|---|---|
| JWT Secret & Algorithm | FAIL (Literal found) | 0/15 |
| CORS Wildcard Policy | PASS | 10/10 |
| Production Docs Exposure | FAIL (/docs live) | 0/10 |
| Debug Host Binding | FAIL (0.0.0.0) | 0/10 |
| Trusted Host Middleware | PASS | 10/10 |
| Transport Security (HSTS) | PASS | 5/5 |
| Upload Safety | PASS | 10/10 |
| Credentials in Config | FAIL (DB Password) | 0/15 |
| Rate Limiting | PASS | 5/5 |
| Version Pinning | PASS (0.109.0) | 10/10 |
Top 3 Prioritized Fixes:
1.
Remove Hardcoded Secrets: JWT_SECRET_KEY and DATABASE_URL contain literal credentials in config.py. Move these to .env and use os.getenv without literal fallbacks.
2.
Disable Production Docs: Set docs_url=None and redoc_url=None in your FastAPI() constructor for production environments.
3.
Restrict Host Binding: In main.py, change uvicorn.run(host="0.0.0.0") to 127.0.0.1 or use environment variables to prevent exposure to the public internet.
Next steps
- Review the full finding details in
scan-report.md. - Move the masked secrets identified in the report to your environment store.
- Re-run the audit after applying fixes to update your score-card image.
Connects securely to your tools. The creator never sees your data.
About this skill
Audit a project's FastAPI app config (main.py / app.py / config.py / settings.py / routers/.py / api/.py / deps.py / auth.py / security.py, parsed as text — never imported or executed) plus .env / .env.local and requirements.txt / pyproject.toml before the app ships — a literal SECRET_KEY / JWT_SECRET_KEY / SECRET in source code (always masked to **), ALGORITHM 'none', ACCESS_TOKEN_EXPIRE_MINUTES over 60 minutes, CORSMiddleware allow_origins [''] (with allow_credentials), FastAPI(...) with /docs live in production, uvicorn.run(host='0.0.0.0') with debug / reload on, no TrustedHostMiddleware, no HTTPSRedirectMiddleware / HSTS, an UploadFile endpoint with no size limit that saves file.filename directly and no allowlist, literal passwords in database / broker / mail URIs (always masked), weak password hashing, no slowapi rate limiting on /login, and a fastapi version below 0.100.0. Scores 10 checks 0-100 with a grade and risk level, and produces a shareable score-card image plus a prioritised fix report. Use when a user wants to know whether a FastAPI config is safe to run or ship.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.
Scans local source code only, not live endpoints. No support for frameworks other than FastAPI. Skip files over 2MB. Does not perform deep CVE dependency scanning.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 2 days ago
- Software
Python 3Pillow