# Zero-trust policy and the Evidence Ledger

Center hub / Policy and Ledger. Breadcrumb: [Home](https://osty.dev/) / Policy and Ledger

`.osty/policy.yaml` is a declarative, non-executable file pinned in your Git repository, and `osty-edge` checks every mutating command against it inside your VPC, including commands from Osty's control plane. Every verdict, policy check, override and rollout is then written to a per-organisation, hash-chained Ed25519 Evidence Ledger you can verify offline.

Table: What the Evidence Ledger proves and how to check it

| Property | How Osty enforces it | How you verify it |
| --- | --- | --- |
| Tamper evidence | Each entry embeds the canonical hash of the entry before it. | `osty ledger verify-export` recomputes the whole chain. |
| Signer authenticity | Entries are signed with Ed25519 keys that rotate under recorded key events. | Pin keys with `--trusted-key key-id=<public key>`. |
| No silent truncation | Exports carry a signed checkpoint of the chain head. | Compare with an earlier export through `--trusted-checkpoint`. |
| Tenant isolation | One chain per organisation, with no shared entries. | Each export verifies on its own. |
| Auditor evidence | SOC 2, ISO 27001, EU CRA and FedRAMP bundles mapped from ledger entries. | `osty compliance verify`, or push to Vanta, Drata, ServiceNow or Jira. |

Verify a ledger export offline:

```bash
osty ledger verify-export --bundle ledger-export.json --trusted-key control-ledger=ledger.pub.pem --json
```

## How does .osty/policy.yaml work?

The policy is plain YAML decoded strictly: unknown fields fail, and fields such as `hooks`, `exec`, `shell`, `command` or `script` are rejected in every section. It is reviewed under your branch protection like any other code, and the edge enforces the version pinned at a Git commit.

.osty/policy.yaml (passes `osty policy validate`):

```yaml
apiVersion: osty.io/v1
kind: FleetPolicy
supplyChain:
  defaultCooldownHours: 48
  fastTrackVerifiedKEV: true
  blockVerdicts: [CONFIRMED_MALICIOUS, QUARANTINED_HIGH_RISK]
  blockLicenseChanges: true
  allowedLicenses: [MIT, Apache-2.0, BSD-3-Clause, ISC]
  proxyFailureMode:
    prodCI: FAIL_CLOSED
    devLaptop: FAIL_OPEN_WITH_CACHE
cadence:
  maintenanceTrain:
    schedule: "every Tuesday 09:00 UTC"
    coalesceSeverities: [MEDIUM, LOW]
  fastTrackSeverities: [CRITICAL, HIGH]
ciGovernor:
  maxConcurrentCampaignRuns: 10
  routineBudgetPercent: 20
  kevBurstBudgetPercent: 60
  flakeControlRerun: true
autonomy:
  defaultTier: VERIFIED_PR
  canaryDefaults:
    soakMinutes: 30
    maxErrorRateDeltaPct: 1.0
    maxP99DeltaPct: 20
    zeroOOMKills: true
  tiers:
    TIER_0:
      maxAutonomy: VERIFIED_PR
      requireObservabilityGate: true
    TIER_1:
      maxAutonomy: CANARY_ROLLOUT
      requireObservabilityGate: true
      canarySoakMinutes: 15
patchVerifier:
  allowAgenticCodeMigrations: true
  agenticMigrationMaxAutonomy: VERIFIED_PR
  forbiddenPaths:
    - ".github/workflows/**"
    - ".gitlab-ci.yml"
    - "**/auth/**"
  forbidUnlistedDependencies: true
  forbidNewShellOrNetworkPrimitives: true
killSwitch:
  autoFreezeProxyOnConfirmedMalicious: true
  autoRollbackStatelessWorkloads: true
  statefulMigrationAction: CONTAIN_AND_FORWARD_REBUILD
  requireDualControlForBroadRollback: true
releaseGates:
  freezeWindows:
    - name: year-end-freeze
      start: "2026-12-18T00:00:00Z"
      end: "2027-01-04T00:00:00Z"
      appliesToTiers: [TIER_0, TIER_1]
      allowKEVOverride: true
      reason: "year-end change freeze"
  externalApprovalGates:
    - name: servicenow-change
      provider: SERVICENOW
      appliesToTiers: [TIER_0]
      appliesToActions: [MERGE_PR, REDEPLOY]
      failClosed: true
      maxSignalAgeMinutes: 240
```

### What each section controls

Table: Top-level policy sections

| Section | Controls |
| --- | --- |
| `supplyChain` | Cooldown before new versions install, KEV fast track for `CLEAN` fixes, blocked verdicts, license rules and proxy failure modes. |
| `cadence` | The weekly maintenance train and which severities take the fast track. |
| `ciGovernor` | Concurrent campaign runs, the share of CI capacity for routine and KEV work, and flake control reruns. |
| `autonomy` | The default level, canary thresholds and a `maxAutonomy` cap per service tier. |
| `patchVerifier` | Whether AI migrations may run, their `VERIFIED_PR` ceiling, forbidden paths and dependency rules. |
| `killSwitch` | Proxy freeze, stateless rollback, stateful migration handling and dual control for broad rollbacks. |
| `releaseGates` | Change freeze windows and fail-closed external approvals. |

## Can a compromised control plane bypass the policy?

No. Opening a pull request, merging, redeploying and rolling back all execute in `osty-edge`, and the edge evaluates each command against the Git-pinned policy before it runs. A command the policy does not allow is refused even when it arrives signed from Osty's own control plane.

This is checked three ways: adversarial scenario `a11` drives a compromised control plane against a real edge, the TLA+ model `EdgeZeroTrustAndKillSwitch` proves the invariant `NoOutOfPolicyMutation`, and the edge verifies dual-control signatures itself rather than trusting the control plane's count.

## Can a repository loosen the organisation's policy?

No. A repository overlay may only tighten organisation floors: lower an autonomy cap, add forbidden paths, lengthen a cooldown, add a freeze window or approval gate. A merge that would raise a cap, drop a gate or fail open is rejected, so platform teams set the floor once for every repository.

## How do change freezes and ServiceNow or Jira approvals work without shell hooks?

- `freezeWindows` are one-off RFC3339 ranges or recurring schedules. An active window blocks opening, merging and redeploying for the tiers it covers.
- `allowKEVOverride` lets a known-exploited fast-track fix through a window. It defaults to off.
- `externalApprovalGates` name a `SERVICENOW`, `JIRA` or `WEBHOOK` provider. `failClosed` must be present and true, and a signal older than `maxSignalAgeMinutes` does not count.
- Kill switches, artifact freezes and containment are never blocked by a freeze.

## How does the Evidence Ledger prove remediation to auditors?

Every verdict, policy decision, override, approval and rollout step is a signed ledger entry. `osty compliance export` maps those entries to SOC 2, ISO 27001, EU Cyber Resilience Act or FedRAMP controls and computes patch SLA metrics, producing a signed bundle an auditor can verify without access to Osty.

Export SOC 2 evidence and verify it offline:

```bash
osty compliance export --framework soc2 --input evidence.json --signing-key compliance.pem --out soc2-evidence.tar.gz
osty compliance verify --bundle soc2-evidence.tar.gz --public-key compliance.pub.pem
```

Osty pushes the same evidence to Vanta, Drata, ServiceNow and Jira. It does not run a compliance checklist dashboard; your GRC tool stays the system of record for controls.

## Frequently asked questions

### Can .osty/policy.yaml run scripts or webhooks?

No. The format is declarative and strictly decoded. External approvals are signals the edge reads and fails closed on, not commands it runs.

### Who can lower a CONFIRMED_MALICIOUS verdict?

Only a person, through a signed and justified `VerdictOverride` recorded in the ledger. Automation can only preserve or escalate a verdict.

### Does Osty replace Vanta or Drata?

No. Osty is the source of cryptographic remediation proof and exports it to those tools.

## Related pages

- [Ship](https://osty.dev/ship): Fleet campaigns on Temporal, offline AI migrations capped at `VERIFIED_PR`, the Policy Patch Verifier, CI side-effect classification, canary gates and a stateful-safe kill switch.
- [Security](https://osty.dev/security): Public Brain, Private Execution trust boundaries, outbound-only mTLS, the three-tier licensing map, TLA+ models, adversarial benchmarks and what Osty is not.
- [Guard](https://osty.dev/guard): Pre-install supply-chain firewall: Firecracker honey-secret detonation, artifact-vs-Git diffs, behavior baselines, dependency-confusion defense and `osty-proxy`.
- [Architecture](https://osty.dev/architecture): Plane 1 (`osty-brain`), the control plane (`osty-control`, PostgreSQL 17, Temporal) and the thin edge (`osty-edge`, `osty-proxy`, `osty-sensor`), plus the accepted ADRs behind them.

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

Get a free X-Ray: https://osty.dev/xray

Written by Osty Engineering. Published 2026-11-29. Updated 2026-11-29.

Canonical: https://osty.dev/policy-ledger
