graphql-audit
できること
このスキルは、クライアントが一度の呼び出しで多くのフィールドを要求できる GraphQL API を監査する方法を説明します。スキーマの露出、個々のフィールドのアクセス制御、バッチ処理やネストしたクエリの悪用を扱います。
使う場面
- ✓対象が /graphql などの GraphQL エンドポイントを公開しているとき。
- ✓テスターが、スキーマのイントロスペクションが開いているか確認したいとき。
- ✓テスターが、ある利用者が GraphQL を通じて別の利用者のデータを読めないか確かめたいとき。
スキルのリンク
https://github.com/awarexone/Agentic-Bug-Hunter/blob/main/skills/graphql-audit/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“この GraphQL エンドポイントについて、イントロスペクションが開いているか、個々のオブジェクトへのアクセス確認が欠けていないかを監査してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは GraphQL のエンジンを特定し、スキーマが開いているか確認します。その後、フィールドの候補表示とアクセス制御をテストします。バッチ処理やエイリアスのパターンも試し、確認できたことを報告します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
GRAPHQL SECURITY AUDIT
GraphQL flips the threat model — clients drive queries. One endpoint, infinite attack surface. Introspection hands you the schema; even without it, field suggestions give you 80% back.
0. QUICK KILL CHECKLIST
[ ] Run graphql_audit.sh <endpoint> — full automated sweep
[ ] Check if introspection is enabled (__schema query)
[ ] If introspection off — run clairvoyance for field discovery
[ ] Fingerprint engine (graphw00f) — different engines, different CVEs
[ ] Test query batching — send 100 identical queries in one POST
[ ] Test alias bombing — 1000 aliases in one query
[ ] Check field suggestions on typos — leaks schema even when introspection off
[ ] Try IDOR: query another user's object by ID, no auth check
[ ] Test field-level auth: query privileged fields (admin, role, internalNote)
[ ] Inject SQLi/NoSQLi via string arguments — id, filter, search args
[ ] Check subscriptions: can you subscribe to other users' events?
[ ] Try introspection bypass: __schema\nquery, query batching, fragment tricks
[ ] Look for mutation rate limiting — account takeover / self-XSS via mutations
1. TOOL — graphql_audit.sh
# Basic audit
bash bughunter/tools/graphql_audit.sh https://target.com/graphql
# With auth cookie
bash bughunter/tools/graphql_audit.sh https://target.com/api/graphql --cookie "session=abc123"
# With Authorization header
bash bughunter/tools/graphql_audit.sh https://target.com/graphql --header "Authorization: Bearer TOKEN"
# Through Burp proxy
bash bughunter/tools/graphql_audit.sh https://target.com/graphql --proxy http://127.0.0.1:8080
# Custom output directory
bash bughunter/tools/graphql_audit.sh https://target.com/graphql --output-dir ./findings/target/graphql
Output: findings/<target>/graphql/<timestamp>/
introspection.json— full schema dump (if enabled)fingerprint.txt— engine type (graphw00f)field_suggestions.txt— discovered fields via clairvoyancebatching_dos.txt— response time delta for 1 vs 100 queriesalias_bomb.txt— alias depth test resultsinjection.txt— injection scan results (built-in SQLi probe)cop_report.txt— graphql-cop attack checklist resultssummary.txt— hit/miss per phase
2. INTROSPECTION — Schema Leak (Most Common First Step)
Check If Enabled
curl -s -X POST https://target.com/graphql \
-H 'Content-Type: application/json' \
-d '{"query":"{ __schema { queryType { name } } }"}' | jq .
Full Schema Dump
# Pull complete introspection schema (pipe to InQL or graphql-voyager)
curl -s -X POST https://target.com/graphql \
-H 'Content-Type: application/json' \
-d '{
"query": "query IntrospectionQuery { __schema { queryType { name } mutationType { name } subscriptionType { name } types { ...FullType } directives { name description locations args { ...InputValue } } } } fragment FullType on __Type { kind name description fields(includeDeprecated: true) { name description args { ...InputValue } type { ...TypeRef } isDeprecated deprecationReason } inputFields { ...InputValue } interfaces { ...TypeRef } enumValues(includeDeprecated: true) { name description isDeprecated deprecationReason } possibleTypes { ...TypeRef } } fragment InputValue on __InputValue { name description type { ...TypeRef } defaultValue } fragment TypeRef on __Type { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name } } } } } } } }"
}' | jq . > schema.json
What To Look For In The Schema
- Mutations involving user data: updateUser, deleteAccount, changeEmail, changePassword
- Queries returning other users' objects: user(id: X), order(id: X)
- Fields: internalNote, adminOnly, role, isAdmin, rawPassword, apiKey
- Types: AdminUser, InternalConfig, DebugInfo
- Deprecated fields — often bypassed auth or forgotten
- Subscription types — real-time data leaks
Introspection Bypass Techniques
When __schema is blocked, try:
# Newline injection (bypasses naive keyword filters)
{"query": "query {\n __schema\n { queryType { name } } }"}
# Fragment trick
{"query": "fragment f on __Schema { queryType { name } } { ...f }"}
# __type instead of __schema (often overlooked in blocklists)
{"query": "{ __type(name: \"User\") { fields { name type { name } } } }"}
# Via GET request (some servers allow GET, filter only POST)
GET /graphql?query={__schema{queryType{na
よくある質問
イントロスペクションとは何ですか?
スキーマ全体を明らかにできる GraphQL の機能で、このスキルは、それが有効になっているかを確認します。
イントロスペクションが無効な場合はどうしますか?
フィールドの探索と、打ち間違い時の候補表示を確認するよう勧めています。これでもスキーマの一部が分かることがあります。
どのツールが挙げられていますか?
graphw00f、clairvoyance、GraphQLmap、graphql-cop、inql が挙げられています。
詳細
作者による元の説明
GraphQL security hunting — introspection abuse, field suggestion enumeration (clairvoyance), batching DoS, IDOR via aliasing, auth bypass, injection via arguments, subscription abuse, depth/complexity bombs, and WAF bypass. Covers graphw00f fingerprinting, GraphQLmap, graphql-cop, and inql. Use when a target exposes a /graphql, /api/graphql, or GQL-over-HTTP endpoint.
人気
- GitHubのスター
- 5.5k
- ランキング
- #14789
- ライセンス
- MIT
- 更新日
- 2026/10/28
コメント
- …
このリポジトリの他のスキル
bug-bounty
5.5kエージェントが、対象範囲の確認から資産の調査、脆弱性の検証、レポート作成まで段階的にバグバウンティの調査を計画できるよう支援します。
agentic-app-audit
5.5kエージェントが、稼働中のAIアシスタントを外部から確認し、ツール呼び出しの乗っ取りやメモリの汚染などのリスクを見つけられるよう支援します。
argus
5.5kエージェントが、Webアプリや AI アプリでよくある不具合を調べる6つの自動スキャナーを実行できるよう支援します。
bb-methodology
5.5kエージェントが、バグバウンティのセッションを段階的に計画し、次の作業と適切な確認項目を選び、実際の害につながらない案を除外できるよう支援します。
似ているスキル
reverse-engineer-anything
422kREAツールを使って、出荷済みのアプリやパッケージの中身を調べ、機能の説明、版の比較、再構築の手順をエージェントが支援します。
1password
394k1Password CLIをセットアップし、サインインして、秘密情報の値を会話に表示せずに読み取ったり注入したりするようエージェントを支援します。
healthcheck
394kOpenClawを動かすコンピューターやサーバーを、SSH、ファイアウォール、更新、バックアップなどのセキュリティリスクについて監査し、安全な修正案を提案するようエージェントを支援します。