wstg-api-testing

Tests GraphQL APIs for vulnerabilities using the OWASP WSTG v4.2 methodology.

Updated Jul 29, 2026
One-click install
npx skills add https://github.com/MaiconGambini/opencode-harness-guide --skill wstg-api-testing-maicongambini
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wstg-api-testing
Source: https://github.com/MaiconGambini/opencode-harness-guide/tree/main/skills/wstg-api-testing
Command: npx skills add https://github.com/MaiconGambini/opencode-harness-guide --skill wstg-api-testing-maicongambini

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? GraphQL APIs expose unique attack surfaces—introspection leaks, recursive query DoS, batching abuse, and missing resolver-level authorization—that traditional REST testing approaches miss. This Skill provides a systematic methodology to find these flaws during penetration tests and security assessments. ## Core Features & Use Cases - Introspection and Schema Analysis: Enumerate types, queries, and mutations via introspection or error-based schema reconstruction to map the full attack surface. - Authorization and Injection Testing: Test every resolver for IDOR, broken object-level authorization, SQL injection, XSS, and custom scalar injection. - DoS and Batching Attack Detection: Craft deep nested queries and batched/aliased operations to identify missing depth limits, complexity scoring, and rate-limit bypasses. - Use Case: During a security assessment of a GraphQL-backed application, use this Skill to extract the schema, test authorization across user roles, and attempt batched brute-force attacks against authentication mutations. ## Quick Start Use the wstg-api-testing skill to test the GraphQL endpoint at the target URL for introspection exposure, authorization flaws, and injection vulnerabilities.

Frequently Asked Questions about wstg-api-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test a GraphQL API for security vulnerabilities?

Start with introspection to map the schema, then test authorization on every resolver with different user contexts, inject SQL and XSS payloads into arguments, and attempt deep nested queries and batched operations. Follow the OWASP WSTG-APIT-01 methodology for systematic coverage.

How to test GraphQL authorization and IDOR vulnerabilities?

Extract all queries and mutations from the schema, then replay them with different authentication contexts: unauthenticated, low-privilege, and another user's token. Substitute other users' IDs in arguments to detect broken object-level authorization, since GraphQL itself enforces no access control.

What is a GraphQL batching attack and how does it bypass rate limiting?

GraphQL accepts multiple operations in a single HTTP request as a JSON array or via aliases. Since WAFs and rate limiters typically count HTTP requests, one batched request can carry hundreds of brute-force attempts against authentication or token endpoints undetected.

Can GraphQL introspection be exploited if it is disabled?

Yes. Even with introspection disabled, GraphQL error messages often leak type names, field names, and expected argument types. An attacker can incrementally reconstruct the schema from these error fragments, so generic error responses are also required.

How do I prevent denial of service from nested GraphQL queries?

Enforce maximum query depth, assign complexity scores to fields and reject queries exceeding a cost threshold, apply query timeouts, and require pagination limits on list fields. Circular type relationships make unbounded recursion possible without these controls.