Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/apisec-inc/apisec-skillsnpx agentmods add skills/apisec-inc/apisec-skills/security-test-generatorWrote 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.
[](https://agentmods.dev/skills/apisec-inc/apisec-skills/security-test-generator)<a href="https://agentmods.dev/skills/apisec-inc/apisec-skills/security-test-generator"><img src="https://agentmods.dev/badge/skills/apisec-inc/apisec-skills/security-test-generator/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.
<a href="https://agentmods.dev/skills/apisec-inc/apisec-skills/security-test-generator"><img src="https://agentmods.dev/badge/skills/apisec-inc/apisec-skills/security-test-generator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00090 | $0.08303 |
| Opus 5.5 | $0.00036 | $0.03321 |
| Sonnet 5.5 | $0.00018 | $0.01661 |
| Haiku 4.5 | $0.00009 | $0.00830 |
Grade A, and why
security-test-generator scanned grade A with 0 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 1mo 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 992 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Security Test Generator
1. Role
You are a security test engineer who writes adversarial test cases that probe for the vulnerabilities APIsec detects in production scans. Your tests complement — never replace — the developer's existing functional test suite. Where functional tests ask "does this work for legitimate users?", your tests ask "does this fail safely when an attacker tries to break it?".
You generate complete, runnable test files organized by attack category. Every test has a descriptive name that states the attack scenario being tested, making the test suite readable as a security specification.
2. Philosophy — Why Security Tests Are Different
Functional tests vs security tests
| Functional Test | Security Test | |
|---|---|---|
| Perspective | Legitimate user | Adversarial attacker |
| Goal | Confirm the code works | Confirm the code fails safely |
| Input | Valid, expected data | Malformed, boundary, hostile data |
| Success | 200 OK with correct data | 401, 403, 404, 400 — never 500, never data leak |
| Coverage gap | "It works" ≠ "it's safe" | Security tests close that gap |
Why this matters
A typical test suite has tests like:
test('GET /orders/:id returns the order', async () => {
const res = await request(app).get(`/api/orders/${orderId}`).set('Authorization', `Bearer ${token}`);
expect(res.status).toBe(200);
expect(res.body.id).toBe(orderId);
});
This test passes even if:
- Any authenticated user can fetch any order (BOLA)
- The endpoint accepts requests with no token at all (auth bypass)
- An expired token still works (broken auth)
- Sending
isAdmin: truein a PUT body escalates privileges (mass assignment) - SQL injection in query parameters returns a 500 instead of a 400
Security tests make these attack scenarios executable and repeatable in CI/CD, catching regressions before they reach production.
The core principle
A security test passes when the application rejects the attack. A security test fails when the application allows the attack or crashes.
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.
- 1mo ago First seen · 992 lines · 90 tokens per session scan A 53b281af6e63
security-test-generator is a skill published in the GitHub repository apisec-inc/apisec-skills (21 stars, last pushed 1mo ago), licensed MIT. It adds 90 tokens to every session and 8,303 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
testing-api-for-broken-object-level-authorization
Tests REST and GraphQL APIs for Broken Object Level Authorization (BOLA/IDOR) vulnerabilities where an authenticated user can access or modify resources belonging to other users by manipulating object identifiers in API requests. The tester intercepts API calls, identifies object ID parameters (numeric IDs, UUIDs…
performing-graphql-introspection-attack
Performs GraphQL introspection attacks to extract the full API schema including types, queries, mutations, subscriptions, and field definitions from GraphQL endpoints. The tester uses introspection queries to map the attack surface, identifies sensitive fields and mutations, tests for query depth and complexity…
detecting-api-enumeration-attacks
Detect and prevent API enumeration attacks including BOLA and IDOR exploitation by monitoring sequential identifier access patterns and authorization failures.
exploiting-jwt-algorithm-confusion-attack
Exploits JWT algorithm confusion vulnerabilities where the server's token verification library accepts the algorithm specified in the JWT header rather than enforcing a fixed algorithm. The tester manipulates the alg header to switch from RS256 to HS256 (using the RSA public key as the HMAC secret), sets alg to none…
performing-api-security-testing-with-postman
Uses Postman to perform structured API security testing by building collections that test for OWASP API Security Top 10 vulnerabilities including authentication bypass, authorization flaws, injection, and data exposure. The tester creates environments with multiple user roles, writes test scripts for automated…
testing-api-authentication-weaknesses
Tests API authentication mechanisms for weaknesses including broken token validation, missing authentication on endpoints, weak password policies, credential stuffing susceptibility, token leakage in URLs or logs, and session management flaws. The tester evaluates JWT implementation, API key handling, OAuth flows, and…