Add GraphQL API security misconfiguration rule pack#220
Open
seonghobae wants to merge 1 commit into
Open
Conversation
Add scanner/rules/graphql.yml with 5 high-precision, GraphQL-specific regex rules anchored on GraphQL/Apollo keywords to avoid false positives: - graphql-introspection-enabled-production (introspection: true) — WARNING - apollo-csrf-prevention-disabled (csrfPrevention: false) — WARNING - graphql-graphiql-enabled (graphiql: true) — WARNING - graphql-playground-enabled (playground: true) — WARNING - apollo-stacktrace-in-error-responses (includeStacktraceInErrorResponses: true) — HIGH Verified end-to-end via a real scan (all fire on positives, zero false positives on safe config). Adds tests/test_graphql_rules.py with positives/negatives + severity assertions, and updates CHANGELOG/README. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EywwS2Du8pimW7xqRP3An3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
scanner/rules/graphql.yml— a high-precision GraphQL API security misconfiguration rule pack (5 rules). Each rule anchors on a GraphQL/Apollo-specific keyword so it does not fire on generic config.Rules
graphql-introspection-enabled-productionintrospection: trueapollo-csrf-prevention-disabledcsrfPrevention: falsegraphql-graphiql-enabledgraphiql: truegraphql-playground-enabledplayground: trueapollo-stacktrace-in-error-responsesincludeStacktraceInErrorResponses: trueMessages include CWE + OWASP API Security Top 10 references.
Verification
: false) counterpart.tests/test_graphql_rules.py— positives/negatives per rule + severity assertions.228 passed.scanner/rules/*.ymlor built-in rules (no GraphQL rules existed).Docs
[Unreleased](Korean) entry.🤖 Generated with Claude Code