API Security Testing

    by Mr Vempire

    1

    Audit REST and GraphQL APIs against the OWASP API Security Top 10 with a structured test matrix and automated test generation.

    $12

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    API Security Testing

    Example session with this skill installed

    I need to test my order management API. I have the OpenAPI spec and two test accounts: a standard customer and a warehouse manager. Map the surface and check for BOLA on the order ID.

    • Read your context and instructions
    • Compiled the api security testing

    I have mapped the API surface from the provided OpenAPI spec and initialized the security test matrix. Below is the assessment of the GET /api/v1/orders/{orderId} and PATCH /api/v1/orders/{orderId} endpoints focusing on Broken Object-Level Authorization (BOLA).

    API Security Test Matrix (BOLA Focus)

    EndpointMethodRolePayload LocationFindingEvidence
    /api/v1/orders/{id}GETCustomer BPathVULNERABLERequested ID ORD-99 (User A) -> 200 OK
    /api/v1/orders/{id}GETCustomer BQueryPASS?id=ORD-99 -> 404 Not Found
    /api/v1/orders/{id}PATCHCustomer BBodyVULNERABLESent {"status":"SHIPPED"} for ORD-99 -> 200 OK
    /api/v1/orders/{id}DELETECustomer BPathPASSRequested ID ORD-99 -> 403 Forbidden

    Executable Test Cases (bola_checks.py)

    import requests
    
    # Test: API1 - BOLA on Order Retrieval
    # Target: GET /api/v1/orders/{orderId}
    def test_bola_path_parameter(base_url, attacker_token, victim_order_id):
        headers = {"Authorization": f"Bearer {attacker_token}"}
        url = f"{base_url}/api/v1/orders/{victim_order_id}"
        response = requests.get(url, headers=headers)
        
        if response.status_code == 200:
            print(f"[!] BOLA Detected: Customer can access Order {victim_order_id}")
        else:
            print(f"[+] Secure: Received {response.status_code}")
    
    # Test: API3 - Mass Assignment on Order Status
    def test_mass_assignment(base_url, customer_token, order_id):
        headers = {"Authorization": f"Bearer {customer_token}"}
        payload = {"id": order_id, "status": "DELIVERED", "internal_notes": "hacked"}
        url = f"{base_url}/api/v1/orders/{order_id}"
        response = requests.patch(url, json=payload, headers=headers)
        
        if response.json().get("internal_notes") == "hacked":
            print("[!] Mass Assignment: Internal fields updated via API")
    

    Next steps

    1. Implement object-level ownership checks in the Order controller to ensure auth.user_id == order.owner_id.
    2. Disable the PATCH method for standard customers on the orders endpoint.
    3. Apply a DTO (Data Transfer Object) or allow-list to the update endpoint to prevent mass assignment of internal fields.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Securing APIs requires more than just checking for a valid token. Most vulnerabilities live in the business logic where authorization checks are missing, allowing attackers to access other users' data or admin functions. This skill provides a systematic methodology to audit REST and GraphQL APIs against the OWASP API Security Top 10.

    What it does

    • Surface Mapping Identifies documented and hidden endpoints, including legacy versions and debug routes.
    • BOLA Testing Probes for Broken Object-Level Authorization by manipulating IDs in paths, queries, and request bodies.
    • BFLA Validation Executes Broken Function-Level Authorization checks by calling admin-only endpoints with low-privilege tokens.
    • Data Exposure Audit Detects excessive data exposure and mass assignment vulnerabilities in update requests.
    • Resource Limiting Tests for unrestricted resource consumption through rate limit bypasses and pagination abuse.
    • GraphQL Analysis Evaluates schema introspection, query depth, and batching vulnerabilities specific to GraphQL resolvers.

    How it works

    1. Map the surface by collecting endpoints from OpenAPI specs, network traffic, and client-side JavaScript bundles.
    2. Build a test matrix that maps every endpoint against every available user role and privilege level.
    3. Execute the playbook across all nine modules, from authentication bypasses to business-flow logic flaws.
    4. Generate test cases using openapi-testgen.py to create executable checks for BOLA and rate limiting.

    Frameworks & tools

    This skill is designed for testing REST and GraphQL APIs. It utilizes openapi-testgen.py for automated test generation and works alongside intercepting proxies like Burp Suite or OWASP ZAP, and REST clients like curl.

    Why this beats prompting it yourself

    Generic security prompts often miss the nuance of testing the same ID in three different locations or checking for undocumented /v2/ routes. This skill enforces a rigid matrix-based approach that ensures every role-endpoint combination is actually verified with evidence.

    Use cases

    • Auditing a new API version before it moves to production.
    • Identifying authorization gaps during a bug bounty engagement.
    • Verifying that front-end restrictions are actually enforced by the backend.
    • Benchmarking internal APIs against the 2023 OWASP API Security Top 10.

    Known limitations

    Requires pre-existing API documentation or captured network traffic to map the surface. Only generates executable tests if a valid OpenAPI spec is provided.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 5 days ago

    Permissions

    Terminal / Shell
    Network Access
    Read Files
    Write Files

    Allowed Hosts

    api.example.com
    Listed5 days ago

    What's inside

    Creator

    Mr Vempire

    Mr Vempire

    32 skills on Agensi

    Frequently Asked Questions

    This skill automates the testing of REST and GraphQL endpoints against the 2023 OWASP API Security Top 10, specifically targeting complex business logic flaws like BOLA and BFLA that standard scanners often miss.

    You will receive the structured testing methodology, the matrix-based audit playbook, and the `openapi-testgen.py` script for generating executable test cases from your specs.

    The skill requires either an OpenAPI (Swagger) specification file or a collection of captured network traffic (e.g., from Burp Suite or ZAP) to map the API's surface and generate accurate tests.

    Yes, the GraphQL Analysis module is specifically designed to evaluate schema-specific risks such as introspection leaks, excessive query depth, and batching attacks.

    While the skill is platform-agnostic, it is optimized for LLMs with large context windows that can process API schemas and requires an environment capable of running Python scripts for the test generation component.

    This skill is designed for Point-in-Time auditing and CI/CD verification; however, it does not provide continuous 24/7 monitoring or real-time firewall protection.

    New in Security

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.