Skip to content

fix(attestation): wire real measurement policy into bootstrap_measurement_policy() - #239

Open
Sertug17 wants to merge 1 commit into
SeismicSystems:seismicfrom
Sertug17:fix/bootstrap-measurement-policy
Open

fix(attestation): wire real measurement policy into bootstrap_measurement_policy()#239
Sertug17 wants to merge 1 commit into
SeismicSystems:seismicfrom
Sertug17:fix/bootstrap-measurement-policy

Conversation

@Sertug17

@Sertug17 Sertug17 commented Aug 10, 2026

Copy link
Copy Markdown

Closes #238

Problem

bootstrap_measurement_policy() returned dangerously_accept_any_for_testing(), allowing any TEE image to participate in root key bootstrap without measurement verification.

Changes

  • Load network manifest from NETWORK_MANIFEST_PATH to read the pinned bootstrap_policy_hash
  • Load measurement-policy artifact from /run/seismic/conf/measurements.json
  • Verify artifact SHA-256 against bootstrap_policy_hash before parsing
  • Parse verified artifact with SeismicMeasurementPolicy::from_json_bytes()
  • Add seismic-network-manifest, sha2, hex to crate dependencies
  • Propagate async + Result return type to both call sites

Security

Fails closed on every failure path I/O error, hash mismatch, parse error. The node never falls back to a permissive policy.

Testing needed

  • Unit test: valid artifact + matching hash → policy constructed
  • Unit test: hash mismatch → bootstrap rejected
  • Integration test: modified enclave fails bootstrap handshake

Replace dangerously_accept_any_for_testing() with a real implementation
that loads the measurement-policy artifact from the node's conf directory,
verifies its SHA-256 digest against the manifest's bootstrap_policy_hash,
and parses it before trusting it.

Fails closed on any I/O error, hash mismatch, or parse failure — the node
never falls back to a permissive policy.

Closes SeismicSystems#238
@Sertug17
Sertug17 requested a review from cdrappi as a code owner August 10, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CRITICAL SECURITY] bootstrap_measurement_policy() accepts any TEE image attestation bypass at root key bootstrap

1 participant