Skip to content

grpc_exec: optional execution-environment commitment field in ExecuteResponse for downstream audit consumers #29

@tomjwxf

Description

@tomjwxf

Filing as a tight scope-check question before any PR. Not sandbox-adjacent: this is about the grpc_exec response shape specifically.

Context

Downstream audit systems consuming grpc_exec output (compliance logs, signed-receipt emitters, transparency logs) need to bind a specific execution to the environment it ran in, not just the command and exit code. Today ExecuteResponse returns stdout/stderr/exit status. A consumer that wants to answer the question "which sandbox config and which binary version produced this output?" has to fetch the config separately and trust that nothing changed in between.

One tiny field closes that gap: an optional commitment to the execution environment, computed server-side at the moment of execution.

Proposed shape

Add an optional environment_commitment field to ExecuteResponse (or the appropriate existing message):

message ExecuteResponse {
  // ... existing fields ...

  // Opaque byte string committing to the execution environment that
  // produced this response (sandbox config hash, binary build ID,
  // policy hash, or any composition the server chooses). Stable for a
  // given deployment; a client consuming the commitment verifies
  // against a reference value out-of-band.
  optional bytes environment_commitment = N;
}

Concretely: SHA-256 over a canonical serialization of whatever subset of (sandbox manifest, binary hash, command_filter rule set, runtime version) the grpc_exec server considers authoritative. The field is deliberately opaque to downstream consumers; the semantic is "this server-defined value identifies the execution environment at response time."

What this enables

A downstream audit system can include the commitment in its own signed record, giving a verifier the ability to detect: "the output claims environment X, but the reference environment at time T was Y, so either the server drifted or someone is replaying an old response."

Protocol-layer primitive for auditability. No policy, no governance vocabulary, no opinion on what the commitment covers or how it is verified. The grpc_exec server chooses the composition; downstream consumers choose how to use it.

What this is NOT

  • Not a signed-response mechanism. The commitment is unsigned by grpc_exec; downstream systems add their own signatures as they see fit.
  • Not a policy engine. grpc_exec does not evaluate the commitment; it only emits it.
  • Not a key distribution problem. Verification happens out-of-band.
  • Not coupled to any specific audit framework. Any consumer wanting a stable environment identifier can consume it.

Prior art

A similar pattern exists in the TUF spec (target-file hashes in role metadata), in SLSA provenance (builder and build-platform commitments on the Provenance predicate), and in any reproducible-build system that exposes a hash of the build environment. The grpc_exec shape is different enough that those don't directly apply, but the principle is the same: make the execution environment inspectable by consumers without trusting that nothing changed between execution and audit.

Scope-check questions for the maintainers

  1. Is execution-environment commitment in scope for grpc_exec, or out of scope (e.g., philosophy is that agent-shell-tools stays minimal and this belongs in a wrapper)?
  2. If in scope, does the maintainer have a preferred composition? (My instinct is server-picks, client-treats-as-opaque, but you may have a stricter model in mind.)
  3. Is a single optional bytes field the right shape, or would you prefer a structured message (e.g., {digest, algorithm, context_hint}) for future extensibility?

Happy to draft a PR once the scope answer is clear. If this is out of scope for grpc_exec, that is also useful information; the alternative is a wrapper service that sits between grpc_exec and the audit consumer, which I am also willing to build in a separate repo.

Thanks for maintaining agent-shell-tools; the current scope is cleanly composable and this would extend that property by one small additive field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions