pentest-api

pentest-api is a skill for Claude Code from fatihkan/badi. It costs 73 tokens per session (1,204 once invoked), scanned A, original, MIT.

A security-testing guide for web APIs, which are interfaces that let software exchange data and actions. It covers REST, GraphQL, and WebSocket services, along with common access-control, login, token, and configuration problems.

In plain words
What is it for?
Use it to review API permissions, JWT and OAuth login flows, GraphQL settings, WebSocket security, mass assignment, rate limits, hidden API versions, and server-side request forgery.
Why use it?
It helps find cases where an API exposes another user's data, accepts unauthorised actions, handles tokens poorly, or allows excessive requests that ordinary scans may overlook.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code.

Part of the badi plugin — 81 skills, 86 commands, 30 agents, 7 hooks shipped together

Good fit Use it to review API permissions, JWT and OAuth login flows, GraphQL settings, WebSocket security, mass assignment, rate limits, hidden API versions, and server-side request forgery.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fatihkan/badi/pentest-api
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 fatihkan/badi --skill pentest-api
Clone the repo
git clone --depth 1 https://github.com/fatihkan/badi

Made for: Claude Code.

Or install badi, the plugin that ships this one along with the rest of its 81 skills, 86 commands, 30 agents, 7 hooks.

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 pentest-api

README.md
[![agentmods](https://agentmods.dev/badge/skills/fatihkan/badi/pentest-api.svg)](https://agentmods.dev/skills/fatihkan/badi/pentest-api)
Your own site
<a href="https://agentmods.dev/skills/fatihkan/badi/pentest-api"><img src="https://agentmods.dev/badge/skills/fatihkan/badi/pentest-api.svg" alt="Measured on agentmods" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,204 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00073 $0.01204
Opus 5 $0.00036 $0.00602
Sonnet 5 $0.00015 $0.00241
Haiku 4.5 $0.00007 $0.00120

Measured today against content hash ff09741e7cb5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

pentest-api scanned grade A with 2 findings 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 today.

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.

Sends data to an external URLlowData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

curl -X POST https://<target>/graphql -H 'Content-Type: application/json' -d '{"query":"{__schema{types{name fields{name}}}}"}'

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

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

curl -X POST https://<target>/graphql -H 'Content-Type: application/json' -d '{"query":"{__schema{types{name fields{name}}}}"}'
.claude/skills-vault/pentest-api/SKILL.md · 139 lines

How it starts

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

pentest-api

REST + GraphQL + WebSocket security testing methodology. Focused on OWASP API Security Top 10 (2023).

Triggers

  • "API pentest"
  • "OWASP API Top 10"
  • "GraphQL introspection"
  • "JWT swap attempt"
  • "OAuth flow test"
  • "BOLA / BFLA"
  • "mass assignment"
  • "WebSocket security"

OWASP API Top 10 (2023)

# Category Test Approach
API1 BOLA (Broken Object Level Auth) /users/123 -> /users/124 enum, unauthorized data access
API2 Broken Authentication Token replay, JWT manipulation, brute force endpoint
API3 Broken Object Property Level Auth Mass assignment (admin: true), excessive exposure
API4 Unrestricted Resource Consumption Missing rate limit, pagination size, file upload size
API5 BFLA (Broken Function Level Auth) Is /admin/* reachable with a user role
API6 Unrestricted Business Flows Bizlogic exploit (delegate to pentest-bizlogic)
API7 SSRF URL parameter cloud metadata reach
API8 Security Misconfig Verbose error, CORS *, default endpoint
API9 Improper Inventory v1/v2 same endpoint, different auth, shadow API
API10 Unsafe Consumption of 3rd Party API API key exfil, response trust

REST Test Methodology

1. Find the spec document: /swagger.json, /openapi.yaml, /api-docs
2. List endpoints + auth requirements
3. BOLA: numeric ID enum (user_id, doc_id, order_id)
4. BFLA: role change (cookie/header swap)
5. Rate limit: 100 requests/sec within 60s
6. CORS: Origin: evil.com -> reflect?
7. Verbose error: malformed body, sql-like input

GraphQL Test

# Introspection check (QUIET)
curl -X POST https://<target>/graphql -H 'Content-Type: application/json' -d '{"query":"{__schema{types{name fields{name}}}}"}'

# Common queries
- Field suggestion (typo) -> auto-suggest reveal
- Batching: 1000 queries in a single POST (DoS-readiness test)
- Alias overloading
- Deep nesting: { user { friend { friend { ... } } } } depth 10+

Read the full file on GitHub · 139 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. today First seen · 139 lines · 73 tokens per session scan A ff09741e7cb5

Subscribe to this mod's changes

pentest-api is a skill published in the GitHub repository fatihkan/badi (7 stars, last pushed yesterday), licensed MIT. It adds 73 tokens to every session and 1,204 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 2 findings (sends data to an external url, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-06.

Related

Other skills, from other repositories

mcp-builder

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

AvinashP/AgentsAtlas · 61 tokens

pr-triage

4-phase PR backlog management with audit, deep code review, validated comments, and optional worktree setup. Use when triaging pull requests, catching up on pending code reviews, or managing a backlog of open PRs. Args: 'all' to review all, PR numbers to focus (e.g. '42 57'), 'en'/'fr' for language, no arg = audit…

FlorianBruniaux/claude-code-plugins · 86 tokens

eval-agents

Audit Claude Code agents defined in .claude/agents/ for description specificity, model tier appropriateness, tools scoping, and system prompt quality. Detects dispatch ambiguity between agents, flags over-permissive tool grants, and checks for human-in-the-loop patterns that break programmatic orchestration. Use when…

FlorianBruniaux/claude-code-plugins · 93 tokens

issue-triage

3-phase issue backlog management with audit, deep analysis, and validated triage actions. Use when triaging GitHub issues, sorting bug reports, cleaning up stale tickets, or detecting duplicate issues. Args: 'all' to analyze all, issue numbers to focus (e.g. '42 57'), 'en'/'fr' for language, no arg = audit only.

FlorianBruniaux/claude-code-plugins · 81 tokens

landing-page-generator

Generate complete, deploy-ready landing pages from any repository. Use when creating a homepage for an open-source project, building a project website, converting a README into a marketing page, or standardizing landing pages across multiple repos.

FlorianBruniaux/claude-code-plugins · 48 tokens

release-notes

Generate release notes in multiple formats from git commits.

FlorianBruniaux/claude-code-plugins · 13 tokens