security-fastapi

Audit FastAPI applications for authentication, CORS, and middleware security vulnerabilities.

124|12|Updated Nov 17, 2025
One-click install
npx skills add https://github.com/IgorWarzocha/Opencode-Workflows --skill security-fastapi-igorwarzocha
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security-fastapi
Source: https://github.com/IgorWarzocha/Opencode-Workflows/tree/main/agents/security-reviewer/.opencode/skill/security-fastapi
Command: npx skills add https://github.com/IgorWarzocha/Opencode-Workflows --skill security-fastapi-igorwarzocha

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers identify and mitigate common security vulnerabilities in FastAPI applications, ensuring robust authentication, secure configurations, and protection against common web attacks.

Core Features & Use Cases

  • Auth Dependency Auditing: Checks for proper implementation of authentication and authorization using Depends() and Security().
  • CORS Configuration Review: Identifies insecure CORS settings, particularly wildcard origins with credentials.
  • Middleware Security: Verifies the presence and configuration of essential security middleware like TrustedHostMiddleware and HTTPSRedirectMiddleware.
  • Use Case: Before deploying a new FastAPI microservice, run this Skill to perform a quick security audit, catching potential misconfigurations in authentication and CORS.

Quick Start

Run a first-pass security scan on the current directory using the security-fastapi skill.

Frequently Asked Questions about security-fastapi

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit a FastAPI application for security vulnerabilities?

FastAPI security audits focus on verifying proper implementation of authentication and authorization using `Depends()` and `Security()` functions. Scans identify missing access controls and insecure dependency patterns to ensure robust application authentication.

How do I check for insecure CORS configurations in FastAPI?

FastAPI CORS configuration reviews identify insecure settings, particularly wildcard origins used with credentials. Scans detect these cross-origin resource sharing misconfigurations to prevent unauthorized web access.

Do I need ripgrep to scan my Python codebase for security issues?

Yes, you need ripgrep installed to scan your Python codebase for security issues. This Skill requires ripgrep for efficient code searching to detect insecure patterns and missing security controls across the FastAPI project files.

What middleware should I use to secure a FastAPI microservice?

Securing a FastAPI microservice requires implementing essential security middleware like `TrustedHostMiddleware` and `HTTPSRedirectMiddleware`. Security scans verify the presence and proper configuration of these middleware components to protect against web attacks.

When should I run a security audit on my FastAPI codebase?

Run a FastAPI security audit before deploying a new microservice. This first-pass scan catches potential misconfigurations in authentication and CORS, ensuring robust security configurations and protection against common web attacks.