/qa-api-testing:restler-fuzzingfrom qa-api-testing
Runs Microsoft RESTler to fuzz stateful REST APIs from OpenAPI specs, finding multi-step bugs like resource leaks and hierarchy violations that stateless fuzzers miss.
Ships in qa-api-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.
Read when SKILL.md points to them.
RESTler is a stateful REST API fuzzer that finds security and reliability bugs
(restler-readme). Its differentiator vs. stateless fuzzers like
schemathesis-fuzzing is that it infers producer-consumer dependencies from
the OpenAPI spec - if POST /resources returns an id and GET /resources/{id}
accepts that id, RESTler sequences them in that order to reach deeper state.
If the API is stateless (search endpoints, calculator endpoints, report-generation endpoints), Schemathesis is sufficient and lighter to operate. RESTler shines on resource lifecycle APIs.
Prerequisites per restler-readme: Python 3.12.8 and .NET 8.0.
git clone https://github.com/microsoft/restler-fuzzer.git
cd restler-fuzzer
mkdir restler_bin
python ./build-restler.py --dest_dir "$(pwd)/restler_bin"
(Per restler-readme.)
docker build -t restler .
For one-off CI runs:
docker run --rm -v "$PWD/output:/output" restler ...
Per restler-readme:
Generate a RESTler grammar from the OpenAPI spec. The grammar captures the producer-consumer dependencies RESTler will exploit during fuzzing.
restler compile --api_spec openapi.json
Output: Compile/grammar.py plus Compile/dict.json (a starter
dictionary RESTler uses to seed parameter values).
Run a single end-to-end pass to verify the spec, auth, and target URL are wired correctly. Measures endpoint coverage - what fraction of the API RESTler can reach with the current grammar / dictionary.
restler test --grammar_file Compile/grammar.py \
--dictionary_file Compile/dict.json \
--target_ip <api-host> \
--target_port 443 \
--use_ssl
If endpoint coverage is below the team's threshold (often 80%+), stop and amend the dictionary or grammar before continuing.
One pass through every endpoint with default checkers active - fast bug discovery focused on the obvious failure modes.
restler fuzz-lean --grammar_file Compile/grammar.py \
--dictionary_file Compile/dict.json \
--target_ip <api-host> \
--target_port 443 \
--use_ssl
Aggressive breadth-first exploration. Run for a fixed time budget (hours to days for a comprehensive run).
restler fuzz --grammar_file Compile/grammar.py \
--dictionary_file Compile/dict.json \
--target_ip <api-host> \
--target_port 443 \
--use_ssl \
--time_budget 8.0 # hours
Per restler-readme, RESTler reports two bug categories:
| Category | Trigger |
|---|---|
| 5xx errors | Any 5xx response is a bug; RESTler triages by URL pattern. |
| Checker violations | Targeted sequences look for resource leaks, hierarchy violations (e.g. accessing a resource after deletion), and use-after-free patterns. |
Each bug appears in RestlerResults/.../bug_buckets/ with a replay
log - the exact sequence of requests that triggered it. Replay
logs are deterministic - the bug reproduces on demand.
RESTler doesn't bake in an auth strategy; for tokens, the canonical pattern is:
restler_custom_payload_header for
the Authorization slot.TOKEN=$(curl -s ... | jq -r .access_token)
echo "{\"restler_custom_payload_header\": {\"Authorization\": [\"Bearer $TOKEN\"]}}" > auth-dict.json
restler fuzz-lean ... --dictionary_file auth-dict.json
For OAuth flows that rotate tokens during a long fuzz run, supply a
refresh script RESTler invokes periodically. See restler-readme
for the --token_refresh_command flag and cadence settings.
Results land under RestlerResults/ with Compile/, Test/, FuzzLean/, and
Fuzz/ subtrees; each unique bug gets a bug_buckets/Bug_N/ folder holding a
bug_replay_log.txt and bug_request.txt. The full directory layout is in
references/triage-and-ci.md.
Per-bug triage:
bug_replay_log.txt - the deterministic sequence.restler replay --replay_log <path>.RESTler is not a per-PR tool by default - fuzz-lean takes 5-30 minutes typically; deep fuzz is hours. The canonical cadence:
| Cadence | Stage | Time budget | Trigger |
|---|---|---|---|
| Per-PR | Test only | <1 minute | Schema-validation smoke; fail fast. |
| Nightly | Fuzz-lean | 30-60 minutes | New endpoint regression scan. |
| Weekly | Fuzz | 4-12 hours | Deep state-machine exploration. |
| Pre-release | Fuzz | 24-72 hours | Final security / reliability gate. |
The nightly cadence runs on a schedule: cron trigger: build the RESTler
Docker image, compile the grammar from openapi.json, run fuzz-lean against
staging, upload RestlerResults/ as an artifact (if: always()), then fail the
job when any bug_replay_log.txt exists (find ... | wc -l). The complete
GitHub Actions workflow is in
references/triage-and-ci.md.
| Anti-pattern | Why it fails | Fix |
|---|---|---|
| Running RESTler on production | Generated requests mutate live data; 5xx alerts spam oncall. | Always target staging; production is for runtime monitoring, not fuzz traffic. |
| Skipping Stage 2 (Test) | Spec-vs-impl drift is invisible until Stage 4 wastes hours. | Always run Test first; check coverage before fuzz-lean. |
| Stage 4 (Fuzz) on every PR | Hours-long PR CI; no team accepts that. | Fuzz is nightly / weekly only. |
| Triaging bugs without replay-log confirmation | Some bugs are environmental (test DB state); confirm reproducibility. | Always run restler replay on each bug before opening a ticket. |
| Letting bug counts grow unbounded | Backlog of unfixed bugs becomes noise; team learns to ignore RESTler reports. | Treat each bug as a P1 / P2 ticket; fix or document waiver per the team's escape-defect policy. |
schemathesis-fuzzing.progress/ directory for manual checkpointing.schemathesis-fuzzing -
stateless complement; lower setup cost; cover happy / boundary on
PRs.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
rest-api-fuzzing, stateful-testing, security-testing, openapi
6 skills in this plugin
/api-chaos-runnerUse when an existing API test suite should be rerun under network faults to prove retries, timeouts, circuit breakers and fallbacks work. Injects latency, timeouts, dropped connections, bandwidth caps and packet loss with Toxiproxy and reports which assertions break under which fault./karate-testingUse when a JVM project wants HTTP API tests written as Karate .feature files instead of Java code: the Gherkin-style DSL, match with fuzzy validators, JUnit 5 and Maven runs, and JUnit XML for CI. For Java fluent tests use restassured-testing; for Python YAML tests use tavern-testing./postman-collectionsRepairs Postman and Newman runs in CI - a reporter that never writes the HTML file the pipeline expects, a nightly job that fires requests as fast as it can until a partner API rate-limits it, or a report with one row per request when the collection asserts a dozen things between them. Authors Postman collections (requests, tests, variables, environments), runs them headless via the Newman CLI, configures reporters (cli / json / junit / html) for CI artifact upload, and drives data-driven runs from JSON / CSV iteration files. Use when HTTP API tests are authored in Postman and need to run, pace themselves, and report correctly in CI./restassured-testingUse whenever Java/JVM API tests need writing or fixing: loose assertions that let an empty 200 pass, slow sequential suites, or hand-rolled HTTP clients. Writes REST Assured given/when/then tests: status, JSON and XML path checks, auth, reusable specs, schema checks, Maven or Gradle and CI reports./schemathesis-fuzzingUse for any request to generate API tests from an OpenAPI or GraphQL schema, or to find inputs that make an API return 500 that hand-written tests miss: Schemathesis fuzzes every endpoint for 5xx errors and schema violations from the CLI or pytest, picks the conformance checks and gates CI as the API evolves.2 plugins ship this exact skill · first indexed Nov 12, 2026
npx claudepluginhub testland/qa --plugin qa-api-testingOther plugins' skills for the same job