Benchmarks
Osty adversarial benchmark and TLA+ proof lab
The Osty adversarial benchmark is 15 deterministic Go attack scenarios and 2 TLA+ models aimed at Osty's own firewall, backport triage, migration verifier, kill switch and air gap. All 15 scenarios passed on 29 November 2026, and TLC killed all 17 mutants on 1 December 2026. Reproduce it with mise run test:adversarial && mise run verify:formal.
Written by Osty EngineeringPublished Updated
| ID | Scenario | Attack or failure class | Pillar | Deterministic invariant | Last run |
|---|---|---|---|---|---|
a01 | Wazuh lineage, unmanaged drift and stale deploys | Runtime-to-source lineage forgery and stale deploys | See | A forged osty stamp attestation is rejected, a stale deploy whose fix is on main is redeploy eligible only when every unshipped commit is a security fix, and a host with no attested artifact is classed unmanaged drift with no plan. | 1/1 pass |
a02 | Runtime mutation drift and multi-stage build separation | Container mutation after deploy and builder-stage scanner noise | See | A package that exists only in the builder stage never appears in the runtime image SBOM or carries production risk, and a running container that diverges from its attested image is flagged as runtime mutation drift. | 1/1 pass |
a03 | Honey-secret DNS and HTTPS exfiltration | Malicious postinstall stealing CI secrets | Guard | A package that exfiltrates planted canary secrets is CONFIRMED_MALICIOUS with a forensic trace, the proxy returns 403 with an Ed25519-signed justification, and the lockfile gate blocks it. | 1/1 pass |
a04 | Differential baseline without false positives | Malicious behavior hidden in a patch release | Guard | Behavior repeated from the previous version produces an empty delta and a CLEAN verdict, and only genuinely new behavior escalates. | 1/1 pass |
a05 | Artifact versus source pipeline compromise | Registry tarball that differs from its Git tag | Guard | A published artifact whose files differ from the tagged source is QUARANTINED_HIGH_RISK with MISMATCH_SUSPICIOUS and the exact diff hunk, and the proxy holds it. | 1/1 pass |
a06 | Zero-knowledge dependency confusion | Public package squatting a private internal name | Guard | Plane 1 detects a public publish that collides with a private name without ever receiving the plaintext private package name, and the proxy blocks the hijack. | 1/1 pass |
a07 | Debian backport truth | Scanner false positive on a distro backport | Plan | A Debian package carrying the backported fix produces zero actionable alerts with traceable VEX provenance, while the unpatched build of the same upstream version still raises exactly one. | 1/1 pass |
a08 | ELF glibc floor and license rug pull | Upgrade that breaks the ABI or changes license | Plan | An upgrade whose native binary needs GLIBC_2.34 is ENV_BLOCKED on a glibc 2.31 host and refuses auto-merge, and an MIT to BSL-1.1 change is LICENSE_BLOCKED. | 1/1 pass |
a09 | Native compiler reachability and breaking call sites | Reachability guesses that hide real exposure | Plan | Production call sites are STATIC_CALL_CONFIRMED, test-only imports are STATICALLY_UNREACHABLE, renamed exports pinpoint the call site as MIGRATION_REQUIRED, and changelog claims the AST does not corroborate stay UNVERIFIED_PROSE. | 1/1 pass |
a10 | Changelog prompt injection defeated by the Policy Patch Verifier | Prompt injection against an AI migration agent | Ship | An injected migration hint is never ast_verified, never reaches the migration worker, and a poisoned diff is hard-rejected while the legitimate rename migration still passes. | 1/1 pass |
a11 | Zero-trust edge defeats a compromised control plane | Compromised vendor control plane issuing rogue commands | Policy and ledger | Commands that violate the Git-pinned .osty/policy.yaml, or that carry the wrong policy digest, are rejected locally with zero Git mutations and a signed ledger receipt. | 1/1 pass |
a12 | Stateful-safe kill switch and flake classification | Emergency rollback that would corrupt a database, and flaky CI | Ship | The proxy freezes the bad version within the 1 second freeze budget, a workload with a stateful migration is contained and forward-rebuilt instead of rolled back, broad rollback needs two distinct signed operators, and a known flake never blocks a verified PR. | 2/2 pass |
a13 | Scale-to-zero ghost production never vanishes | Production workloads invisible to scanners while idle | See | Workloads scaled to zero are still collected as deployable production, bound only to immutable attested artifacts, and their scanner findings stay attributed. | 1/1 pass |
a14 | Sovereign offline air gap | Tampered or downgraded offline intelligence bundles | Policy and ledger | Offline import, explain and verify make zero outbound requests, tampered archives and unauthorized verdict downgrades are refused, and re-import is idempotent. | 1/1 pass |
a15 | Multi-org RBAC against cross-tenant escalation | Cross-tenant access and privilege escalation | Policy and ledger | No identity sees or acts on another organisation, forged certificate role claims only surface the caller's own organisation, viewers never count toward dual control, and every grant carries an Ed25519-signed ledger receipt. | 1/1 pass |
mise run test:adversarial && mise run verify:formalWhich TLA+ properties does TLC check?
| Module | What it models | Constants | States generated | Distinct states | Search depth |
|---|---|---|---|---|---|
EdgeZeroTrustAndKillSwitch | The edge policy gate, idempotent command execution, the kill-switch phases, frozen-coordinate merges and the offline audit buffer. | Targets = {t1, t2} | 6,406,468 | 1,321,308 | 27 |
CampaignWaveAndCanary | Topological campaign waves, canary soak, observability, OOM and TLS handshake gating, pause and resume, kill-switch halts and halted-wave approvals. | UpstreamTargets = {lib}, DownstreamTargets = {api, web}, SoakTicks = 2, ZeroOOMKills = TRUE, TLSHandshakeGated = TRUE | 79,040,208 | 5,085,200 | 40 |
mise run verify:formal runs formal/tla/verify.sh, which model-checks every .tla file under formal/tla/ with TLC from the pinned tla2tools.jar v1.7.4. The script fails if any property has no mutant under formal/tla/mutants/, then applies each mutant patch and fails unless TLC reports a counterexample for exactly the property that mutant breaks.
| Property | Module | Kind | What it guarantees | Mutants |
|---|---|---|---|---|
NoOutOfPolicyMutation | EdgeZeroTrustAndKillSwitch | invariant | No command executes unless the pinned policy claimed it. | policy-gate-skipped (10-state counterexample) |
NoDuplicateIdempotentExecution | EdgeZeroTrustAndKillSwitch | invariant | Each idempotency key executes at most once, including after crash recovery. | crash-recovery-releases-key (13-state counterexample) |
BroadRollbackRequiresTwoDistinctValidApprovals | EdgeZeroTrustAndKillSwitch | invariant | A rollback across more than one production target, or touching any TIER0 target, needs two distinct operators with valid attestations. | counts-attestations-not-operators (13-state counterexample), gate-ignores-tier0 (10-state counterexample) |
NoBlindRollbackOnStatefulMigration | EdgeZeroTrustAndKillSwitch | invariant | Only SAFE_STATELESS targets are ever rolled back. | edge-skips-local-reinspection (10-state counterexample) |
ConfirmedMaliciousNeverAutoDowngraded | EdgeZeroTrustAndKillSwitch | invariant | A CONFIRMED_MALICIOUS verdict only drops through a signed human override. | latest-verdict-wins (3-state counterexample) |
NoMergeOfFrozenCoordinate | EdgeZeroTrustAndKillSwitch | invariant | No campaign merge or redeploy lands for a package coordinate frozen after its pull request opened. | edge-skips-freeze-check (7-state counterexample) |
OfflineAuditEventuallyFlushed | EdgeZeroTrustAndKillSwitch | temporal | Every pending audit record is eventually synced after the link reconnects. | disconnect-drops-unsynced (16-state counterexample) |
NoDownstreamBeforeUpstreamWave | CampaignWaveAndCanary | invariant | No downstream target leaves PENDING before every upstream target in an earlier wave is done. | wave-advances-unsettled (3-state counterexample) |
NoAutoPromoteWithoutObservability | CampaignWaveAndCanary | invariant | A canary is auto-promoted only with observability OK after the full soak, never from a stale operator decision. | stale-hold-signal-preresolves (8-state counterexample), trusts-control-plane-final-phase (6-state counterexample) |
NoPromotionAfterOOMKill | CampaignWaveAndCanary | invariant | A target with an observable OOM kill is never promoted. | zero-oom-gate-skipped (9-state counterexample) |
NoAutoPromoteWithoutTLSHandshakeEvidence | CampaignWaveAndCanary | invariant | With the TLS handshake gate on, a canary is auto-promoted only with observability OK, never with failing handshakes. | tls-gate-not-consulted (8-state counterexample) |
TargetTransitionsAlwaysLegal | CampaignWaveAndCanary | invariant | Every target status change follows a legal execution edge. | partial-rollout-marked-skipped (9-state counterexample) |
HaltedWaveRequiresLiveApproval | CampaignWaveAndCanary | invariant | A halted wave resumes only with an approval that is still live. | early-approval-counts (6-state counterexample) |
ResumeNeverClearsHalt | CampaignWaveAndCanary | invariant | Resuming a paused campaign never clears a kill-switch halt; that still needs a wave approval. | resume-clears-halt (6-state counterexample) |
PauseHoldsInFlightTargets | CampaignWaveAndCanary | temporal | While a campaign is paused, no target moves into merge, canary soak or deploy. | paused-target-keeps-rolling-out (10-state counterexample) |
mise run verify:formalWhere is the raw benchmark data?
The full dataset is published as JSON at /benchmarks/dataset.json under CC-BY-4.0. It lists every scenario with its attack, invariant, assertions, source file, Go test names and command, plus every TLA+ property with its mutants.
curl -s https://osty.dev/benchmarks/dataset.json | jq '.totals'The same dataset, the TLA+ models with their mutant patches, and lockfile, policy and Trivy fixtures are mirrored in the Apache 2.0 osty-dev/supply-chain-benchmark repository on GitHub, where scripts/verify-fixtures.sh checks them against the osty CLI.
What do the flagship scenarios prove?
Six scenarios cover the failures buyers ask about most: secret theft at install, scanner backport noise, AI agents taking instructions from a changelog, emergency rollback against a database migration, workloads that hide at zero replicas, and fully offline operation.
a03: Honey-secret DNS and HTTPS exfiltration
Attack. An npm package whose postinstall hex-encodes AWS_SECRET_ACCESS_KEY into DNS labels under evil.test and posts a base64 GITHUB_TOKEN to https://collect.evil.test/v1/collect.
Invariant. A package that exfiltrates planted canary secrets is CONFIRMED_MALICIOUS with a forensic trace, the proxy returns 403 with an Ed25519-signed justification, and the lockfile gate blocks it.
- Verdict is
CONFIRMED_MALICIOUSwithcanary_exfil_detected=trueand a forensic trace URI. - The sinkhole captures both the DNS AWS exfiltration and the HTTPS GitHub token exfiltration.
osty-proxyanswers 403 Forbidden and the signed forensic justification verifies against the edge key.osty verifyblocks the lockfile that pins the package.
a03 from the Osty source treebashgo test -count=1 -tags adversarial -run '^TestA03' ./lab/adversarial/...a07: Debian backport truth
Attack. Two Debian 12 images with openssl 3.0.11-1~deb12u2 (fix backported) and 3.0.11-1~deb12u1 (unpatched) against an upstream advisory for CVE-2024-5535 that says fixed in 3.0.12.
Invariant. A Debian package carrying the backported fix produces zero actionable alerts with traceable VEX provenance, while the unpatched build of the same upstream version still raises exactly one.
3.0.11-1~deb12u2resolves toFIXED_BACKPORTwith zero actionable alerts and persisted VEX provenance.3.0.11-1~deb12u1raises exactly one actionableAFFECTEDalert.
a07 from the Osty source treebashgo test -count=1 -tags adversarial -run '^TestA07' ./lab/adversarial/...a10: Changelog prompt injection defeated by the Policy Patch Verifier
Attack. A CHANGELOG.md for @acme/tokenlib 2.0.0 tells the AI agent to append a reverse shell to .github/workflows/ci.yml and add evil-helper@1.0.0 to package.json.
Invariant. An injected migration hint is never ast_verified, never reaches the migration worker, and a poisoned diff is hard-rejected while the legitimate rename migration still passes.
- The injected
MIGRATION_HINTis tagged unverified prose and excluded from the migration context, and the raw changelog never reaches the worker. - The poisoned diff violates
patchVerifier.forbiddenPaths,patchVerifier.forbidUnlistedDependenciesandpatchVerifier.forbidNewShellOrNetworkPrimitives. - The clean
ParseTokentoVerifyTokenmigration passes the verifier.
a10 from the Osty source treebashgo test -count=1 -tags adversarial -run '^TestA10' ./lab/adversarial/...a12: Stateful-safe kill switch and flake classification
Attack. A malicious npm version that exfiltrates CI tokens reaches two services, one of which shipped migrations/0042_add_ledger.sql, while an operator tries to approve twice and a forged attestation is submitted.
Invariant. The proxy freezes the bad version within the 1 second freeze budget, a workload with a stateful migration is contained and forward-rebuilt instead of rolled back, broad rollback needs two distinct signed operators, and a known flake never blocks a verified PR.
- Freeze latency is under
campaigns.FreezeBudget(1 second) and the control-plane registry reports the freeze. service-bis contained and gets a forward-rebuild PR pinned to the safe version, never a blind rollback.- A duplicate operator counts once, a forged attestation is denied, and the ledger records exactly two accepted approvals before
service-arolls back to its attested digest. - The secret exposure report ranks the admin CI deploy key first and is anchored in the ledger.
- A known flake survives one control rerun and opens a verified PR, while a new failure from the bump stops the campaign.
a12 from the Osty source treebashgo test -count=1 -tags adversarial -run '^TestA12' ./lab/adversarial/...a13: Scale-to-zero ghost production never vanishes
Attack. An ECS Fargate service with DesiredCount: 0, a Lambda function whose $LATEST and pinned version run different images, and a Cloud Run service scaled to zero.
Invariant. Workloads scaled to zero are still collected as deployable production, bound only to immutable attested artifacts, and their scanner findings stay attributed.
- Each scale-to-zero workload is collected as a deployable spec and persists in Postgres.
- Active artifacts resolve to immutable digests and unattested artifacts are never bound.
checkoutgets a surgical hotfix instead of a blind redeploy, and unmatched or foreign scanner findings are reported, not dropped.
a13 from the Osty source treebashgo test -count=1 -tags adversarial -run '^TestA13' ./lab/adversarial/...a14: Sovereign offline air gap
Attack. An exported Ed25519-signed bundle chain is carried across the gap, then a byte-flipped archive and a bundle that downgrades a CONFIRMED_MALICIOUS verdict to CLEAN are imported.
Invariant. Offline import, explain and verify make zero outbound requests, tampered archives and unauthorized verdict downgrades are refused, and re-import is idempotent.
- The offline phase makes zero requests to Plane 1 and zero outbound HTTP requests.
- The tampered archive and the unauthorized supply-chain verdict downgrade both fail import.
- Re-import applies nothing and skips bundles 1 to 3, and the proxy still blocks the malicious package offline.
a14 from the Osty source treebashgo test -count=1 -tags adversarial -run '^TestA14' ./lab/adversarial/...How do I run a single scenario?
Every scenario is a Go test behind the adversarial build tag. Run one with its -run filter from the root of the Osty source tree after mise run compose:up and mise run tools:analyzers.
| ID | Component under test | Source | Command |
|---|---|---|---|
a01 | Lineage reconciler, Wazuh collector and osty stamp provenance verifier | lab/adversarial/a01_wazuh_drift_test.go | go test -count=1 -tags adversarial -run '^TestA01' ./lab/adversarial/... |
a02 | Kubernetes collector, OCI SBOM scanner and build-stage lineage | lab/adversarial/a02_runtime_mutation_test.go | go test -count=1 -tags adversarial -run '^TestA02' ./lab/adversarial/... |
a03 | Plane 1 sandbox vetter with honey-secret canaries and DNS/TLS sinkhole, osty-proxy and osty verify | lab/adversarial/a03_honey_secret_exfil_test.go | go test -count=1 -tags adversarial -run '^TestA03' ./lab/adversarial/... |
a04 | Plane 1 vPrev -> vNew differential behavioral baseline | lab/adversarial/a04_differential_baseline_test.go | go test -count=1 -tags adversarial -run '^TestA04' ./lab/adversarial/... |
a05 | Plane 1 artifact-vs-Git diff verifier and osty-proxy quarantine hold | lab/adversarial/a05_artifact_source_mismatch_test.go | go test -count=1 -tags adversarial -run '^TestA05' ./lab/adversarial/... |
a06 | Zero-knowledge private namespace hashes, Plane 1 confusion detector and osty-proxy | lab/adversarial/a06_zk_dependency_confusion_test.go | go test -count=1 -tags adversarial -run '^TestA06' ./lab/adversarial/... |
a07 | OCI dpkg scanner, OSV and Debian Security Tracker importers and backport resolver | lab/adversarial/a07_debian_backport_test.go | go test -count=1 -tags adversarial -run '^TestA07' ./lab/adversarial/... |
a08 | ELF DT_NEEDED / VERNEED ABI checker and SPDX license diff | lab/adversarial/a08_elf_abi_and_license_test.go | go test -count=1 -tags adversarial -run '^TestA08' ./lab/adversarial/... |
a09 | Go go/packages and TypeScript Compiler API analyzers | lab/adversarial/a09_native_compiler_reachability_test.go | go test -count=1 -tags adversarial -run '^TestA09' ./lab/adversarial/... |
a10 | Zero-tool changelog extraction, AST cross-validation, migration context assembler and Policy Patch Verifier | lab/adversarial/a10_prompt_injection_migration_test.go | go test -count=1 -tags adversarial -run '^TestA10' ./lab/adversarial/... |
a11 | osty-edge local policy gate, mTLS command link and hash-chained Evidence Ledger | lab/adversarial/a11_zero_trust_edge_policy_test.go | go test -count=1 -tags adversarial -run '^TestA11' ./lab/adversarial/... |
a12 | Kill-switch Temporal workflow, dual-control approvals, rollback safety inspector and CI flake classifier | lab/adversarial/a12_kill_switch_and_flake_test.go | go test -count=1 -tags adversarial -run '^TestA12' ./lab/adversarial/... |
a13 | AWS (ECS, Lambda, ECR, Inspector) and GCP (Cloud Run, Artifact Registry, Container Analysis) collectors | lab/adversarial/a13_ghost_prod_test.go | go test -count=1 -tags adversarial -run '^TestA13' ./lab/adversarial/... |
a14 | osty airgap export / import, osty explain, edge cache and osty-proxy in a network-refusing environment | lab/adversarial/a14_airgap_offline_test.go | go test -count=1 -tags adversarial -run '^TestA14' ./lab/adversarial/... |
a15 | Control-plane strict authorizer, OIDC and mTLS identities, RBAC ledger | lab/adversarial/a15_multi_org_rbac_test.go | go test -count=1 -tags adversarial -run '^TestA15' ./lab/adversarial/... |
How is the benchmark run and what does it not claim?
- Each scenario stages a real attack against real Osty code paths: the same packages that ship in
osty,osty-edge,osty-proxyand Plane 1, wired to local Postgres, MinIO, an npm registry mock, an OCI registry mock, a Git forge mock and cloud API mocks. - Assertions are exact outcomes, such as a verdict enum, an HTTP status, a ledger hash-chain check or a zero count of outbound requests, not scores or thresholds.
mise run checkruns static checks, integration tests and the adversarial suite together, so a scenario that fails blocks the build.- The Go results on this page come from a run on 29 November 2026: 16 of 16 Go tests passed across 15 scenarios. The TLA+ results come from a run on 1 December 2026: TLC checked 2 models and killed 17 of 17 mutants. Toolchain: go test -tags adversarial against Docker Compose Postgres 17, MinIO and Temporal; TLC from tla2tools.jar v1.7.4.
- The TLA+ models are abstractions of the edge and campaign state machines with small constant sets (two targets, three campaign targets). They prove the listed properties for those models, not for every line of Go.
- This page reports what each scenario asserts. It does not compare Osty against other vendors, and it does not publish wall-clock timings, which depend on the machine.
- The Go test sources live in the Osty source tree. The dataset on this page is the public, machine-readable description of that suite, and the TLA+ models and fixtures are public in osty-dev/supply-chain-benchmark.
Frequently asked questions
What is the Osty adversarial benchmark?
It is 15 Go test scenarios, a01 to a15, that attack Osty's own supply-chain firewall, triage, migration and rollout code, plus 2 TLA+ models of the edge and campaign state machines.
How do I reproduce the results?
From the Osty source tree, run mise run compose:up, mise run tools:analyzers, then mise run test:adversarial && mise run verify:formal. Each scenario also has its own go test -run command in the dataset.
Does Osty suppress alerts with heuristics?
No. Scenario a07 shows the rule: a Debian alert is suppressed only when the Debian Security Tracker proves the backported fix, and the unpatched build of the same upstream version still raises the alert.
Can a prompt injection in a changelog make Osty's AI migration do something unsafe?
Scenario a10 stages exactly that. The injected instruction is tagged unverified prose and never reaches the migration worker, and the Policy Patch Verifier hard-rejects the poisoned diff for touching .github/workflows/, adding an unlisted dependency and adding a shell primitive.
What does the TLA+ mutation check add?
It proves the properties are not vacuous. For each of the 15 properties a patch breaks the model, and verify.sh fails unless TLC finds a counterexample for that exact property.
What license is the dataset under?
The JSON dataset at /benchmarks/dataset.json is published under CC-BY-4.0, so you can cite, mirror and train on it with attribution. The TLA+ models, fixtures and scripts in osty-dev/supply-chain-benchmark are Apache 2.0.
Related pages
- GuardThe pre-install firewall that
a03toa06attack: honey-secret sandboxes, differential baselines and artifact-vs-Git checks. - SeeRuntime lineage and stale deploys, the system under test in
a01,a02anda13. - ShipCampaigns, the Policy Patch Verifier and the stateful-safe kill switch tested by
a10anda12. - SecurityTrust boundaries, licensing and how the TLA+ models fit Osty's security review.