Skip to content

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

All 15 adversarial scenarios and the invariant each one asserts
IDScenarioAttack or failure classPillarDeterministic invariantLast run
a01Wazuh lineage, unmanaged drift and stale deploysRuntime-to-source lineage forgery and stale deploysSeeA 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
a02Runtime mutation drift and multi-stage build separationContainer mutation after deploy and builder-stage scanner noiseSeeA 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
a03Honey-secret DNS and HTTPS exfiltrationMalicious postinstall stealing CI secretsGuardA 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
a04Differential baseline without false positivesMalicious behavior hidden in a patch releaseGuardBehavior repeated from the previous version produces an empty delta and a CLEAN verdict, and only genuinely new behavior escalates.1/1 pass
a05Artifact versus source pipeline compromiseRegistry tarball that differs from its Git tagGuardA 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
a06Zero-knowledge dependency confusionPublic package squatting a private internal nameGuardPlane 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
a07Debian backport truthScanner false positive on a distro backportPlanA 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
a08ELF glibc floor and license rug pullUpgrade that breaks the ABI or changes licensePlanAn 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
a09Native compiler reachability and breaking call sitesReachability guesses that hide real exposurePlanProduction 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
a10Changelog prompt injection defeated by the Policy Patch VerifierPrompt injection against an AI migration agentShipAn 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
a11Zero-trust edge defeats a compromised control planeCompromised vendor control plane issuing rogue commandsPolicy and ledgerCommands 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
a12Stateful-safe kill switch and flake classificationEmergency rollback that would corrupt a database, and flaky CIShipThe 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
a13Scale-to-zero ghost production never vanishesProduction workloads invisible to scanners while idleSeeWorkloads scaled to zero are still collected as deployable production, bound only to immutable attested artifacts, and their scanner findings stay attributed.1/1 pass
a14Sovereign offline air gapTampered or downgraded offline intelligence bundlesPolicy and ledgerOffline import, explain and verify make zero outbound requests, tampered archives and unauthorized verdict downgrades are refused, and re-import is idempotent.1/1 pass
a15Multi-org RBAC against cross-tenant escalationCross-tenant access and privilege escalationPolicy and ledgerNo 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
Run every scenario and model
mise run test:adversarial && mise run verify:formal
Download the raw datasetosty.dev/benchmarks/dataset.json, CC-BY-4.0

Which TLA+ properties does TLC check?

TLC results from 1 December 2026 with tla2tools.jar v1.7.4
ModuleWhat it modelsConstantsStates generatedDistinct statesSearch depth
EdgeZeroTrustAndKillSwitchThe edge policy gate, idempotent command execution, the kill-switch phases, frozen-coordinate merges and the offline audit buffer.Targets = {t1, t2}6,406,4681,321,30827
CampaignWaveAndCanaryTopological 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 = TRUE79,040,2085,085,20040

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.

2 TLA+ models, 15 checked properties and 17 mutants TLC must kill
PropertyModuleKindWhat it guaranteesMutants
NoOutOfPolicyMutationEdgeZeroTrustAndKillSwitchinvariantNo command executes unless the pinned policy claimed it.policy-gate-skipped (10-state counterexample)
NoDuplicateIdempotentExecutionEdgeZeroTrustAndKillSwitchinvariantEach idempotency key executes at most once, including after crash recovery.crash-recovery-releases-key (13-state counterexample)
BroadRollbackRequiresTwoDistinctValidApprovalsEdgeZeroTrustAndKillSwitchinvariantA 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)
NoBlindRollbackOnStatefulMigrationEdgeZeroTrustAndKillSwitchinvariantOnly SAFE_STATELESS targets are ever rolled back.edge-skips-local-reinspection (10-state counterexample)
ConfirmedMaliciousNeverAutoDowngradedEdgeZeroTrustAndKillSwitchinvariantA CONFIRMED_MALICIOUS verdict only drops through a signed human override.latest-verdict-wins (3-state counterexample)
NoMergeOfFrozenCoordinateEdgeZeroTrustAndKillSwitchinvariantNo campaign merge or redeploy lands for a package coordinate frozen after its pull request opened.edge-skips-freeze-check (7-state counterexample)
OfflineAuditEventuallyFlushedEdgeZeroTrustAndKillSwitchtemporalEvery pending audit record is eventually synced after the link reconnects.disconnect-drops-unsynced (16-state counterexample)
NoDownstreamBeforeUpstreamWaveCampaignWaveAndCanaryinvariantNo downstream target leaves PENDING before every upstream target in an earlier wave is done.wave-advances-unsettled (3-state counterexample)
NoAutoPromoteWithoutObservabilityCampaignWaveAndCanaryinvariantA 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)
NoPromotionAfterOOMKillCampaignWaveAndCanaryinvariantA target with an observable OOM kill is never promoted.zero-oom-gate-skipped (9-state counterexample)
NoAutoPromoteWithoutTLSHandshakeEvidenceCampaignWaveAndCanaryinvariantWith 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)
TargetTransitionsAlwaysLegalCampaignWaveAndCanaryinvariantEvery target status change follows a legal execution edge.partial-rollout-marked-skipped (9-state counterexample)
HaltedWaveRequiresLiveApprovalCampaignWaveAndCanaryinvariantA halted wave resumes only with an approval that is still live.early-approval-counts (6-state counterexample)
ResumeNeverClearsHaltCampaignWaveAndCanaryinvariantResuming a paused campaign never clears a kill-switch halt; that still needs a wave approval.resume-clears-halt (6-state counterexample)
PauseHoldsInFlightTargetsCampaignWaveAndCanarytemporalWhile a campaign is paused, no target moves into merge, canary soak or deploy.paused-target-keeps-rolling-out (10-state counterexample)
Model-check both specs and kill every mutantbash
mise run verify:formal

