hunt-fastapi

hunt-fastapi is a skill for Claude Code, Codex from uphiago/recon-skills. It costs 26 tokens per session (1,809 once invoked), scanned A, original, MIT.

A security-hunting guide for FastAPI, a Python framework for building web APIs. It focuses on authorization gaps, input validation problems, hidden endpoints, and middleware bypasses.

In plain words
What is it for?
Use it to inspect FastAPI APIs, mine OpenAPI schemas for endpoints, test authorization dependencies and model coercion, and check REST, WebSocket, and middleware behavior.
Why use it?
It helps find vulnerabilities that arise from FastAPI’s dependency injection, Pydantic validation, automatically generated API documentation, and ASGI middleware.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to inspect FastAPI APIs, mine OpenAPI schemas for endpoints, test authorization dependencies and model coercion, and check REST, WebSocket, and middleware behavior.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/uphiago/recon-skills/hunt-fastapi
About the project

Recon Skills is a pack of security-testing skills covering reconnaissance, web applications, APIs, authentication, vulnerability validation, cloud infrastructure, and reporting. Security professionals use it for authorized assessments of systems they own or have written permission to test. The catalogue entries are individual skills from the pack.

uphiago/recon-skills · 1,324 stars · on GitHub · hiago.sh

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add uphiago/recon-skills --skill hunt-fastapi
Clone the repo
git clone --depth 1 https://github.com/uphiago/recon-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hunt-fastapi

README.md
[![agentmods](https://agentmods.dev/badge/skills/uphiago/recon-skills/hunt-fastapi/github.svg)](https://agentmods.dev/skills/uphiago/recon-skills/hunt-fastapi)
Your own site
<a href="https://agentmods.dev/skills/uphiago/recon-skills/hunt-fastapi"><img src="https://agentmods.dev/badge/skills/uphiago/recon-skills/hunt-fastapi/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for hunt-fastapi

Your own site · 80×15
<a href="https://agentmods.dev/skills/uphiago/recon-skills/hunt-fastapi"><img src="https://agentmods.dev/badge/skills/uphiago/recon-skills/hunt-fastapi.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,809 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 61
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00026 $0.01809
Opus 5.5 $0.00010 $0.00724
Sonnet 5.5 $0.00005 $0.00362
Haiku 4.5 $0.00003 $0.00181

Measured 2mo ago against content hash 79d7718194f3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

hunt-fastapi scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

compatibility: Requires curl, python3
redteam/hunt-fastapi/SKILL.md · 163 lines

How it starts

The opening of the file, as written. The whole thing — 163 lines — stays where its author put it; the contents beside it link to each section on GitHub.

FastAPI Security Hunting

Hunt FastAPI-specific vulnerabilities in dependency injection authorization gaps, Pydantic model coercion and extra field exploitation, OpenAPI schema mining for hidden endpoints, and ASGI middleware bypasses. FastAPI's design — dependency injection for auth, Pydantic for validation, OpenAPI auto-generation — creates unique attack surface distinct from Flask or Django.

When to Use

  • Target uses FastAPI (indicated by /docs, /redoc, /openapi.json, or server: uvicorn).
  • OpenAPI schema is publicly accessible.
  • API uses dependency injection (Depends) for authorization.
  • WebSocket endpoints exist alongside REST API.
  • Application uses Pydantic v1 or v2 for request validation.

Quick Detection

# FastAPI fingerprinting
curl --max-time 30 --connect-timeout 10 -sk "https://target.com/openapi.json" | jq '.info.title' 2>/dev/null
curl --max-time 30 --connect-timeout 10 -sk "https://target.com/docs" -w "%{http_code}\n" -o /dev/null
curl --max-time 30 --connect-timeout 10 -sk "https://target.com/redoc" -w "%{http_code}\n" -o /dev/null

Procedure

Phase 1 — OpenAPI Schema Mining

# Download full schema for endpoint discovery
curl --max-time 30 --connect-timeout 10 -sk "https://target.com/openapi.json" | jq '.paths | keys[]'

# Find hidden endpoints not in docs
curl --max-time 30 --connect-timeout 10 -sk "https://target.com/openapi.json" | jq '.paths | to_entries[] | select(.value.get != null and .value.get.security == []) | .key'

# Discover internal endpoints via path parameter fuzzing
ffuf -u "https://target.com/api/FUZZ" \
  -w /path/to/wordlist.txt \
  -mc 200,401,403 \
  -H "Accept: application/json"

Phase 2 — Dependency Injection Authorization Gaps

# Depends vs Security — check if auth is actually enforced
curl --max-time 30 --connect-timeout 10 -sk "https://target.com/api/admin/users"     # no auth
curl --max-time 30 --connect-timeout 10 -sk "https://target.com/api/admin/users" \
  -H "Authorization: Bearer INVALID_TOKEN"         # invalid auth

# Dependency override in path operations
# Some endpoints may inherit Depends from router but override with None
for method in GET POST PUT PATCH DELETE; do
  curl --max-time 30 --connect-timeout 10 -sk -X "$method" "https://target.com/api/users/1" \
    -w "$method — %{http_code}\n" -o /dev/null
done

# Background tasks added via BackgroundTasks may skip auth
curl --max-time 30 --connect-timeout 10 -sk -X POST "https://target.com/api/orders" \
  -H "Content-Type: application/json" \
  -d '{"user_id":"VICTIM_ID","product":"test"}'

Read the full file on GitHub · 163 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 163 lines · 26 tokens per session scan A 79d7718194f3

Subscribe to this mod's changes

hunt-fastapi is a skill published in the GitHub repository uphiago/recon-skills (1,324 stars, last pushed 2mo ago), licensed MIT. It adds 26 tokens to every session and 1,809 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

hunt-fastapi compared with skills from other repositories

hunt-fastapi next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
hunt-fastapiuphiago/recon-skillsSkill1.3k2mo agoMITA26Claude Code, Codex
fastapi-docspledgeandgrow/pledge-skillsSkill103mo agoMITA36Claude Code, Codex
datamodel-code-generatorkoxudaxi/datamodel-code-generatorSkill4.0k5d agoMITA147Claude Code, Codex
fastapi-expertpersonamanagmentlayer/pclSkill4411d agoApache-2.0A49Claude Code
fastapialivirgo/Major-AI-SkillsSkill2yesterdayMITA52Claude Code
FastAPI Modern Web Developmentbobmatnyc/mcp-skillsetSkill208mo agoMITA41Claude Code, Codex
implementing-cloud-dlp-for-data-protectionxalgorix/xalgorixSkill1.3kyesterdayApache-2.0A54Claude Code, Codex