Agent skill

Attacking Graphql

by trilwu in trilwu/secskills

Test GraphQL APIs — introspection and schema recovery when introspection is disabled, field suggestion abuse, batching and alias-based rate limit bypass, query depth and complexity denial of…

MITAuto-check passedBackend & APIs

Install Attacking Graphql

skills CLI
$ npx skills add trilwu/secskills --skill attacking-graphql -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install trilwu/secskills attacking-graphql --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/trilwu/secskills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/secskills-offense/skills/attacking-graphql .claude/skills/attacking-graphql && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
attacking-graphql
GitHub stars
156
Token cost
~2.3k tokens
SKILL.md length
846 words
Files
1
Skills in repo
50
Repo updated
First seen
Licence
MIT

At a glance

Test GraphQL APIs — introspection and schema recovery when introspection is disabled, field suggestion abuse, batching and alias-based rate limit bypass, query depth and complexity denial of…

  • A target exposes /graphql
  • SKILL.md covers When to Use, When NOT to Use, Recover the Schema and Authorization Is the Main Event, plus 7 more sections
  • Calls curl, jq and python3
  • Requests contain a query

What it does

Attacking Graphql is an agent skill from trilwu/secskills. Test GraphQL APIs — introspection and schema recovery when introspection is disabled, field suggestion abuse, batching and alias-based rate limit bypass, query depth and complexity denial of service, authorization gaps per field and per resolver, and mutation abuse. Use when a target exposes /graphql, /v1/graphql, or /api/graphql, when requests contain a query or mutation body, or when responses carry a data and errors envelope.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering GraphQL. It works with GraphQL. The repository describes itself as: Transform Claude Code into your personal security engineer. The licence is MIT.

When your agent uses it

  • A target exposes /graphql
  • Requests contain a query
  • Responses carry a data and errors envelope

Example prompts

  • “/attacking-graphql”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit ca53957. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl
    • jq
    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • attack.mitre.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Attacking Graphql loads about 2.3k tokens when it runs. Until then it costs about 113 tokens; SKILL.md has 846 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~113
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from trilwu/secskills at commit ca53957, republished under its MIT licence (© trilwu). 846 words, ~2,282 tokens.

