Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    FastAPI Config Security Audit

    by CashonlyTian

    1

    Use when a user wants to know whether a FastAPI config is safe to run or ship.

    $7

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    FastAPI Config Security Audit

    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

    CheckStatusScore
    JWT Secret & AlgorithmFAIL (Literal found)0/15
    CORS Wildcard PolicyPASS10/10
    Production Docs ExposureFAIL (/docs live)0/10
    Debug Host BindingFAIL (0.0.0.0)0/10
    Trusted Host MiddlewarePASS10/10
    Transport Security (HSTS)PASS5/5
    Upload SafetyPASS10/10
    Credentials in ConfigFAIL (DB Password)0/15
    Rate LimitingPASS5/5
    Version PinningPASS (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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Environment Variables
    Listed2 days ago

    What's inside

    Frequently Asked Questions

    This skill identifies critical misconfigurations like hardcoded secrets, ungated OpenAPI docs, and unsafe CORS policies that generic scanners often miss in the FastAPI ecosystem.

    The skill performs static analysis only; it reads your code and configuration files as text to identify risks without ever executing the application or accessing your live server.

    It is designed for any Python-based AI agent that has file-system access, allowing it to parse your main.py, .env, and dependency files locally.

    You receive the core auditing logic, a 10-point security rubric, and a template for generating Markdown fix reports and visual score-cards for your projects.

    No, this skill is purpose-built for FastAPI and Uvicorn configurations; it will not provide accurate results for other frameworks like Flask, Django, or Litestar.

    The skill checks for FastAPI version 0.100.0 or newer to ensure you are protected against recent known vulnerabilities and have access to the latest security features.

    New in LLM Ops