Where 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.

Fetch the datasetbash
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_MALICIOUS with canary_exfil_detected=true and a forensic trace URI.
  • The sinkhole captures both the DNS AWS exfiltration and the HTTPS GitHub token exfiltration.
  • osty-proxy answers 403 Forbidden and the signed forensic justification verifies against the edge key.
  • osty verify blocks the lockfile that pins the package.
Run a03 from the Osty source treebash
go 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~deb12u2 resolves to FIXED_BACKPORT with zero actionable alerts and persisted VEX provenance.
  • 3.0.11-1~deb12u1 raises exactly one actionable AFFECTED alert.
Run a07 from the Osty source treebash
go 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_HINT is tagged unverified prose and excluded from the migration context, and the raw changelog never reaches the worker.
  • The poisoned diff violates patchVerifier.forbiddenPaths, patchVerifier.forbidUnlistedDependencies and patchVerifier.forbidNewShellOrNetworkPrimitives.
  • The clean ParseToken to VerifyToken migration passes the verifier.
Run a10 from the Osty source treebash
go 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-b is 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-a rolls 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.
Run a12 from the Osty source treebash
go 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.
  • checkout gets a surgical hotfix instead of a blind redeploy, and unmatched or foreign scanner findings are reported, not dropped.
Run a13 from the Osty source treebash
go 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.
Run a14 from the Osty source treebash
go 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.

Reproduction command for each scenario
IDComponent under testSourceCommand
a01Lineage reconciler, Wazuh collector and osty stamp provenance verifierlab/adversarial/a01_wazuh_drift_test.gogo test -count=1 -tags adversarial -run '^TestA01' ./lab/adversarial/...
a02Kubernetes collector, OCI SBOM scanner and build-stage lineagelab/adversarial/a02_runtime_mutation_test.gogo test -count=1 -tags adversarial -run '^TestA02' ./lab/adversarial/...
a03Plane 1 sandbox vetter with honey-secret canaries and DNS/TLS sinkhole, osty-proxy and osty verifylab/adversarial/a03_honey_secret_exfil_test.gogo test -count=1 -tags adversarial -run '^TestA03' ./lab/adversarial/...
a04Plane 1 vPrev -> vNew differential behavioral baselinelab/adversarial/a04_differential_baseline_test.gogo test -count=1 -tags adversarial -run '^TestA04' ./lab/adversarial/...
a05Plane 1 artifact-vs-Git diff verifier and osty-proxy quarantine holdlab/adversarial/a05_artifact_source_mismatch_test.gogo test -count=1 -tags adversarial -run '^TestA05' ./lab/adversarial/...
a06Zero-knowledge private namespace hashes, Plane 1 confusion detector and osty-proxylab/adversarial/a06_zk_dependency_confusion_test.gogo test -count=1 -tags adversarial -run '^TestA06' ./lab/adversarial/...
a07OCI dpkg scanner, OSV and Debian Security Tracker importers and backport resolverlab/adversarial/a07_debian_backport_test.gogo test -count=1 -tags adversarial -run '^TestA07' ./lab/adversarial/...
a08ELF DT_NEEDED / VERNEED ABI checker and SPDX license difflab/adversarial/a08_elf_abi_and_license_test.gogo test -count=1 -tags adversarial -run '^TestA08' ./lab/adversarial/...
a09Go go/packages and TypeScript Compiler API analyzerslab/adversarial/a09_native_compiler_reachability_test.gogo test -count=1 -tags adversarial -run '^TestA09' ./lab/adversarial/...
a10Zero-tool changelog extraction, AST cross-validation, migration context assembler and Policy Patch Verifierlab/adversarial/a10_prompt_injection_migration_test.gogo test -count=1 -tags adversarial -run '^TestA10' ./lab/adversarial/...
a11osty-edge local policy gate, mTLS command link and hash-chained Evidence Ledgerlab/adversarial/a11_zero_trust_edge_policy_test.gogo test -count=1 -tags adversarial -run '^TestA11' ./lab/adversarial/...
a12Kill-switch Temporal workflow, dual-control approvals, rollback safety inspector and CI flake classifierlab/adversarial/a12_kill_switch_and_flake_test.gogo test -count=1 -tags adversarial -run '^TestA12' ./lab/adversarial/...
a13AWS (ECS, Lambda, ECR, Inspector) and GCP (Cloud Run, Artifact Registry, Container Analysis) collectorslab/adversarial/a13_ghost_prod_test.gogo test -count=1 -tags adversarial -run '^TestA13' ./lab/adversarial/...
a14osty airgap export / import, osty explain, edge cache and osty-proxy in a network-refusing environmentlab/adversarial/a14_airgap_offline_test.gogo test -count=1 -tags adversarial -run '^TestA14' ./lab/adversarial/...
a15Control-plane strict authorizer, OIDC and mTLS identities, RBAC ledgerlab/adversarial/a15_multi_org_rbac_test.gogo 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-proxy and 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 check runs 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.

See your fleet in 10 minutes

Connect a read-only GitHub App and cloud role. Osty installs nothing in your environment and writes nothing to your repositories, and the report shows false positives, stale deploys and unowned workloads.