api-security

api-security is an agent for coding agents from 0xSteph/pentest-ai-agents. It costs 43 tokens per session (1,271 once invoked), scanned A, original, MIT.

A security-testing agent for web service interfaces such as REST, GraphQL, gRPC, SOAP, and WebSocket APIs. An API is a structured way for software to exchange data and perform actions.

In plain words
What is it for?
It helps assess object and function permissions, login and token handling, input and response data, resource limits, business workflows, and server-side request behavior.
Why use it?
It gives authorized testers a method for finding access-control, authentication, data-exposure, rate-limit, and other API weaknesses.

Agent

Part of the pentest-ai-agents plugin — 3 commands, 53 agents shipped together

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.

agentmods
npx agentmods add agents/0xsteph/pentest-ai-agents/api-security
Clone the repo
git clone --depth 1 https://github.com/0xSteph/pentest-ai-agents

Or install pentest-ai-agents, the plugin that ships this one along with the rest of its 3 commands, 53 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/0xsteph/pentest-ai-agents/api-security.svg)](https://agentmods.dev/agents/0xsteph/pentest-ai-agents/api-security)
Your own site
<a href="https://agentmods.dev/agents/0xsteph/pentest-ai-agents/api-security"><img src="https://agentmods.dev/badge/agents/0xsteph/pentest-ai-agents/api-security.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,271 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00043 $0.01271
Opus 5 $0.00022 $0.00635
Sonnet 5 $0.00009 $0.00254
Haiku 4.5 $0.00004 $0.00127

Measured 4d ago against content hash 49f68ebd1288, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

api-security 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 4d 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.

2. **Show HTTP requests.** Always include exact curl commands or HTTP request/response pairs.
agents/api-security.md · 103 lines

How it starts

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

You are an expert API security tester specializing in REST, GraphQL, gRPC, SOAP, and WebSocket security assessment. You provide methodology guidance for authorized API penetration testing following the OWASP API Security Top 10 and industry best practices.

Core Expertise

OWASP API Security Top 10 (2023)

  1. API1:2023: Broken Object Level Authorization (BOLA): IDOR testing methodology, horizontal privilege escalation, predictable ID enumeration, UUID vs integer ID testing
  2. API2:2023: Broken Authentication: Authentication bypass, credential stuffing, token analysis, session management flaws, MFA bypass
  3. API3:2023: Broken Object Property Level Authorization: Mass assignment, excessive data exposure, response filtering bypass
  4. API4:2023: Unrestricted Resource Consumption: Rate limiting bypass, resource exhaustion, regex DoS, pagination abuse
  5. API5:2023: Broken Function Level Authorization (BFLA): Vertical privilege escalation, admin endpoint discovery, HTTP method tampering
  6. API6:2023: Unrestricted Access to Sensitive Business Flows: Business logic abuse, flow manipulation, race conditions
  7. API7:2023: Server Side Request Forgery (SSRF): Internal service access, cloud metadata exploitation, protocol smuggling
  8. API8:2023: Security Misconfiguration: CORS misconfiguration, verbose errors, unnecessary HTTP methods, default credentials
  9. API9:2023: Improper Inventory Management: Shadow APIs, deprecated endpoints, versioning inconsistencies, undocumented endpoints
  10. API10:2023: Unsafe Consumption of APIs: Third-party API trust, data validation on external input, supply chain risks

Authentication & Authorization Testing

  • JWT attacks: Algorithm confusion (none, HS256->RS256), key cracking, claim manipulation, JKU/X5U injection, embedded JWK, kid injection
  • OAuth 2.0: Authorization code interception, PKCE bypass, redirect URI manipulation, scope escalation, token leakage, CSRF on authorization endpoint, open redirect chains
  • OIDC: ID token manipulation, nonce reuse, issuer validation bypass
  • API key testing: Key in URL vs header, key scope analysis, key rotation testing, leaked key discovery
  • Session management: Token entropy, session fixation, concurrent session handling, logout validation

Read the full file on GitHub · 103 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. 4d ago First seen · 103 lines · 43 tokens per session scan A 49f68ebd1288

Subscribe to this mod's changes

api-security is an agent published in the GitHub repository 0xSteph/pentest-ai-agents (2,196 stars, last pushed 18d ago), licensed MIT. It adds 43 tokens to every session and 1,271 once invoked, about $0.0002 per session on Opus 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-08-30.

Related

Other agents, from other repositories

web3-auditor

Smart contract security auditor. Checks 10 bug classes in order of frequency (accounting desync 28%, access control 19%, incomplete path 17%, off-by-one 22% of Highs, oracle errors, ERC4626 attacks, reentrancy, flash loan oracle manipulation, signature replay, proxy/upgrade issues). Applies pre-dive kill signals…

Awarexone/Agentic-Bug-Hunter · 101 tokens

web-researcher

Technical research, library evaluation, and best practices investigation. Use for comparing technologies, researching APIs, and finding documentation.

davidmatousek/tachi · 28 tokens

c2-operator

Command and control infrastructure specialist for authorized red team operations. Handles Sliver C2 framework, Havoc C2, Metasploit multi-handler, msfvenom payload generation, implant configuration, HTTPS C2 traffic blending, and operator session management. Triggers on: C2, command and control, Sliver, Havoc…

mukul975/Threatswarm · 94 tokens

crypto-attacker

Cryptography and TLS security specialist. Handles TLS configuration auditing, JWT algorithm confusion, padding oracle attacks, hash cracking mode selection, RSA weak key analysis, ECB mode detection, certificate inspection, and crypto protocol attacks. Triggers on: TLS, SSL, cipher, JWT, padding oracle, RSA, hash…

mukul975/Threatswarm · 86 tokens

tachi-risk-scorer

Quantitative risk scoring agent that enriches threat model findings with four-dimensional scores (CVSS 3.1, exploitability, scalability, reachability), computes weighted composite scores, attaches governance fields, and generates dual-format output (risk-scores.md and risk-scores.sarif).

davidmatousek/tachi · 65 tokens

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens