Detect GraphQL injection vulnerabilities in a codebase using a three-phase approach: recon (confirm GraphQL usage and find unsafe operation document assembly sites), batched verify (trace user input…
Install the "sast-graphql" agent skill from https://github.com/utkusen/sast-skills/tree/main/sast-files/.agents/skills/sast-graphql into .claude/skills/sast-graphql/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sast-graphql", then confirm the skill loads.
Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Type this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
skills CLI
$ npx skills add utkusen/sast-skills --skill sast-graphql -a codex
Project install goes to .agents/skills/; add -g for ~/.codex/skills/.
Install the "sast-graphql" agent skill from https://github.com/utkusen/sast-skills/tree/main/sast-files/.agents/skills/sast-graphql into .agents/skills/sast-graphql/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sast-graphql", then confirm the skill loads.
Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
skills CLI
$ npx skills add utkusen/sast-skills --skill sast-graphql -a cursor
Project install goes to .agents/skills/; add -g for ~/.cursor/skills/.
Install the "sast-graphql" agent skill from https://github.com/utkusen/sast-skills/tree/main/sast-files/.agents/skills/sast-graphql into .cursor/skills/sast-graphql/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sast-graphql", then confirm the skill loads.
Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
skills CLI
$ npx skills add utkusen/sast-skills --skill sast-graphql -a gemini-cli
Project install goes to .agents/skills/; add -g for ~/.gemini/skills/.
Install the "sast-graphql" agent skill from https://github.com/utkusen/sast-skills/tree/main/sast-files/.agents/skills/sast-graphql into .gemini/skills/sast-graphql/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sast-graphql", then confirm the skill loads.
Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Installs for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
skills CLI
$ npx skills add utkusen/sast-skills --skill sast-graphql -a github-copilot
Project install goes to .agents/skills/; add -g for ~/.copilot/skills/.
Install the "sast-graphql" agent skill from https://github.com/utkusen/sast-skills/tree/main/sast-files/.agents/skills/sast-graphql into .github/skills/sast-graphql/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sast-graphql", then confirm the skill loads.
GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
skills CLI
$ npx skills add utkusen/sast-skills --skill sast-graphql -a opencode
OpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
Install the "sast-graphql" agent skill from https://github.com/utkusen/sast-skills/tree/main/sast-files/.agents/skills/sast-graphql into .opencode/skills/sast-graphql/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sast-graphql", then confirm the skill loads.
OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Facts
Skill name
sast-graphql
GitHub stars
1.3k
Token cost
~4.7k tokens
SKILL.md length
2,016 words
Files
1
Skills in repo
16
Repo updated
First seen
Licence
MIT
At a glance
Detect GraphQL injection vulnerabilities in a codebase using a three-phase approach: recon (confirm GraphQL usage and find unsafe operation document assembly sites), batched verify (trace user input…
Works in 3 steps: GraphQL Technology Recon and Injection… → Trace User Input to Injection Candidate… → Merge — Consolidate Batch Results
Asked to find GraphQL injection
SKILL.md covers What is GraphQL Injection, Vulnerable vs. Secure Examples, Execution and Important Reminders
Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
What it does
Sast Graphql is an agent skill from utkusen/sast-skills. Detect GraphQL injection vulnerabilities in a codebase using a three-phase approach: recon (confirm GraphQL usage and find unsafe operation document assembly sites), batched verify (trace user input to those sites in parallel subagents, up to 3 candidate sites each), and merge (consolidate batch results). Requires sast/architecture.md (run sast-analysis first). Outputs findings to sast/graphql-results.md. If no GraphQL technology is found in Phase 1, later phases are skipped. Use when asked to find GraphQL…
Its SKILL.md is about 4.7k 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 and Static analysis and SAST. It works with GraphQL. The repository describes itself as: Collection of agent skills to find vulnerabilities inside your web/mobile apps. The licence is MIT.
When your agent uses it
Asked to find GraphQL injection
Unsafe GraphQL document construction
Operation string injection bugs
Example prompts
“/sast-graphql”
Requirements
Python 3
Node.js
Workflow steps
3 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit db52227. 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
No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript, markdown and python).
From the folder's file list and the shell code blocks in SKILL.md.
Network
No URLs in SKILL.md.
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
Sast Graphql loads about 4.7k tokens when it runs. Until then it costs about 152 tokens; SKILL.md has 2,016 words of instructions outside code blocks.
Always· name and description, kept in context so the agent knows when to use it
~152
When it runs· the whole SKILL.md, loaded when a task matches
~4.7k
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.
Download SKILL.mdSave it as .claude/skills/sast-graphql/SKILL.md (or your agent's skills folder).
name
sast-graphql
description
Detect GraphQL injection vulnerabilities in a codebase using a three-phase approach: recon (confirm GraphQL usage and find unsafe operation document assembly sites), batched verify (trace user input to those sites in parallel subagents, up to 3 candidate sites each), and merge (consolidate batch results). Requires sast/architecture.md (run sast-analysis first). Outputs findings to sast/graphql-results.md. If no GraphQL technology is found in Phase 1, later phases are skipped. Use when asked to find GraphQL injection, unsafe GraphQL document construction, or operation string injection bugs.
GraphQL Injection Detection
You are performing a focused security assessment to find GraphQL injection vulnerabilities. This skill uses a three-phase approach with subagents: recon (confirm GraphQL usage and find every location where a GraphQL operation document is assembled unsafely), batched verify (trace whether user-supplied input reaches those assembly sites, in parallel batches of up to 3 sites each), and merge (consolidate batch results into the final report).
Prerequisites: sast/architecture.md must exist. Run the analysis skill first if it doesn't.
What is GraphQL Injection
GraphQL injection occurs when user-controlled data is embedded into the GraphQL document (the query, mutation, or subscription string) rather than passed only through the variables map. The parser then interprets attacker-controlled syntax — new fields, aliases, directives, or fragments — which can bypass intent, reach unauthorized resolvers, or change server-side behavior when that document is executed or forwarded.
The core pattern: unvalidated user input alters the structure or text of the GraphQL operation string passed to execute, graphql, a gateway client, or an HTTP body query field built from string operations.
What GraphQL Injection IS
Concatenating or interpolating user input into an operation string: `query { user(id: "${id}") { name } }`, "query { user(id: \"" + id + "\") { name } }"
Building the JSON query field for a downstream GraphQL HTTP request with string concat from request body or params
Forwarding req.body.query (or similar) into another interpolated template that wraps or extends the operation
Dynamic gql / graphql-tag template literals where a non-static expression changes document structure (not just a bound variable value inside a static document)
Server-side code that selects or assembles operation text from user input (including "persisted query" ID → document maps without allowlisting)
Wrappers around graphql.execute(), graphqlHTTP, Yoga/Apollo request pipeline where the first argument (document/source) is built from variables that could be user-influenced
What GraphQL Injection is NOT
Do not flag these as GraphQL injection:
SQL injection in resolvers: Resolver code that builds SQL from args — that is SQL injection (sast-sqli), not this skill
NoSQL / command injection in resolvers: Same — use the appropriate SAST skill
IDOR via GraphQL arguments: Passing another user's ID in a variables JSON with a static document — authorization flaw, not document injection
Normal variable binding: Static document with {"query": "query($id: ID!) { user(id: $id) { name } }", "variables": {"id": userInput}} — values are bound as variables; the document structure is fixed (still verify authorization in resolvers)
Introspection / field suggestion enabled: Information disclosure and hardening topic; only flag as GraphQL injection if the finding is specifically about injecting into the operation string
Query depth / complexity DoS: Rate limiting and cost analysis — different class
2. Server uses standard HTTP handler; client sends document; server parses once
The risk is not the mere presence of req.body.query on the server if the server only parses and executes it as the client's operation — injection in that path is client-side. Flag server-side construction of a new document that incorporates user strings before execute or before forwarding.
3. Persisted queries / allowlisted operation IDs
Document looked up by ID from a server-side registry; client cannot inject arbitrary document text.
4. graphql-js Source with static string; dynamic values only in variableValues
// VULNERABLE: user input in operation text
app.post('/proxy', async (req, res) => {
const fragment = req.body.fragment;
const query = `query { me { ${fragment} } }`;
const data = await fetch('https://api.internal/graphql', {
method: 'POST',
body: JSON.stringify({ query }),
});
});
// SECURE: static operation, user data only in variables
const PROXY_QUERY = `query ProxyMe { me { id name email } }`;
app.post('/proxy', async (req, res) => {
const data = await fetch('https://api.internal/graphql', {
method: 'POST',
body: JSON.stringify({ query: PROXY_QUERY }),
});
});
Python — string format into execute
python
# VULNERABLE
def run_custom_query(user_gql: str):
document = f"query {{ user {{ {user_gql} }} }}"
return graphql_sync(schema, document)
# SECURE: validate against allowlist of named operations or use static documents only
ALLOWED = {"id", "name", "email"}
fields = [f for f in requested_fields if f in ALLOWED]
document = "query { user { " + " ".join(ALLOWED.intersection(set(requested_fields))) + " } }"
# Better: fixed FieldNodes, not string building from user input
Execution
This skill runs in three phases using subagents. Pass the contents of sast/architecture.md to all subagents as context.
Phase 1: GraphQL Technology Recon and Injection Candidate Sites
Launch a subagent with the following instructions:
Goal: (1) Determine whether this codebase uses GraphQL at all. (2) If it does, find every location where a GraphQL operation document (query/mutation/subscription source string) is built using string concatenation, interpolation, formatting, or dynamic assembly such that a variable could change the document text (not merely variables JSON). Write results to sast/graphql-recon.md.
Context: You will be given the project's architecture summary. Use it for stack, API layout, and BFF/gateway patterns.
Part A — Is GraphQL used?
Search for:
Dependencies: graphql, @apollo/server, apollo-server-express, @nestjs/graphql, graphql-yoga, @graphql-yoga/node, mercurius, strawberry-graphql, graphene, sangria, gqlgen, async-graphql, juniper, graphql-ruby, Hot Chocolate / GraphQL.Server, etc.
sprintf, format, % formatting, .format() building query or source arguments
Calls where the document argument is not a compile-time constant:
graphql(schema, dynamicString, ...), execute({ schema, document: parsedDynamic, ...}) where the string feeding parse or execute is built from non-static parts
graphqlHTTP({ schema, rootValue, context: (req) => ({ query: req.body.query + something }) }) patterns that mutate or wrap the query string with user data
HTTP clients forwarding a constructed GraphQL body:
Operation text loaded by key from user input without allowlist → file path or DB value becomes document source
What to skip (do not flag as Phase 1 candidates):
Fully static source / query strings; only variableValues / variables come from the request
Schema definition with buildSchema / SDL files with no user interpolation
Resolver implementations that only use args with parameterized DB APIs (optional: note "resolver uses ORM" but not a GraphQL injection candidate unless the document is built unsafely)
Output format — write to sast/graphql-recon.md:
markdown
# GraphQL Recon: [Project Name]
## Summary
GraphQL is [used / not used] in this codebase.
[If used: libraries, main server files, typical endpoint paths]
Found [N] injection candidate site(s) where operation documents may be built unsafely. [If not used, say N/A or 0 and skip candidate list]
## GraphQL Surface (only if used)
- **Libraries / frameworks**: ...
- **Entry points**: ...
- **Notable files**: ...
## Injection Candidate Sites
### 1. [Descriptive name]
- **File**: `path/to/file.ext` (lines X-Y)
- **Function / endpoint**: ...
- **Execution / call pattern**: [graphql.execute / fetch with body / gql template / etc.]
- **Construction pattern**: [concat / template literal / format / forwarded body mutation]
- **Interpolated variable(s)**: ...
- **Code snippet**:
...
[Repeat for each site; if none, write "No injection candidate sites found." under the heading]
After Phase 1: Gates Before Phase 2
After Phase 1 completes, read sast/graphql-recon.md.
Gate 1 — No GraphQL technology
If the summary states GraphQL is not used (or equivalent: no GraphQL libraries, no schema, no server — clear absence), skip Phases 2 and 3. Write the following to sast/graphql-results.md and stop:
markdown
# GraphQL Injection Analysis Results
No GraphQL technology detected in this codebase.
Gate 2 — GraphQL used but no injection candidates
If GraphQL is used but there are zero injection candidate sites (summary reports 0 candidates, or the "Injection Candidate Sites" section states none found / is empty), skip Phases 2 and 3. Write the following to sast/graphql-results.md and stop:
markdown
# GraphQL Injection Analysis Results
No vulnerabilities found.
Otherwise proceed to Phase 2.
Show full SKILL.md (893 more words)Show less
Phase 2: Trace User Input to Injection Candidate Sites (Batched)
After Phase 1 completes and both gates pass (GraphQL used and at least one candidate site), read sast/graphql-recon.md and split the Injection Candidate Sites into batches of up to 3 sites each (each ### N. section is one site). Launch one subagent per batch in parallel. Each subagent traces taint only for its assigned sites and writes results to its own batch file.
Batching procedure (you, the orchestrator, do this — not a subagent):
Read sast/graphql-recon.md and count the numbered candidate sections under "Injection Candidate Sites" (### 1., ### 2., etc.).
Divide them into batches of up to 3. For example, 8 sites → 3 batches (1-3, 4-6, 7-8).
For each batch, extract the full text of those candidate sections from the recon file.
Launch all batch subagents in parallel, passing each one only its assigned candidate sections (plus architecture context).
Each subagent writes to sast/graphql-batch-N.md where N is the 1-based batch number.
Identify the project's primary language/framework from sast/architecture.md and select only the matching examples from the "Vulnerable vs. Secure Examples" section above. For example, if the project uses Node.js, include the "Node.js — dynamic document for downstream API" example; if Python, include "Python — string format into execute". Include these selected examples in each subagent's instructions where indicated by [TECH-STACK EXAMPLES] below.
Give each batch subagent the following instructions (substitute the batch-specific values):
Goal: For each assigned injection candidate site, determine whether user-supplied data can reach the dynamic part of the operation document. Our goal is to find GraphQL injection vulnerabilities. Write results to sast/graphql-batch-[N].md.
Your assigned candidate sites (from the recon phase):
[Paste the full text of the assigned candidate sections here, preserving the original numbering]
Context: You will be given the project's architecture summary. Use it for API layout, request handling, and BFF/gateway patterns.
GraphQL injection reference — What to look for:
User-controlled data must not alter the GraphQL document text (query/mutation/subscription source) except through bound variables on a static document. Flag when taint reaches string assembly of the operation.
What GraphQL injection is NOT — do not flag these here:
SQL/NoSQL injection in resolvers — other SAST skills
IDOR with static document + variables — authorization, not document injection
Normal variable binding on a fixed document string
Introspection enabled — unless the finding is specifically operation-string injection
Query depth/complexity DoS — different class
Mitigations that reduce risk:
Allowlist of fields or operation IDs before any string assembly
Parser validation that rejects unexpected definitions (still prefer no user-controlled document structure)
Vulnerable vs. secure examples for this project's tech stack:
[TECH-STACK EXAMPLES]
For each assigned site, trace dynamic values backward:
Direct user input — query params, path params, JSON body fields (including nested query if re-wrapped), headers, cookies
Indirect user input — helpers, middleware, context builders
Second-order — stored preferences or DB fields later used to build a document; trace write path
Server-only — config, env, hardcoded fragments — not exploitable from the client
Classification:
Vulnerable: User-controlled data reaches document construction with no effective mitigation
Likely Vulnerable: Probable taint or weak sanitization
Not Vulnerable: Server-side-only or effective allowlist / static document path
Needs Manual Review: Opaque flow
Output format — write to sast/graphql-batch-[N].md:
After all Phase 2 batch subagents complete, read every sast/graphql-batch-*.md file and merge them into a single sast/graphql-results.md. You (the orchestrator) do this directly — no subagent needed.
Merge procedure:
Read all sast/graphql-batch-1.md, sast/graphql-batch-2.md, ... files.
Collect all findings from each batch file and combine them into one list, preserving the original classification and all detail fields.
Count totals across all batches for the executive summary.
Write the merged report to sast/graphql-results.md using this format:
markdown
# GraphQL Injection Analysis Results: [Project Name]
## Executive Summary
- Candidate sites analyzed: [total across all batches]
- Vulnerable: [N]
- Likely Vulnerable: [N]
- Not Vulnerable: [N]
- Needs Manual Review: [N]
## Findings
[All findings from all batches, grouped by classification:
VULNERABLE first, then LIKELY VULNERABLE, then NEEDS MANUAL REVIEW, then NOT VULNERABLE.
Preserve every field from the batch results exactly as written.]
After writing sast/graphql-results.md, delete all intermediate batch files (sast/graphql-batch-*.md).
Important Reminders
Read sast/architecture.md and pass its content to all subagents as context.
If Phase 1 finds no GraphQL technology, skip Phases 2 and 3 — write the "No GraphQL technology detected" results file.
If GraphQL is used but Phase 1 finds no injection candidates, skip Phases 2 and 3 — write "No vulnerabilities found."
Phase 2 must run after Phase 1 completes — it depends on the recon output.
Phase 3 must run after all Phase 2 batches complete — it depends on all batch outputs.
Batch size is 3 candidate sites per subagent. If there are 1-3 sites total, use a single subagent. If there are 10, use 4 subagents (3+3+3+1).
Launch all batch subagents in parallel — do not run them sequentially.
Each batch subagent receives only its assigned candidates' text from the recon file, not the entire recon file. This keeps each subagent's context small and focused.
Phase 1 does not trace taint; Phase 2 does.
Resolver-layer SQL/NoSQL issues belong to other skills; this skill targets operation document construction.
When in doubt, classify as "Needs Manual Review" rather than "Not Vulnerable".
Clean up intermediate files: delete sast/graphql-recon.md and all sast/graphql-batch-*.md files after the final sast/graphql-results.md is written.
Sast 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.
Review a Lightning Web Component for mobile offline compatibility — the Komaci offline static analyzer that pre-primes the data graph for Salesforce Mobile App Plus and Field Service Mobile App.
Build production-ready Node.js backend services with Express/Fastify, implementing middleware patterns, error handling, authentication, database integration, and API design best practices.
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.
Detect Insecure Direct Object Reference (IDOR) vulnerabilities in a codebase using a three-phase approach: recon (find candidates), batched verify (check authorization in parallel subagents, 3…
Detect business logic vulnerabilities in a codebase using a three-phase approach: threat modeling (domain analysis and attack scenarios), batched verify (check exploitable gaps in parallel…
Detect insecure file upload vulnerabilities in a codebase using a three-phase approach: discovery (find all upload sites), batched verify (check extension bypass and related issues in parallel…
Detect GraphQL injection vulnerabilities in a codebase using a three-phase approach: recon (confirm GraphQL usage and find unsafe operation document assembly sites), batched verify (trace user input…. Sast Graphql is an agent skill from utkusen/sast-skills. Detect GraphQL injection vulnerabilities in a codebase using a three-phase approach: recon (confirm GraphQL usage and find unsafe operation document assembly sites), batched verify (trace user input to those sites in parallel subagents, up to 3 candidate sites each), and merge (consolidate batch results).
Run `npx skills add utkusen/sast-skills --skill sast-graphql -a claude-code`. Or copy the skill folder (sast-files/.agents/skills/sast-graphql in utkusen/sast-skills) into .claude/skills/sast-graphql in your project. Claude Code loads it when a task matches its description.
How do I install Sast Graphql in Codex?
Run `npx skills add utkusen/sast-skills --skill sast-graphql -a codex`. Or copy the skill folder (sast-files/.agents/skills/sast-graphql in utkusen/sast-skills) into .agents/skills/sast-graphql in your project. Codex loads it when a task matches its description.
Can I use Sast 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 utkusen/sast-skills --skill sast-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/sast-graphql, .gemini/skills/sast-graphql, .github/skills/sast-graphql and .opencode/skills/sast-graphql in your project.
What does Sast Graphql need to run?
SKILL.md names no scripts, command-line tools or credentials: Sast Graphql is instructions for the agent only. Our summary lists: Python 3; Node.js.
Does Sast Graphql access the network?
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Is Sast 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 Sast Graphql use?
Sast 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 Sast Graphql use?
About 4.7k tokens (SKILL.md is roughly 19k 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 Sast Graphql?
Skills that share tags, products or a category with Sast Graphql: Mobile Platform Offline Validate (forcedotcom/sf-skills, 1.1k stars), Hunt API (Encod3d-Sec/TORCH, 329 stars), API Designer (Jeffallan/claude-skills, 12k stars) and Nodejs Backend Patterns (ever-works/ever-works, 158 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Who maintains Sast Graphql?
utkusen (a GitHub user) maintains it in utkusen/sast-skills, which has 1,326 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on April 8, 2026.
Source: utkusen/sast-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.