API Security Testing
БесплатноБез исполняемых скриптовНе проверенComprehensive API security testing based on OWASP API Security Top 10 including broken authentication, injection attacks, rate limiting, BOLA/BFLA…
от PramodDutta★ 253 звезды на GitHubОб этом скилле
API Security Testing Skill
You are an expert in API security testing. When the user asks you to test API security, implement OWASP API Top 10 checks, detect authentication and authorization vulnerabilities, or set up automated security scanning, follow these detailed instructions.
Core Principles
- OWASP API Security Top 10 coverage -- Every API security test suite must cover all 10 categories from the OWASP API Security Top 10 list, adapted to the specific API being tested.
- Authentication before authorization -- Test authentication mechanisms first (token validation, session management, credential handling), then test authorization (access control, privilege escalation).
- Broken Object Level Authorization (BOLA) -- The most critical API vulnerability. Test that every endpoint verifies the requesting user has access to the specific resource being requested.
- Input validation at every boundary -- Test all input vectors: path parameters, query strings, headers, request bodies, and file uploads for injection, overflow, and type confusion attacks.
- Rate limiting and resource exhaustion -- Verify that APIs implement rate limiting, request size limits, and pagination caps to prevent denial-of-service attacks.
- Sensitive data exposure -- Verify that APIs do not leak sensitive information in responses, error messages, headers, or logs.
- Automated scanning plus manual testing -- Automated tools catch common vulnerabilities. Manual testing catches business logic flaws. Both are required.
Project Structure
security-tests/
owasp/
bola.test.ts
broken-auth.test.ts
broken-object-property.test.ts
unrestricted-resource.test.ts
broken-function-level-auth.test.ts
mass-assignment.test.ts
ssrf.test.ts
security-misconfiguration.test.ts
improper-inventory.test.ts
unsafe-api-consumption.test.ts
auth/
token-validation.test.ts
session-management.test.ts
credential-handling.test.ts
oauth-flow.test.ts
injection/
sql-injection.test.ts
nosql-injection.test.ts
command-injection.test.ts
xss-injection.test.ts
header-injection.test.ts
rate-limiting/
rate-limit.test.ts
resource-exhaustion.test.ts
helpers/
api-client.ts
token-generator.ts
payload-generator.ts
vulnerability-reporter.ts
config/
security-config.ts
endpoints.ts
reports/
.gitkeep
BOLA (Broken Object Level Authorization) Testing
// security-tests/owasp/bola.test.ts
import { describe, it, expect, beforeAll } from 'vitest';
import { SecurityApiClient } from '../helpers/api-client';
describe('BOLA - Broken Object Level Authorization', () => {
let userAClient: SecurityApiClient;
let userBClient: SecurityApiClient;
let adminClient: SecurityApiClient;
let userAResourceId: string;
beforeAll(async () => {
userAClient = await SecurityApiClient.authenticateAs('userA');
userBClient = await SecurityApiClient.authenticateAs('userB');
adminClient = await SecurityApiClient.authenticateAs('admin');
// Create a resource owned by User A
const response = await userAClient.post('/api/resources', { name: 'Private Resource' });
userAResourceId = response.data.id;
});
it('should prevent User B from accessing User A resources', async () => {
const response = await userBClient.get(`/api/resources/${userAResourceId}`);
expect(response.status).toBe(403);
});
it('should prevent User B from modifying User A resources', async () => {
const response = await userBClient.put(`/api/resources/${userAResourceId}`, {
name: 'Hacked',
});
expect(response.status).toBe(403);
});
it('should prevent User B from deleting User A resources', async () => {
const response = await userBClient.delete(`/api/resources/${userAResourceId}`);
expect(response.status).toBe(403);
});
it('should prevent IDOR via numeric ID enumeration', async () => {
// Try accessing resources by incrementing/decrementing IDs
const numericId = parseInt(userAResourceId, 10);
if (!isNaN(numericId)) {
for (let offset = -5; offset <= 5; offset++) {
if (offset === 0) continue;
const testId = numericId + offset;
const response = await userBClient.get(`/api/resources/${testId}`);
expect([403, 404]).toContain(response.status);
}
}
});
it('should prevent IDOR via UUID guessing', async () => {
// Try variations of the UUID
const uuidVariations = [
userAResourceId.replace(/-/g, ''),
userAResourceId.toUpperCase(),
userAResourceId.slice(0, -1) + '0',
];
for (const variation of uuidVariations) {
const response = await userBClient.get(`/api/resources/${variation}`);
if (response.status === 200) {
expect.fail(`BOLA vulnerability: User B accessed resource with ID variation: ${variation}`);
}
}
});
it('should prevent accessing resources via nested
Установить API Security Testing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл API Security Testing?
Comprehensive API security testing based on OWASP API Security Top 10 including broken authentication, injection attacks, rate limiting, BOLA/BFLA vulnerabilities, and automated security scanning with ZAP and custom scripts.
Как установить скилл API Security Testing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл API Security Testing запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
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…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic