feat(wt-invokers): require --environment-tar-digest and verify before unpack#196
Merged
Conversation
…e unpack Add a mandatory sha256 integrity check on the sandbox invoker so a tampered or corrupted environment.tar never executes (closes #191). - utils: add validate_environment_tar_digest() enforcing the sha256:<64 hex> format, shared by the sandbox CLI and CloudRunJobsSandboxInvoker - exceptions: add EnvironmentTarDigestError(InvokerError) - mixins: PixiUnpackMixin now requires environment_tar_digest and verifies the downloaded tarball's sha256 before pixi-unpack; on mismatch it raises EnvironmentTarDigestError before unpacking (activate_path left unset), mirroring the adjacent PixiUnpackError pre-run failure mode - sandbox: add the required --environment-tar-digest CLI flag with format validation and forward it through to the invoker - cloud_run_jobs: add the required environment_tar_digest kwarg with eager format validation and forward it to the sandbox CLI container args Both upload and --dangerously-skip-results-archive-upload modes behave identically: the run fails before unpacking, raising and exiting non-zero with no result.json written. The deployment detects failure via the exit code / Cloud Run execution status, the same signal it already needs for OOMs, segfaults, and pixi-unpack failures. BREAKING CHANGE: --environment-tar-digest is now required on the sandbox CLI and environment_tar_digest is a required kwarg on CloudRunJobsSandboxInvoker.run(). Callers populating invoker_kwargs for wt-runner must now include environment_tar_digest. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
atmorling
approved these changes
Jun 18, 2026
This was referenced Jun 18, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🌎 Summary
closes #191
📦 Proposed Changes
Add a mandatory sha256 integrity check on the sandbox invoker so a tampered or corrupted environment.tar never executes (closes #191).
format, shared by the sandbox CLI and CloudRunJobsSandboxInvoker
Both upload and --dangerously-skip-results-archive-upload modes behave identically: the run fails before unpacking, raising and exiting non-zero with no result.json written. The deployment detects failure via the exit code / Cloud Run execution status, the same signal it already needs for OOMs, segfaults, and pixi-unpack failures.
BREAKING CHANGE: --environment-tar-digest is now required on the sandbox CLI and environment_tar_digest is a required kwarg on CloudRunJobsSandboxInvoker.run(). Callers populating invoker_kwargs for wt-runner must now include environment_tar_digest.