/42crunch-api-security-testing:42crunch-scanfrom 42crunch-api-security-testing
Run a 42Crunch live conformance and authorization scan against a REST or GraphQL API and fix SQG-blocking scan findings. Use this skill whenever the user wants to run a conformance test, authorization scan, BOLA test, BFLA test, scan a GraphQL API, generate or configure a scan config, or fix scan-reported issues. Triggers on phrases like "run scan", "scan only", "conformance test", "BOLA test", "BFLA test", "42crunch scan", "scan config", "scan my graphql api", or any request focused on live API testing without running a static audit. Use 42crunch-api-security-testing when the user wants both audit and scan together.
Ships in 42crunch-api-security-testing. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Runs a single phase: Scan (live conformance + authorization testing and
SQG-blocking fix loop). Requires explicit user permission before execution.
Does not run a static audit — use the 42crunch-audit skill for that.
Handles both OpenAPI and GraphQL APIs; pre-flight sets API_TYPE and this
skill selects the matching workflow. For GraphQL, the scan covers live
conformance and authorization (BOLA/BFLA) testing.
Assumes the API definition is already audit-clean (or the user is explicitly
running scan only). If the user mentions audit issues before scanning, suggest
running 42crunch-audit first.
Pre-flight checks. Read ../../references/pre-flight.md and complete
all steps (setup, API definition resolution, tag detection). When prompting
for file selection, use the context "scan" (e.g. "Which one should I
scan?"). Do not proceed if any step fails or the user cancels.
Pre-flight sets API_TYPE (oas or graphql) — carry it forward. The
steps below apply to both; bracketed [GraphQL: …] notes give the
substitution when API_TYPE=graphql.
Resolve the scan target URL.
Read servers[0].url from the OAS file. [GraphQL: SDL has no servers block — read the endpoint from the schema's default host if present, otherwise rely on SCAN42C_HOST or ask.]
SCAN42C_HOST environment variable is set → announce silently:
"Using scan target from SCAN42C_HOST:
<url>" Store asSCAN_TARGET_URLand proceed.
AskUserQuestion:
"The OAS points to <servers[0].url> as the API target. Is this the right URL to scan against?" — options: ["Yes — use this URL", "No — I'll provide a different URL"] [GraphQL: "What URL should I scan the GraphQL endpoint against (e.g. http://localhost:4000/graphql)?"]SCAN_TARGET_URL.servers[0].url as SCAN_TARGET_URL.API-definition analysis for scan preview — run silently before asking permission.
API_TYPE=oas — read the OAS file and collect:
securitySchemes (Bearer/JWT, API Key, Basic, OAuth2){…Id}, {…Key}, {…Ref}), a query parameter (?orderId=), or a request-body field (POST /lookup {orderId}, POST /transfer {fromAccountId, toAccountId}). Method does not gate candidacy; only pure collection or create-new operations are excludedexample, examples, or default values on its request body or parameter schemasAPI_TYPE=graphql — read the schema and collect:
ID-typed or *Id/*Key/*Ref argument, including
input-object fields) that act on or return it — not pure lists or
create-new mutationsCarry these results forward — the workflow reuses them instead of re-reading the definition.
Ask for permission to configure the scan. Output the scan preview as a chat message first.
API_TYPE=oas:
Ready to configure the scan?
Target: <SCAN_TARGET_URL>
OAS: <filename> (<N> operations)
Auth: <scheme types> [+ second user needed — <N> BOLA candidate(s)]
Samples: OAS has sample data / No samples — you'll need to provide test data
Tag: <category>:<tagname> ← platform mode only, when a tag is assigned; omit if no tag
Mode: Platform / Token
API_TYPE=graphql:
Ready to configure the GraphQL scan?
Target: <SCAN_TARGET_URL>
Schema: <filename> (<Q> queries · <M> mutations)
Auth: to be collected — GraphQL schema carries no auth info [+ second user needed — <N> BOLA candidate(s)] [+ admin user needed — <N> BFLA candidate(s)]
Tests: conformance + authorization (BOLA/BFLA) ← say "conformance only" when there are no candidates
Tag: <category>:<tagname> ← platform mode only, when a tag is assigned; omit if no tag
Mode: Platform / Token
Then call AskUserQuestion:
"I'm ready to start configuring the scan. I'll ask for credentials, classify your operations, and set up test scenarios — then run a happy path validation before the full scan. Shall I proceed?"["Yes, let's configure", "No, cancel"]Execute the Scan. Mode is already resolved from pre-flight — do not re-derive it.
Reachability check — read ../../references/reachability-check.md and run
the two-stage probe now. Return here once it completes (or stop if the user cancels).
Read the workflow file for the resolved API_TYPE — and only that file:
API_TYPE=oas → ../../references/scan-workflow.mdAPI_TYPE=graphql → ../../references/graphql-scan-workflow.mdApply only the commands for the identified mode throughout. The workflow sets up the scan config, collects credentials, gathers test data, shows a complete operation-by-operation classification table, validates happy paths, then asks for permission again before running the full scan. It presents a risk-classified findings report (OAS: Authorization failures / SQG-blocking conformance / informational conformance; GraphQL: the same three tiers, with authorization findings confirmed against the response data). Fix candidates are determined by SQG-blocking rules and authorization failures — not severity alone. The skill pauses and asks the user to consent before applying any OAS/schema changes or server-side code fixes. Optionally prompt user to restart the API after server-side code fixes are applied, or skipped, before the final scan summary.
Mandatory checkpoint: after any direct edit to CONF_FILE (including
environments.default.variables.*, auth wiring, or scenario chains), run
the config validation checkpoint and resolve all errors before continuing to
happy-path or full scan runs. [GraphQL: run scan conf validate --graphql plus the two extra checks in graphql-scan-workflow.md Step 7.]
Token mode: no SQG is enforced for scan. Present all findings for information. The user decides which (if any) to fix.
Render findings and ask for fix permission before final Scan summary.
After the full scan completes, do not jump directly to the final "Scan Complete" summary when findings exist. First complete the workflow's Step 12 in order:
Only proceed to OAS/schema or server-side code fixes after the user explicitly chooses to apply fixes. If the user declines fixes, or after the fix and optional verification loop completes, then present the final scan summary (see Output Format below).
Only continue after explicit user confirmation at each permission prompt.
After the scan completes, produce a summary in this shape.
API_TYPE=graphql — label the file row Schema updated: instead of
OAS updated:; authorization fixes are resolver (server-side) changes.
Scan Complete
Mode: Platform / Token
SQG: PASSED (<sqg-name> — your org's security quality gate is met) ← platform mode, passed
SQG: FAILED (<sqg-name> — the quality gate is not met; fixes above are required) ← platform mode, failed
SQG: N/A (Token mode — scan findings are informational; no gate enforced) ← token mode
Tag: <category>:<tagname> ← platform mode only, when a tag is assigned; omit this row if no tag
Authorization: BOLA confirmed on 1 operation — OAS updated · server-side fix applied
Conformance: 1 SQG-blocking issue fixed (OAS + code) · 3 informational findings surfaced
OAS updated: <path/to/openapi.json>
Show only the one SQG line that matches the current mode and result.
If the user declined to apply fixes or no issues were found, note that instead.
| Variable | Purpose |
|---|---|
SCAN42C_HOST | Scan target base URL (overrides OAS servers[0]) — Both modes |
All other variables (API_KEY, PLATFORM_HOST, TRIAL_TOKEN) and general
constraints are defined in ../../references/pre-flight.md.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
5 skills in this plugin
/42crunch-api-security-testingRun both a 42Crunch Audit and a live Scan together in a single pipeline. Use this skill when the user wants to run audit and scan together, complete the full security pipeline, or when the request is ambiguous about which phase to run. Triggers on phrases like "run audit and scan", "full 42crunch pipeline", "full security check", "audit then scan", "42crunch", or "SQG". Do NOT use this skill if the user explicitly requests only an audit (use 42crunch-audit) or only a scan (use 42crunch-scan).
/42crunch-auditRun a 42Crunch API Security Audit and fix SQG-blocking issues in an OpenAPI Specification file or GraphQL schema. Use this skill whenever the user wants to audit an OAS file or GraphQL schema for security issues, fix SQG-blocking issues, score an API, or remediate audit findings. Triggers on phrases like "run audit", "audit only", "fix audit issues", "SQG audit", "42crunch audit", "audit score", "audit my graphql schema", "graphql audit", or any request focused on static API-definition analysis and remediation without running a live scan.
/42crunch-setupSet up the 42Crunch environment so that audit and scan skills can run without friction. Use this skill whenever the user wants to configure 42Crunch for the first time, install or update the 42c-ast binary, configure an API key, or troubleshoot missing credentials or binary errors. Triggers on phrases like "setup 42crunch", "configure 42crunch", "install 42c-ast", "update 42c-ast", "set api key", "42crunch not working", "binary not found", or any request to prepare the environment before running an audit or scan.
/generate-oasGenerate a complete OpenAPI 3.0 (OAS) specification from an API codebase, a Postman or Insomnia collection, or both together. Use this skill whenever the user wants to generate, create, or derive an OpenAPI spec, reverse-engineer an API definition, document an existing API, or convert a Postman/Insomnia collection to OpenAPI — when there is no existing OAS file yet. Triggers on phrases like "generate OAS", "create an OpenAPI spec", "generate openapi.json", "document my API", "reverse-engineer spec", "convert postman to openapi", "convert insomnia to openapi", "postman collection to OAS", "insomnia collection to OAS", or any request to produce an OAS file from source material rather than from an existing spec.
npx claudepluginhub 42crunch-ai/claude-plugins --plugin 42crunch-api-security-testing