Run mustbreak against two local AuthZEN policy decision points built from its own test fixture, one that evaluates a request it must refuse and one that refuses it, then against the MCP client in modelcontextprotocol/go-sdk. It needs Go and runs on loopback; nothing is sent to a service you do not own.
Install
Section titled “Install”Homebrew
brew install kanywst/tap/mustbreakGo
Needs Go 1.26.0 or later (the go line in go.mod). Installs to $(go env GOPATH)/bin.
go install github.com/dyokto/mustbreak@latestLinux and macOS binary
Pick the archive for your platform from the releases page: darwin-arm64, darwin-amd64, linux-amd64 or linux-arm64.
gh release download -R dyokto/mustbreak -p 'mustbreak-*-linux-amd64.tar.gz'tar xzf mustbreak-*-linux-amd64.tar.gz mustbreaksudo install mustbreak /usr/local/bin/Debian and Ubuntu
gh release download -R dyokto/mustbreak -p 'mustbreak_*_linux_amd64.deb'sudo apt install ./mustbreak_*_linux_amd64.debFedora and RHEL
gh release download -R dyokto/mustbreak -p 'mustbreak_*_linux_amd64.rpm'sudo dnf install ./mustbreak_*_linux_amd64.rpmGitHub Action
The action downloads the release archive for the runner, checks it against the release's checksums.txt, and runs mustbreak with args. It runs on Linux and macOS runners.
- uses: dyokto/mustbreak@v0.1.2 with: version: v0.1.2 args: as --profile .github/mustbreak.yaml --fail-on mustCheck it is on your PATH. A release binary prints its version; a go install build prints dev.
$ mustbreak --versionmustbreak version 0.1.2Get the targets
Section titled “Get the targets”The two PDPs come from e2e/pdp and the MCP client from e2e/gosdk-client. Neither is part of the mustbreak binary, so build them from a clone:
git clone --depth 1 https://github.com/dyokto/mustbreakcd mustbreakA PDP that fails
Section titled “A PDP that fails”AuthZEN Authorization API 1.0 §10.1.1 says a PDP must answer 400 to an evaluation request that is missing a required attribute, such as subject.type. With --fail-open, the PDP evaluates the request anyway:
go build -o bin/mustbreak-pdp ./e2e/pdpbin/mustbreak-pdp --fail-open --listen 127.0.0.1:8181 &mustbreak pdp sends a complete request first, then the same request with each required attribute left out, then a batch with one broken item. --fail-on must makes a failed MUST-level case exit 2:
$ mustbreak pdp --url http://127.0.0.1:8181 --fail-on mustmustbreak 0.1.2: pdp http://127.0.0.1:8181
FAIL MB-20 MUST Evaluation missing a required attribute; a batch where one item errors 6 request(s) with a missing attribute were not refused as required - evaluation endpoint http://127.0.0.1:8181/access/v1/evaluation - control, complete request: HTTP 200 {"decision":true} - without subject.type: HTTP 200 {"decision":true} - without subject.id: HTTP 200 {"decision":false} - without resource.type: HTTP 200 {"decision":true} - without resource.id: HTTP 200 {"decision":true} - without action.name: HTTP 200 {"decision":false} - control batch, two complete items: HTTP 200 {"evaluations":[{"decision":true},{"decision":true}]} - batch with an item missing subject.type: HTTP 200 {"evaluations":[{"decision":true},{"decision":true}]}
1 cases: 0 pass, 1 fail, 0 skip, 0 errorNone of the five incomplete requests got 400, three of them were allowed, and the broken batch item got true. The control request comes first so that a PDP that refuses everything cannot pass.
The same PDP, refusing
Section titled “The same PDP, refusing”Start it again without --fail-open, on another port:
$ bin/mustbreak-pdp --listen 127.0.0.1:8182 &$ mustbreak pdp --url http://127.0.0.1:8182 --fail-on must -vmustbreak 0.1.2: pdp http://127.0.0.1:8182
PASS MB-20 MUST Evaluation missing a required attribute; a batch where one item errors every incomplete request got 400 and the broken batch item was denied - evaluation endpoint http://127.0.0.1:8182/access/v1/evaluation - control, complete request: HTTP 200 {"decision":true} - without subject.type: HTTP 400 missing a required attribute - without subject.id: HTTP 400 missing a required attribute - without resource.type: HTTP 400 missing a required attribute - without resource.id: HTTP 400 missing a required attribute - without action.name: HTTP 400 missing a required attribute - control batch, two complete items: HTTP 200 {"evaluations":[{"decision":true},{"decision":true}]} - batch with an item missing subject.type: HTTP 200 {"evaluations":[{"decision":true},{"context":{"error":{"message":"missing a required attribute","status":400}},"decision":false}]}
1 cases: 1 pass, 0 fail, 0 skip, 0 errorThe exit status is 0. -v prints the evidence for passing cases too; without it, only fails and errors show it.
An MCP client
Section titled “An MCP client”For client cases, mustbreak plays a hostile MCP server, authorization server and OpenID provider on 127.0.0.1:8443, and runs the client once per attempt with {url} replaced by the server's URL. The client here is the go-sdk auth example with the browser step replaced, pinned to go-sdk v1.9.0:
$ go build -C e2e/gosdk-client -o ../../bin/gosdk-client .$ mustbreak client --run 'bin/gosdk-client {url}'mustbreak 0.1.2: client http://127.0.0.1:8443/mcp
PASS MB-01 MUST Protected resource metadata whose resource is not the URL the metadata was derived from the client fetched the metadata and did not use itPASS MB-02 MUST resource_metadata in WWW-Authenticate points to metadata for another resource the client fetched the metadata and did not use itSKIP MB-12 MUST Attacker's authorization response delivered to the victim's session the client sends a PKCE code_challenge, which protects it against a swapped response (RFC 9700 §4.7.1); a forged state proves nothing here, use --login-url for the two-session testPASS MB-13 MUST Authorization response with the wrong iss, or none when iss is advertised the client rejected every response with a wrong or missing issSKIP MB-17 MUST UserInfo sub that differs from the ID Token sub the client does not call the UserInfo endpoint
5 cases: 3 pass, 0 fail, 2 skip, 0 errorA skip is not a pass: the client lacks the feature the case attacks, or the setup cannot exercise it. Stop the two PDPs with kill %1 %2 when you are done.
Your own target
Section titled “Your own target”Pick the subcommand by the target's role (as, rs, client, pdp) and give mustbreak a profile with the test clients and tokens the selected cases need. e2e/dex-as.yaml is a working profile for dex. Run it only against your own deployment or a local build.
Verify a release
Section titled “Verify a release”Each release has a checksums.txt signed keylessly with cosign, an SPDX SBOM per archive, and SLSA build provenance for the archives and packages. Releases up to v0.1.1 were built as kanywst/mustbreak: use that name in the identity and -R for them.
$ cosign verify-blob \ --bundle mustbreak-0.1.2-checksums.txt.sigstore.json \ --certificate-identity-regexp '^https://github.com/dyokto/mustbreak/\.github/workflows/release\.yml@refs/tags/v' \ --certificate-oidc-issuer https://token.actions.githubusercontent.com \ mustbreak-0.1.2-checksums.txtVerified OK$ sha256sum --ignore-missing -c mustbreak-0.1.2-checksums.txtmustbreak-0.1.2-linux-amd64.tar.gz: OK$ gh attestation verify mustbreak-0.1.2-linux-amd64.tar.gz -R dyokto/mustbreak- Overview: every case with its spec section and level, the profile format, and what mustbreak does not check
- Security policy: what mustbreak sends and where
- Contributing: how a case and its fixture test are written
© 2026 The mustbreak Authors. Licensed under Apache-2.0. Part of dyokto.