fastapi — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited fastapi (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Purpose: Prevent common FastAPI and Pydantic mistakes. Apply these rules whenever writing or reviewing FastAPI route handlers, Pydantic schemas, or async API code.
dict or Any for I/O. Reference: ERR-2026-025model_config, model_dump, model_validate) unless the project explicitly pins Pydantic v1 (pydantic<2 in requirements). Reference: ERR-2026-025async def unless the handler calls blocking I/O that cannot be awaited; use run_in_executor for blocking calls inside async handlers.response_model on every route decorator so FastAPI filters and validates the response shape.status_code on the route decorator (@app.post("/items", status_code=201)) rather than constructing a Response object just to set the status.Exception in route handlers; raise HTTPException with a meaningful status_code and detail string, or define a custom exception with an exception handler.@app.exception_handler(MyError) for domain errors rather than catching them inside every route.Depends() for shared logic (auth, DB sessions, pagination params) — never duplicate the same logic across multiple route functions.APIRouter with a prefix and tags list to group related endpoints; register routers with app.include_router() rather than defining all routes on the app object.CORSMiddleware with an explicit allow_origins list; never use allow_origins=["*"] in production.lifespan context manager (FastAPI ≥ 0.93) for startup/shutdown logic instead of the deprecated @app.on_event("startup") / @app.on_event("shutdown") decorators.BackgroundTasks (injected via Depends or as a route parameter) for fire-and-forget work; never asyncio.create_task inside a route without a lifecycle guard.model_config = ConfigDict(populate_by_name=True) and using alias or alias_generator when the wire format differs from the Python attribute name.pydantic-settings (BaseSettings) for configuration; never read os.environ directly inside route handlers or dependency functions.TestClient (sync) or AsyncClient from httpx (async); never spin up a real server in unit tests.Request injections or stale Depends imports are dead code and confuse readers.app.state instead.skills/python/SKILL.mdskills/code-quality/SKILL.md~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.