restler-fuzzing
БесплатноБез исполняемых скриптовНе проверенUse when a stateful REST API (resources created, read, changed and deleted in sequence) needs fuzzing that finds multi-step bugs stateless fuzzers miss. Runs…
от testland★ 18 звёзд на GitHubОб этом скилле
restler-fuzzing
Overview
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.
When to use
- The API is stateful: resources are created, queried, modified, deleted, and bugs lurk in the dependency chains.
- A team is on Schemathesis already but suspects multi-step bugs aren't being reached. RESTler is the next layer down.
- A new service is launching and the team wants the broadest possible auto-coverage before releasing - particularly for cloud services.
- The API exposes a complete OpenAPI 2.0 / 3.x specification (RESTler consumes JSON or YAML).
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.
Install
Prerequisites per restler-readme: Python 3.12.8 and .NET 8.0.
From source
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.)
Via Docker (preferred for CI)
docker build -t restler .
For one-off CI runs:
docker run --rm -v "$PWD/output:/output" restler ...
The four-stage workflow
Per restler-readme:
Stage 1 - Compile
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).
Stage 2 - Test (smoke)
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.
Stage 3 - Fuzz-lean
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
Stage 4 - Fuzz (deep)
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
Bug detection
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.
Authentication
RESTler doesn't bake in an auth strategy; for tokens, the canonical pattern is:
- Obtain the token with a short pre-script.
- Pass it via the dictionary's
restler_custom_payload_headerfor theAuthorizationslot.
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.
Output and triage
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:
- Read
bug_replay_log.txt- the deterministic sequ
Установить restler-fuzzing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл restler-fuzzing?
Use when a stateful REST API (resources created, read, changed and deleted in sequence) needs fuzzing that finds multi-step bugs stateless fuzzers miss. Runs Microsoft RESTler from an OpenAPI spec (compile, test, fuzz-lean, fuzz) and reports 5xx errors, resource leaks and hierarchy violations.
Как установить скилл restler-fuzzing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл restler-fuzzing запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic