Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: validate-no-merge-duplication validate validate-json validate-yaml validate-quadlet validate-render validate-evidence validate-governance validate-policy-fabric validate-agent-registry validate-superconscious-runtime-plan validate-activation validate-supply-chain validate-release-bundle validate-sourceos-projections validate-package validate-cli validate-formula validate-runtime-install-receipts doctor probe validate-artifact-digest-honesty validate-consent-before-staging
.PHONY: validate-no-merge-duplication validate validate-json validate-yaml validate-quadlet validate-render validate-evidence validate-governance validate-policy-fabric validate-agent-registry validate-superconscious-runtime-plan validate-activation validate-attestation validate-supply-chain validate-release-bundle validate-sourceos-projections validate-package validate-cli validate-formula validate-runtime-install-receipts doctor probe validate-artifact-digest-honesty validate-consent-before-staging

PYTHON ?= python3
RUBY ?= ruby
Expand All @@ -22,7 +22,7 @@ DECIDED_AT := 2026-05-04T12:51:00Z
PYCLI := PYTHONPATH=src $(PYTHON) -m agent_machine.cli
PYMOD := PYTHONPATH=src $(PYTHON) -m

validate: validate-no-merge-duplication validate-json validate-yaml validate-quadlet validate-render validate-evidence validate-governance validate-policy-fabric validate-agent-registry validate-superconscious-runtime-plan validate-activation validate-supply-chain validate-release-bundle validate-sourceos-projections validate-package validate-cli validate-formula validate-runtime-install-receipts validate-artifact-digest-honesty validate-consent-before-staging
validate: validate-no-merge-duplication validate-json validate-yaml validate-quadlet validate-render validate-evidence validate-governance validate-policy-fabric validate-agent-registry validate-superconscious-runtime-plan validate-activation validate-attestation validate-supply-chain validate-release-bundle validate-sourceos-projections validate-package validate-cli validate-formula validate-runtime-install-receipts validate-artifact-digest-honesty validate-consent-before-staging

validate-no-merge-duplication:
$(PYTHON) scripts/validate-no-merge-duplication.py
Expand Down Expand Up @@ -88,6 +88,9 @@ validate-activation:
$(PYCLI) activate evaluate $(LOCAL_AGENTPOD) --policy-dir $(POLICY_DIR) --expected-status allowed --grant-dir $(GRANT_DIR) --grant-id urn:srcos:agent-machine:agent-registry-grant:active-loopback-activation --session-ref urn:srcos:session:local-bootstrap --deployment-receipt-id $(DEPLOYMENT_RECEIPT_ID) --agent-machine-id urn:srcos:agent-machine:m2-asahi-local --provider-id urn:srcos:agent-machine:inference-provider:asahi-llama-cpp --storage-receipt-dir $(RECEIPT_DIR) --decided-at $(DECIDED_AT) --decision-id urn:srcos:agent-machine:activation-decision:local-llama-cpp-allowed --pretty >/tmp/agent-machine-pycli-resolved-policy-grant-activation-allowed.json
$(BOOTSTRAP_CLI) activate evaluate $(LOCAL_AGENTPOD) $(READY_POLICY) $(READY_GRANT) --deployment-receipt-id $(DEPLOYMENT_RECEIPT_ID) --storage-receipt-dir $(RECEIPT_DIR) --decided-at $(DECIDED_AT) --decision-id urn:srcos:agent-machine:activation-decision:local-llama-cpp-allowed --pretty >/tmp/agent-machine-bootstrap-evaluate-activation-allowed.json

validate-attestation:
$(PYTHON) scripts/validate-attestation.py

validate-supply-chain:
$(PYTHON) scripts/validate-supply-chain.py
$(PYMOD) agent_machine.supply_chain $(PINNED_AGENTPOD) --strict
Expand Down
36 changes: 36 additions & 0 deletions contracts/attestation-decision.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:srcos:agent-machine:schema:attestation-decision:v0.1.0",
"title": "AttestationDecision",
"description": "Host attestation decision for whether an Agent Machine host may be activated. activation_permitted is true only if ALL blocking checks pass; a single blocking failure denies activation. Advisory checks (TELEMETRY_BOUNDARY/SEAM-013, DISPLAY_UUID_STABILITY/SEAM-008) warn only and never block. Field names are snake_case per Tranche Work Order T2-1.",
"type": "object",
"additionalProperties": false,
"required": ["specVersion","kind","attestation_id","host_id","attested_at","attested_by","activation_permitted","overall_status","check_results"],
"properties": {
"specVersion": { "type": "string", "const": "0.1.0" },
"kind": { "type": "string", "const": "AttestationDecision" },
"attestation_id": { "type": "string", "pattern": "^urn:srcos:agent-machine:attestation-decision:[a-z0-9][a-z0-9-]*$" },
"host_id": { "type": "string", "minLength": 1 },
"attested_at": { "type": "string", "format": "date-time" },
"attested_by": { "type": "string", "minLength": 1 },
"activation_permitted": { "type": "boolean" },
"overall_status": { "type": "string", "enum": ["pass","fail","partial"] },
"check_results": {
"type": "array",
"minItems": 1,
"items": {
Comment on lines +18 to +21
"type": "object",
"additionalProperties": false,
"required": ["check_id","check_name","status","expected","actual","blocking"],
"properties": {
"check_id": { "type": "string", "minLength": 1 },
"check_name": { "type": "string" },
"status": { "type": "string", "enum": ["pass","fail","warn","skip"] },
"expected": { "type": "string" },
"actual": { "type": "string" },
"blocking": { "type": "boolean" }
}
}
}
}
}
46 changes: 46 additions & 0 deletions docs/architecture/attestation-model.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Attestation Model (v0.1)

## Attestation vs activation
**Attestation** measures host trust (SIP, NVRAM, MDM, SEP, security-DB schema,
DNS, TLS, EFI) and emits an `AttestationDecision`. **Activation** (existing
`ActivationDecision`) decides whether an AgentPod may run. Attestation is a
*prerequisite input* to activation: `activation_permitted: false` from
attestation blocks activation regardless of policy/grant state.

## Check taxonomy
- **Blocking** (a single failure denies activation): `SIP_STATUS`,
`NVRAM_INTEGRITY`, `MDM_PROFILE_AUDIT`, `SEP_PARTICIPATION`,
`SECURITY_DB_SCHEMA`, `DNS_INTEGRITY`, `TLS_CIPHER_AUDIT`, `EFI_SIGNATURE`.
- **Advisory** (warn only): `TELEMETRY_BOUNDARY` (SEAM-013),
`DISPLAY_UUID_STABILITY` (SEAM-008).

`activation_permitted` is true **iff every blocking check passes** — enforced by
`scripts/validate-attestation.py`.

## Failure-mode basis (SEAM references)
Each check maps to an observed diagnostic failure mode:
- `SIP_STATUS` — SIP disabled via NVRAM (csr-active-config=0x67) — SEAM-001.
- `NVRAM_INTEGRITY` — world-writable nvram.plist — SEAM-001.
- `MDM_PROFILE_AUDIT` — unauthorized MDM enrollment (IBM MaaS360) — SEAM-002.
- `SEP_PARTICIPATION` — SEP non-participation in keybag (ANOMALY-007) — SEAM-003.
- `SECURITY_DB_SCHEMA` — iCloud Keychain schema mismatch (v24.6 vs v25+;
missing ZSEQUENCENUMBER in ZPEER; broken escrow chain).
- `DNS_INTEGRITY` — resolution returning 102.165.31.x (adversary IPs) — SEAM-004.
- `TLS_CIPHER_AUDIT` — cipher downgrade (RC4_128_MD5) — SEAM-005.
- `EFI_SIGNATURE` — unsigned/tampered EFI — SEAM-001.

## Telemetry boundary (SEAM-013)
`TELEMETRY_BOUNDARY` is **advisory, not blocking**: Claude Desktop
`sessionSampleRate:100` means sensitive output must not route through a
100%-sampled surface. Recorded as a warn signal in the decision, not a hard
gate.

## Out-of-band ledger
The `attest` runtime CLI (T2-3, follow-up) must append each decision to
`$LEDGER_PATH` as NDJSON and never silently drop; `$LEDGER_PATH` must never be
local-only for a ledger-writing artifact.

## References
`AttestationDecision` (T2-1, `contracts/attestation-decision.schema.json`);
`ActivationDecision` (existing). Runtime `attest` subcommand: T2-3 (deferred to a
macOS attestation environment — the schema/contract here is what T4-4 depends on).
92 changes: 92 additions & 0 deletions examples/attestation-decision.failed-mdm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"specVersion": "0.1.0",
"kind": "AttestationDecision",
"attestation_id": "urn:srcos:agent-machine:attestation-decision:failed-mdm",
"host_id": "host-alpha-001",
"attested_at": "2026-07-31T04:00:00Z",
"attested_by": "urn:srcos:agent-machine:attest",
"activation_permitted": false,
"overall_status": "fail",
"check_results": [
{
"check_id": "SIP_STATUS",
"check_name": "System Integrity Protection",
"status": "pass",
"expected": "csr-active-config=0x00 (enabled)",
"actual": "0x00 (enabled)",
"blocking": true
},
{
"check_id": "NVRAM_INTEGRITY",
"check_name": "NVRAM plist permissions",
"status": "pass",
"expected": "0644 root-owned",
"actual": "0644 root-owned",
"blocking": true
},
{
"check_id": "MDM_PROFILE_AUDIT",
"check_name": "MDM configuration profile audit",
"status": "fail",
"expected": "no unrecognized profiles",
"actual": "IBM MaaS360 (unauthorized)",
"blocking": true
},
{
"check_id": "SEP_PARTICIPATION",
"check_name": "Secure Enclave participation",
"status": "pass",
"expected": "SEP participates in keybag",
"actual": "SEP participates in keybag",
"blocking": true
},
{
"check_id": "SECURITY_DB_SCHEMA",
"check_name": "iCloud Keychain schema",
"status": "pass",
"expected": "v25+ with ZSEQUENCENUMBER in ZPEER",
"actual": "v25+ with ZSEQUENCENUMBER in ZPEER",
"blocking": true
},
{
"check_id": "DNS_INTEGRITY",
"check_name": "DNS resolution integrity",
"status": "pass",
"expected": "platform endpoints resolve normally",
"actual": "platform endpoints resolve normally",
"blocking": true
},
{
"check_id": "TLS_CIPHER_AUDIT",
"check_name": "TLS cipher suite audit",
"status": "pass",
"expected": "TLS1.2+; no RC4/MD5/SHA1",
"actual": "TLS1.2+; no RC4/MD5/SHA1",
"blocking": true
},
{
"check_id": "EFI_SIGNATURE",
"check_name": "EFI firmware signature",
"status": "pass",
"expected": "signed vendor firmware",
"actual": "signed vendor firmware",
"blocking": true
},
{
"check_id": "TELEMETRY_BOUNDARY",
"check_name": "Claude Desktop telemetry boundary (SEAM-013)",
"status": "warn",
"expected": "sensitive output not routed through 100%-sampled surface",
"actual": "sessionSampleRate:100",
"blocking": false
},
{
"check_id": "DISPLAY_UUID_STABILITY",
"check_name": "Display UUID stability (SEAM-008)",
"status": "warn",
"expected": "stable displayUUID",
"actual": "stable displayUUID",
"blocking": false
Comment on lines +84 to +89
}
]
}
92 changes: 92 additions & 0 deletions examples/attestation-decision.failed-sip.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"specVersion": "0.1.0",
"kind": "AttestationDecision",
"attestation_id": "urn:srcos:agent-machine:attestation-decision:failed-sip",
"host_id": "host-alpha-001",
"attested_at": "2026-07-31T04:00:00Z",
"attested_by": "urn:srcos:agent-machine:attest",
"activation_permitted": false,
"overall_status": "fail",
"check_results": [
{
"check_id": "SIP_STATUS",
"check_name": "System Integrity Protection",
"status": "fail",
"expected": "csr-active-config=0x00 (enabled)",
"actual": "0x67 (SIP disabled via NVRAM)",
"blocking": true
},
{
"check_id": "NVRAM_INTEGRITY",
"check_name": "NVRAM plist permissions",
"status": "pass",
"expected": "0644 root-owned",
"actual": "0644 root-owned",
"blocking": true
},
{
"check_id": "MDM_PROFILE_AUDIT",
"check_name": "MDM configuration profile audit",
"status": "pass",
"expected": "no unrecognized profiles",
"actual": "no unrecognized profiles",
"blocking": true
},
{
"check_id": "SEP_PARTICIPATION",
"check_name": "Secure Enclave participation",
"status": "pass",
"expected": "SEP participates in keybag",
"actual": "SEP participates in keybag",
"blocking": true
},
{
"check_id": "SECURITY_DB_SCHEMA",
"check_name": "iCloud Keychain schema",
"status": "pass",
"expected": "v25+ with ZSEQUENCENUMBER in ZPEER",
"actual": "v25+ with ZSEQUENCENUMBER in ZPEER",
"blocking": true
},
{
"check_id": "DNS_INTEGRITY",
"check_name": "DNS resolution integrity",
"status": "pass",
"expected": "platform endpoints resolve normally",
"actual": "platform endpoints resolve normally",
"blocking": true
},
{
"check_id": "TLS_CIPHER_AUDIT",
"check_name": "TLS cipher suite audit",
"status": "pass",
"expected": "TLS1.2+; no RC4/MD5/SHA1",
"actual": "TLS1.2+; no RC4/MD5/SHA1",
"blocking": true
},
{
"check_id": "EFI_SIGNATURE",
"check_name": "EFI firmware signature",
"status": "pass",
"expected": "signed vendor firmware",
"actual": "signed vendor firmware",
"blocking": true
},
{
"check_id": "TELEMETRY_BOUNDARY",
"check_name": "Claude Desktop telemetry boundary (SEAM-013)",
"status": "warn",
"expected": "sensitive output not routed through 100%-sampled surface",
"actual": "sessionSampleRate:100",
"blocking": false
},
{
"check_id": "DISPLAY_UUID_STABILITY",
"check_name": "Display UUID stability (SEAM-008)",
"status": "warn",
"expected": "stable displayUUID",
"actual": "stable displayUUID",
"blocking": false
Comment on lines +84 to +89
}
]
}
92 changes: 92 additions & 0 deletions examples/attestation-decision.passed.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"specVersion": "0.1.0",
"kind": "AttestationDecision",
"attestation_id": "urn:srcos:agent-machine:attestation-decision:passed",
"host_id": "host-alpha-001",
"attested_at": "2026-07-31T04:00:00Z",
"attested_by": "urn:srcos:agent-machine:attest",
"activation_permitted": true,
"overall_status": "pass",
"check_results": [
{
"check_id": "SIP_STATUS",
"check_name": "System Integrity Protection",
"status": "pass",
"expected": "csr-active-config=0x00 (enabled)",
"actual": "0x00 (enabled)",
"blocking": true
},
{
"check_id": "NVRAM_INTEGRITY",
"check_name": "NVRAM plist permissions",
"status": "pass",
"expected": "0644 root-owned",
"actual": "0644 root-owned",
"blocking": true
},
{
"check_id": "MDM_PROFILE_AUDIT",
"check_name": "MDM configuration profile audit",
"status": "pass",
"expected": "no unrecognized profiles",
"actual": "no unrecognized profiles",
"blocking": true
},
{
"check_id": "SEP_PARTICIPATION",
"check_name": "Secure Enclave participation",
"status": "pass",
"expected": "SEP participates in keybag",
"actual": "SEP participates in keybag",
"blocking": true
},
{
"check_id": "SECURITY_DB_SCHEMA",
"check_name": "iCloud Keychain schema",
"status": "pass",
"expected": "v25+ with ZSEQUENCENUMBER in ZPEER",
"actual": "v25+ with ZSEQUENCENUMBER in ZPEER",
"blocking": true
},
{
"check_id": "DNS_INTEGRITY",
"check_name": "DNS resolution integrity",
"status": "pass",
"expected": "platform endpoints resolve normally",
"actual": "platform endpoints resolve normally",
"blocking": true
},
{
"check_id": "TLS_CIPHER_AUDIT",
"check_name": "TLS cipher suite audit",
"status": "pass",
"expected": "TLS1.2+; no RC4/MD5/SHA1",
"actual": "TLS1.2+; no RC4/MD5/SHA1",
"blocking": true
},
{
"check_id": "EFI_SIGNATURE",
"check_name": "EFI firmware signature",
"status": "pass",
"expected": "signed vendor firmware",
"actual": "signed vendor firmware",
"blocking": true
},
{
"check_id": "TELEMETRY_BOUNDARY",
"check_name": "Claude Desktop telemetry boundary (SEAM-013)",
"status": "pass",
"expected": "sensitive output not routed through 100%-sampled surface",
"actual": "sensitive output not routed through sampled surface",
"blocking": false
},
{
"check_id": "DISPLAY_UUID_STABILITY",
"check_name": "Display UUID stability (SEAM-008)",
"status": "pass",
"expected": "stable displayUUID",
"actual": "stable displayUUID",
"blocking": false
}
]
}
Loading
Loading