Skip to content

domain: validate process capture executable commitment against scenario projection #191

Closed as not planned

Description

@morluto

Problem

validateCommitments in src/domain/processCaptureValidation.ts has a no-op invariant check for the executable SHA-256 commitment.

Current code asserts:

require(manifest.scenario.executable_sha256 === manifest.executable_sha256,
  "manifest.executable_sha256", ...)

This always compares against itself and never verifies that the committed manifest executable hash is derived from the scenario projection. As a result, a corrupted manifest.executable_sha256 value can pass parseProcessCapture and be treated as trusted process-capture evidence.

Evidence

  • The check above is in validateCommitments in src/domain/processCaptureValidation.ts and is a tautology.
  • processCaptureSchema relies on validateProcessCapture for semantic checks used by parseProcessCapture, so malformed captures are not rejected there.
  • processCapture schema and process-identity helpers commit this field as executable_sha256 in the scenario projection (src/domain/processScenario.ts).

Reproduction

  1. Build any process-capture object that satisfies schema and other checks.
  2. Set manifest.scenario.executable_sha256 = "cafeb..." and set a different manifest.executable_sha256.
  3. Call parseProcessCapture.
  4. Because of the self-comparison, this mismatch is not detected as a validation issue.

Expected

validateCommitments should check that:

  • manifest.scenario.executable_sha256 === manifest.executable_sha256
  • and that this value is the committed executable projection from the scenario, not a user-controlled independent value.

Equivalent to other commitment checks already implemented for full_scenario_sha256, comparison_contract_sha256, etc.

Impact

Allows tampered process-capture manifests with mismatched executable commitments to be considered valid, weakening evidence integrity guarantees.

Suggested fix

Replace the tautological condition with a real comparison and, if needed, a dedicated digest calculation of the scenario commitment including executable hash consistency (for example via processScenarioCommitment semantics).

Activity

  1. N0zoM1z0 commented on Jul 14, 2026

    @N0zoM1z0
    Collaborator

    Triage on current main (6a3fd5b): this report is not reproducible. Since ac78de0, the invariant compares manifest.scenario.executable_sha256 with manifest.executable_sha256; it is not a self-comparison. The process-capture regression rejects altered v4 commitments and accepts canonical key reordering passes in the full suite.

  2. added
    enhancement
    area: runtime
    on Oct 12, 2026
  3. added
    area: domain
    on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: domainarea: runtimeenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions