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