Download SKILL.mdSave it as .claude/skills/attacking-graphql/SKILL.md (or your agent's skills folder).
name
attacking-graphql
description
Test GraphQL APIs — introspection and schema recovery when introspection is disabled, field suggestion abuse, batching and alias-based rate limit bypass, query depth and complexity denial of service, authorization gaps per field and per resolver, and mutation abuse. Use when a target exposes /graphql, /v1/graphql, or /api/graphql, when requests contain a query or mutation body, or when responses carry a data and errors envelope.
verified
2026-07-27

Attacking GraphQL

GraphQL moves authorization from routes to resolvers, and most teams do not move their access control with it. The REST habit of protecting /admin/* has no equivalent when every operation arrives at one endpoint — so the recurring finding is not an exotic GraphQL bug, it is an ordinary authorization failure on a field nobody thought to guard.

When to Use

  • The target exposes /graphql, /graphiql, /v1/graphql, /api/graphql
  • Request bodies contain query, mutation, subscription, or operationName
  • Responses have the {"data": ..., "errors": [...]} envelope
  • A mobile or SPA client posts GraphQL to a backend
  • You need to map an API whose schema you do not have

When NOT to Use

  • REST or gRPC — use testing-apis or attacking-grpc-protobuf
  • Source code available — use auditing-code-for-vulnerabilities; read the resolvers, which is faster and more complete
  • The web app around it — use testing-web-applications
  • Building a denial-of-service against production — model the risk, prove it minimally, and get explicit authorization before any load

Recover the Schema

bash
# Standard introspection
curl -s https://target/graphql -H 'Content-Type: application/json' \
  -d '{"query":"query{__schema{types{name fields{name args{name type{name}}}}}}"}' | jq .

# Tooling that renders it usefully
graphql-cop -t https://target/graphql
clairvoyance https://target/graphql -o schema.json     # works WITHOUT introspection
graphw00f -t https://target/graphql                    # fingerprint the engine

When introspection is disabled, the schema is usually still recoverable. Most engines return "did you mean" suggestions on a misspelled field, which leaks valid names one character class at a time. clairvoyance automates exactly this.

bash
# Field suggestion leak — the response names fields you did not know
curl -s https://target/graphql -d '{"query":"{ userr { id } }"}' -H 'Content-Type: application/json'
# → "Cannot query field \"userr\" on type \"Query\". Did you mean \"user\"?"

Other schema sources: the client bundle (queries are usually inlined in the JS), a .graphql file served by mistake, persisted-query manifests, and Apollo Studio or similar tooling left public.

Fingerprint the engine — behaviour differs materially. Apollo, graphql-js, Hasura, graphene, gqlgen, and HotChocolate each have distinct defaults for batching, suggestions, depth limits, and error verbosity. graphw00f names it.

Authorization Is the Main Event

Test authorization per field and per resolver, not per endpoint. A schema where user(id:) is guarded but user { organization { members { email } } } is not is the standard finding.

graphql
# 1. Object-level: request another tenant's or user's object by ID
query { user(id: "other-user-id") { id email phone } }

# 2. Field-level: the object is yours, but a field should not be exposed
query { me { id email passwordHash internalNotes stripeCustomerId } }

# 3. Traversal: reach a protected object through an unguarded edge
query { post(id: 1) { author { email resetToken orders { total } } } }

# 4. Mutations: the usual suspects, called directly
mutation { updateUser(id: "other", input: {role: ADMIN}) { id role } }
mutation { deleteAccount(id: "other") { success } }

Traversal through relationships is the highest-yield test. Developers guard the entry points they think about; nested edges inherit whatever the parent resolver allowed, and often that is nothing. Enumerate the schema's edges and walk from any object you legitimately own toward objects you do not.

Repeat every test at each privilege level you have: anonymous, low-privilege user, and a second tenant's user.

Batching and Alias Abuse

One HTTP request can carry many operations, which defeats per-request rate limiting — the classic 2FA and password brute-force bypass.

graphql
# Aliases: N attempts, one request
{
  a1: login(user:"admin", pass:"1234") { token }
  a2: login(user:"admin", pass:"1235") { token }
  a3: login(user:"admin", pass:"1236") { token }
}
json
[ {"query":"{ user(id:1){email} }"},
  {"query":"{ user(id:2){email} }"},
  {"query":"{ user(id:3){email} }"} ]

Array batching is supported by default in several engines. Test both forms; they are often limited differently, and rate limiting applied at the HTTP layer sees one request either way.

Denial of Service by Query Shape

graphql
# Depth: cyclic relationships nested repeatedly
{ user { posts { author { posts { author { posts { id } } } } } } }

# Breadth: aliases multiply one expensive resolver
{ a: search(q:"x"){id} b: search(q:"x"){id} c: search(q:"x"){id} ... }

# Field duplication amplifies without depth
{ user { id id id id id id ... } }

Check for: a depth limit, a complexity/cost limit, a timeout, a node limit on pagination, and whether the engine batches N+1 resolver calls or issues one query per node. Prove the risk with a small, bounded query — measure the response-time gradient across depths rather than actually exhausting the service. A single 8-level query that takes 30 seconds when a 3-level one takes 30 milliseconds is the evidence; you do not need to take the API down.

Show full SKILL.md (369 more words)Show less

Injection Through Resolvers

Resolvers reach databases the same as any other handler, so the classic classes apply — with the twist that arguments are strongly typed, which people mistake for validation.

graphql
{ user(filter: "1' OR '1'='1") { id } }                 # SQL/NoSQL injection
{ users(where: {email: {_ilike: "%"}}) { email } }       # Hasura-style filter abuse
{ file(path: "../../etc/passwd") { contents } }          # traversal

Hasura and similar auto-generated APIs deserve specific attention: they expose rich where filters directly to the client, so a permissive row-level-security configuration means the filter language itself becomes the vulnerability.

Other Checks Worth Running

  • CSRF via GET or form-encoded queries. If the endpoint accepts ?query=mutation{...} or application/x-www-form-urlencoded, mutations are reachable cross-origin without a preflight.
  • Introspection in production — low severity alone, but it hands over the map.
  • Verbose errors leaking stack traces, resolver names, and internal paths.
  • Subscriptions over WebSocket — authorization is frequently checked at connect and never again, so a long-lived subscription survives logout and privilege changes.
  • Persisted queries — check whether the server still accepts arbitrary queries when the client only sends hashes; an APQ implementation that falls back to arbitrary queries provides no protection.
  • File uploads via the multipart spec, which is a separate parser.

Rationalizations to Reject

  • "Introspection is disabled, so the schema is protected." Suggestions leak it, and the client bundle contains it.
  • "The gateway rate-limits the endpoint." It counts HTTP requests. Aliases and batching put a thousand operations in one.
  • "Arguments are typed, so injection is impossible." Types constrain shape, not content. A String still reaches the database.
  • "That field is only used by the admin UI." The schema exposes it to everyone; the UI is not an access control.
  • "The top-level query checks authorization." Test the nested edges. That is where it fails.
  • "Depth limiting is in place." Check breadth and aliases too.
  • "I'll prove the DoS by taking it down." Prove the gradient. Ask before load.
<!-- attack:start -->

ATT&CK Coverage

Generated from secskills-core/ttp-index.json — edit that file, then run python3 scripts/sync_attack.py --write. Re-verify IDs against the current ATT&CK release before citing them in a report.

Initial Access (TA0001)

  • T1190 Exploit Public-Facing Application — see also testing-web-applications, testing-apis, enumerating-network-services, attacking-grpc-protobuf, exploiting-deserialization, exploiting-ssrf, exploiting-xxe

Detection content for any of these: engineering-detections. Proactive search: hunting-threats. Post-compromise: responding-to-incidents.

<!-- attack:end -->

References

  • testing-apis — the general API methodology this specializes
  • auditing-code-for-vulnerabilities — resolver-level review when source exists
  • testing-web-applications — the app around the endpoint
  • reporting-security-findings — severity for authorization findings
  • graphw00f, clairvoyance, graphql-cop, InQL (Burp), Altair/GraphiQL

© trilwu, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in secskills-offense/skills/attacking-graphql of trilwu/secskills.

Open the folder on GitHubat commit ca53957

Compare with similar skills

Attacking Graphql next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Attacking Graphql compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Attacking Graphql this skilltrilwu/secskills156—~2.3kAutomated safety check: PassMIT
API DesignerJeffallan/claude-skills12k2 repos~2kAutomated safety check: PassMIT
Nodejs Backend Patternsever-works/ever-works15818 repos~4kAutomated safety check: PassAGPL-3.0
GraphQL Operations with CodegenChrisWiles/claude-code-showcase6.1k3 repos~1.5kAutomated safety check: PassNone
API Design Principlesjh941213/my-cc-harness12620 repos~3.4kAutomated safety check: PassNone
API And Interface Designdzhalaevd/Donatello1359 repos~2.6kAutomated safety check: PassApache-2.0

Similar skills

  • API Designer

    Jeffallan/claude-skills

    Designs REST and GraphQL APIs from resource modeling to an OpenAPI 3.1 contract, with versioning, pagination and RFC 7807 error handling.

    12k GitHub starsUsed in 2 repos~2k tokens
    Backend & APIsAuto-check passed
  • Nodejs Backend Patterns

    ever-works/ever-works

    Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices.

    158 GitHub starsUsed in 18 repos~4k tokens
    Backend & APIsAuto-check passed
  • GraphQL Operations with Codegen

    ChrisWiles/claude-code-showcase

    Sets the rules for writing GraphQL queries and mutations in .gql files, running codegen, and using generated Apollo hooks with proper error and loading handling.

    6.1k GitHub starsUsed in 3 repos~1.5k tokens
    Backend & APIsAuto-check passed
  • API Design Principles

    jh941213/my-cc-harness

    REST 및 GraphQL API 설계 원칙 가이드. An agent skill from jh941213/my-cc-harness.

    126 GitHub starsUsed in 20 repos~3.4k tokens
    Backend & APIsAuto-check passed
  • API And Interface Design

    dzhalaevd/Donatello

    Guides stable API and interface design. An agent skill from dzhalaevd/Donatello.

    135 GitHub starsUsed in 9 repos~2.6k tokens
    Backend & APIsAuto-check passed
  • Designing APIs

    CloudAI-X/claude-workflow-v2

    Designs REST and GraphQL APIs including endpoints, error handling, versioning, and documentation.

    1.4k GitHub starsUsed in 2 repos~1.2k tokens
    Backend & APIsAuto-check passed

More from trilwu/secskills

All 50 skills in this repo
  • Audit source code for exploitable vulnerabilities using threat-model-driven review, taint tracing, invariant checking, and variant analysis.

    156 GitHub stars~3.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Perform OSINT, subdomain enumeration, port scanning, web reconnaissance, email harvesting, and cloud asset discovery for initial access.

    156 GitHub stars~3.1k tokensUpdated 1 mo ago
    Auto-check: notes
  • Securing AI Systems

    trilwu/secskills

    Assess and harden LLM applications and agentic systems against prompt injection, tool misuse, excessive agency, memory poisoning, RAG data leakage, and model supply-chain risk, mapped to the OWASP…

    156 GitHub stars~2.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Analyzing Binaries

    trilwu/secskills

    Reverse engineer compiled binaries, firmware, and mobile app packages using triage, static disassembly, decompilation, and dynamic instrumentation.

    156 GitHub stars~2.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Analyzing Go Binaries

    trilwu/secskills

    Reverse engineer Go binaries by recovering function names and types from pclntab and moduledata using GoReSym, redress, and IDA/Ghidra Go plugins, and by reading Go's non-standard calling…

    156 GitHub stars~2k tokensUpdated 1 mo ago
    Auto-check passed
  • Analyzing iOS Binaries

    trilwu/secskills

    Analyze iOS applications at the binary level — decrypting FairPlay-protected IPAs with frida-ios-dump or bagbak, inspecting Mach-O load commands, recovering Objective-C headers with class-dump, and…

    156 GitHub stars~2k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Categories

Questions about Attacking Graphql

What does Attacking Graphql do?

Test GraphQL APIs — introspection and schema recovery when introspection is disabled, field suggestion abuse, batching and alias-based rate limit bypass, query depth and complexity denial of…. Attacking Graphql is an agent skill from trilwu/secskills. Test GraphQL APIs — introspection and schema recovery when introspection is disabled, field suggestion abuse, batching and alias-based rate limit bypass, query depth and complexity denial of service, authorization gaps per field and per resolver, and mutation abuse.

When should I use Attacking Graphql?

Attacking Graphql fits situations like: A target exposes /graphql; requests contain a query; responses carry a data and errors envelope.

How do I install Attacking Graphql in Claude Code?

Run `npx skills add trilwu/secskills --skill attacking-graphql -a claude-code`. Or copy the skill folder (secskills-offense/skills/attacking-graphql in trilwu/secskills) into .claude/skills/attacking-graphql in your project. Claude Code loads it when a task matches its description.

How do I install Attacking Graphql in Codex?

Run `npx skills add trilwu/secskills --skill attacking-graphql -a codex`. Or copy the skill folder (secskills-offense/skills/attacking-graphql in trilwu/secskills) into .agents/skills/attacking-graphql in your project. Codex loads it when a task matches its description.

Can I use Attacking Graphql in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add trilwu/secskills --skill attacking-graphql -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/attacking-graphql, .gemini/skills/attacking-graphql, .github/skills/attacking-graphql and .opencode/skills/attacking-graphql in your project.

What does Attacking Graphql need to run?

Going by SKILL.md and its folder, Attacking Graphql needs the command-line tools its instructions call (curl, jq and python3). Our summary lists: Python 3.

Does Attacking Graphql access the network?

SKILL.md names 1 domain. As links in the text: attack.mitre.org. This is read from the text; nothing was executed.

Is Attacking Graphql safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Attacking Graphql use?

Attacking Graphql is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Attacking Graphql use?

About 2.3k tokens (SKILL.md is roughly 9.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Attacking Graphql?

Skills that share tags, products or a category with Attacking Graphql: API Designer (Jeffallan/claude-skills, 12k stars), Nodejs Backend Patterns (ever-works/ever-works, 158 stars), GraphQL Operations with Codegen (ChrisWiles/claude-code-showcase, 6.1k stars) and API Design Principles (jh941213/my-cc-harness, 126 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Attacking Graphql?

trilwu (a GitHub user) maintains it in trilwu/secskills, which has 156 GitHub stars. The repository holds 50 skills in this directory. The repository was last updated on September 4, 2026.

Source: trilwu/secskills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.