CATS (Contract API Testing and Security) is an OpenAPI fuzzer, contract linter, and negative testing CLI for REST APIs. Given an OpenAPI 3.0 or 3.1 specification, it generates, executes, and verifies thousands of HTTP test cases without writing test code.
Full documentation: https://endava.github.io/cats/ | Quick Start Guide
- Contract-driven generation: Builds payloads, headers, query parameters, and path variables directly from OpenAPI data types, formats, regex patterns, enums, and numeric/string bounds.
- Stateful execution order: Runs producer
POSTendpoints before dependent operations, captures resource IDs andETagbaselines from2XXresponses for reuse in subsequent requests, and defersDELETEcalls until the end of the run. - 270+ fuzzers, linters, and mutators: Covers boundary values, type coercion, malformed JSON, Unicode/control-character handling, injection probes, authentication bypass, IDOR,
PUT/PATCHsemantics, deleted-resource checks, and 44 random mutators for continuous fuzzing. - Reproducible findings: Clusters failures by root cause, masks credentials as
$$ENV_VARplaceholders, exports standalonecurlreproducers, and compares runs against baselines in CI.
brew tap endava/tap
brew install catsDownload the prebuilt native binary (Linux / macOS, no JVM required) or cats.jar (requires Java 25+) from the GitHub Releases page:
# Install the native binary on your PATH
sudo cp cats /usr/local/bin/cats
# Or run the uber-JAR with Java 25+
java -jar cats.jar --helpEnable shell completion for bash or zsh:
source <(cats generate-completion)# Run the full fuzzer suite against an OpenAPI contract
cats -c openapi.yml -s http://localhost:8080
# Run a built-in profile (quick, security, compliance, ci, coverage, crash, type-coercion, health-check)
cats -c openapi.yml -s http://localhost:8080 --profile quick
# Run in blackbox mode (fail only on 5XX crashes and confirmed security findings) with an auth header from $TOKEN
cats -c openapi.yml -s http://localhost:8080 -b -k -H "Authorization=Bearer $$TOKEN"
# Enforce a 60-second budget (continuing with random mutations if deterministic fuzzers finish early) and a CI gate
cats -c openapi.yml -s http://localhost:8080 --stopAfterTimeInSec 60 --fillTimeBudget --qualityGate "errors<1"
# Lint the OpenAPI contract without calling a target server
cats lint -c openapi.yml
# Group report failures into root-cause problems or compare against a previous baseline
cats triage -r cats-report
cats compare -b baseline-report -t cats-report
# Replay a recorded test case or print its standalone curl command
cats replay Test12
cats replay Test12 --curl| Command | Purpose |
|---|---|
cats -c <spec> -s <url> |
Run deterministic fuzzers against an OpenAPI contract |
cats smoke |
Run a fast baseline reachability check across contract operations |
cats analyze |
Inspect contract readiness, unresolved parameters, and runtime hints before fuzzing |
cats lint |
Lint an OpenAPI contract for structural, schema, and security-definition issues |
cats triage |
Cluster report failures into root-cause problems and export curl reproducers |
cats compare |
Compare two reports (NEW, FIXED, UNCHANGED) and fail CI on regressions |
cats replay |
Re-execute saved Test*.json cases (--stateful for fresh IDs) or output --curl commands |
cats random |
Run continuous mutation-based fuzzing for a time budget or request count |
cats run |
Execute declarative YAML functional tests and multi-step API flows |
cats template |
Fuzz raw HTTP request templates without an OpenAPI specification |
cats list / cats explain |
List and inspect fuzzers, linters, profiles, mutators, formats, paths, and error reasons |
cats stats / cats validate |
Show OpenAPI contract metrics or validate specification syntax |
cats init |
Scaffold project configuration files or install AI agent skills (--skills) |
Each run generates an interactive HTML report (cats-report/index.html) with run health diagnostics, HTTP response code distributions, top failing paths, root-cause problem clusters, and full request/response payloads with copyable curl commands.
Add --tui to any OpenAPI fuzzing run to monitor execution and inspect test cases interactively in the terminal:
cats -c openapi.yml -s http://localhost:8080 --tui- Switch views with
1(Overview),2(Execution Details),3(Summary & Quality Gate),4(By Result Reason),5(Paths), and6(Response Times). - Navigate rows with arrow keys or
j/k, pressEnterto open the full request/response trace andcurlcommand, and press/to search ora/e/w/s/ito filter by status. - Press
qto exit (during an active run,qcancels execution cleanly, preserves recorded results, and exits with status130).
cats triage -r cats-report groups individual failing test cases into deduplicated problem clusters with observed behavior, sample evidence, and next-step checks:
# Print clustered error problems to the console (add -w / --include-warnings to include warnings, or -j for JSON)
cats triage -r cats-report
cats triage -r cats-report --include-warnings
# Export standalone curl reproducers or re-verify live against the server
cats triage -r cats-report --export-reproducers reproducers.sh
cats triage -r cats-report --verifyCompare two report folders (or their cats-summary-report.json files) to gate CI pipelines on newly introduced regressions:
cats compare -b baseline-report -t current-report -jYou can also pass --baseline <report> directly during a fuzzing run. Exit codes are 0 (no regression), 1 (new error occurrence, or new warning with --failOnNewWarnings), and 2 (invalid input).
- TLS and mTLS: Server certificates and hostnames are verified by default. Pass
--insecurefor self-signed test environments, or--sslKeystore,--sslKeystorePwd, and--sslKeyPwdfor mutual TLS. - Secret masking and
.envloading: Authentication headers and sensitive query parameters are masked in reports andcurlcommands using replayable$$EnvironmentVariableplaceholders, accompanied by a secret-freereplay.env.example. CATS loads./.envautomatically when present (override with--envFile <path>, disable with--noEnvFile, or unmask with--showSecrets). - Web Fuzzing Commons authentication: Use
--wfcAuthand--wfcAuthNameto load WFC authentication definitions, with automatic fallback across entries when baseline requests return401or403. - Response safety limits: Calls exceeding
--callTimeout(default20seconds) are cancelled, and response bodies exceeding--maxResponseBytes(default10 MiBdecompressed) are truncated and flagged with a warning. Set either option to0to disable the limit. - Dry-run mode: Pass
--dryRunto parse contracts and compute test counts without contacting target servers or writing reports.
Requires Java 25 (or GraalVM for native binaries). Maven is bundled via ./mvnw.
Run
./mvnw cleanbefore the first build so Maven installs the local patched dependencies fromlib/(com.squareup.okhttp3:okhttp:5.5.0-CATSandio.swagger.parser.v3:swagger-parser-v3:2.1.49-CATS).
# Build the executable uber-JAR (target/cats-runner.jar)
./mvnw clean package -Dquarkus.package.jar.type=uber-jar -DskipTests
# Build the GraalVM native binary (target/cats-runner)
./mvnw clean package -Pnative -DskipTestsPlease refer to CONTRIBUTING.md.



