agentleFS
awarexoneawarexone/AXguard/graphql-security/SKILL.md

graphql-security

Skill18 starsChanged 3 months agoMITView on GitHub

Analyze GraphQL API security — use when reviewing schemas, resolvers, introspection, batching, authorization per field, or CSRF on cookie-authenticated GraphQL endpoints (API1/API5/API8:2023).

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    After AXguard hits graphql.*.

    line 43
  2. Very specific:

    No GraphQL layer (use api-security for REST/RPC).

    line 48
  3. Distinctive:

    Call admin mutations as a low-privilege user (API5).

    line 60
  4. Distinctive:

    Check introspection/playground exposure in production.

    line 67
  5. Distinctive:

    Check CSRF defenses if cookies are used (SameSite, custom headers, Apollo CSRF prevention).

    line 70

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

GraphQL Security

Purpose

Teach pre-ship analysis of GraphQL deployments: schema exposure, resolver-level authorization, expensive queries, mutations CSRF, and injection into resolvers.

When to Use / When Not to Use

Use when:

  • Apollo/Yoga/Graphene/Hasura/AppSync schemas and resolvers are in scope.
  • After AXguard hits graphql.*.
  • Single /graphql endpoint aggregates many privileged operations.

Do not use when:

  • No GraphQL layer (use api-security for REST/RPC).
  • Pure schema design docs without runtime resolvers.

Security Concepts

GraphQL concentrates attack surface into one URL. AuthZ must run in resolvers/data loaders per object, not only at the HTTP gateway. Introspection, batching, and nested queries change enumeration and DoS risk.

Threat Model

Attacker goals:

  1. IDOR via node(id:) / object queries without ownership checks (API1).
  2. Call admin mutations as a low-privilege user (API5).
  3. Abuse introspection and field suggestions for inventory.
  4. CSRF mutations on cookie-based sessions; DoS via deeply nested/batched queries.

Analysis Workflow

  1. Inventory GraphQL endpoints, schemas, and auth mode (JWT header vs cookies).
  2. Check introspection/playground exposure in production.
  3. For each sensitive field/mutation: verify resolver authN + object-level authZ.
  4. Review node/global ID patterns for BOLA.
  5. Check CSRF defenses if cookies are used (SameSite, custom headers, Apollo CSRF prevention).
  6. Assess query cost limiting, depth/amount limits, timeouts, persisted queries.
  7. Trace resolver inputs into SQL/command/SSRF sinks (hand off to those skills).

Evidence Requirements

  • Schema/resolver location for the sensitive operation
  • Missing authZ or misconfiguration evidence
  • Auth mode (cookie vs bearer) for CSRF conclusions
  • Impact on objects/functions reachable

False Positive Controls

  • Introspection disabled in prod with alternate safe docs
  • Persisted queries only + strict allowlist
  • Gateway + resolver checks both present and tested
  • Public schema fields that are intentionally unauthenticated

Remediation

  1. Disable introspection and risky IDE tooling in production.
  2. Enforce authZ in every resolver/loader returning sensitive objects.
  3. Limit depth/complexity; prefer persisted queries; rate-limit.
  4. For cookie auth: require CSRF-safe mutation posture.
  5. Least-privilege schema — split admin graphs when feasible.

Verification

Map schema → Verify per-resolver authZ + limits → Re-run axguard → Confirm introspection/CSRF settings for environment

Related Skills

  • api-security, authorization-analysis, authentication-analysis
  • xss-analysis — if GraphQL feeds HTML clients
  • security-triage, security-remediation

Framework Mapping

  • CWE-862, CWE-863, CWE-639
  • OWASP A01:2021 Broken Access Control
  • OWASP API1:2023, API5:2023, API8:2023

References

Research Provenance

Primary sources:

  • OWASP API Security Top 10:2023 (API1, API5, API8); OWASP A01:2021; CWE-862/863/639 (accessed 2026-09-15)

Secondary / internal:

  • AXGuard rules/graphql.json, /axguard-graphql
  • AwareXone Agentic-Bug-Hunter GraphQL methodology (concepts only; not copied)

Datasets:

  • UVID HF dataset — category linkage concepts only (MIT license metadata review 2026-09-15)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.