Skip to content

fix(selfupdate): verify GitHub release asset digests - #3897

Merged
Sayt-0 merged 1 commit into
mainfrom
fix/3871-self-update-digest
Aug 3, 2026
Merged

fix(selfupdate): verify GitHub release asset digests#3897
Sayt-0 merged 1 commit into
mainfrom
fix/3871-self-update-digest

Conversation

@Sayt-0

@Sayt-0 Sayt-0 commented Aug 3, 2026

Copy link
Copy Markdown
Member

Summary

Addresses the self-update failure reported in #3871.

Docker Agent releases expose a SHA-256 digest through GitHub release asset metadata but do not publish checksums.txt. Self-update therefore failed with HTTP 404 after downloading the new binary.

Changes

  • Read and validate the GitHub release asset SHA-256 digest before downloading
  • Pin the initial download URL to the expected repository, tag, and asset
  • Reject malformed URLs, unexpected ports, userinfo, queries, and fragments
  • Limit redirects to HTTPS and at most 10 hops
  • Verify downloaded bytes against the release asset digest and fail closed
  • Preserve only the minimal non-secret environment required to validate the staged binary
  • Keep API keys, GitHub tokens, and proxy credentials out of the validation process environment

Issue coverage

#3871 concern Status
Sandbox template version skew Already addressed on main by using docker/docker-agent-sbx-templates:latest
Self-update requests missing checksums.txt Addressed by this change
DMR ignores --models-gateway Addressed separately by #3875
inspect exec timeout and orphaned process Belongs to the sbx lifecycle implementation

This PR intentionally does not close #3871 because the remaining concerns are tracked outside this change.

Validation

  • go test ./...
  • task lint
  • task build
  • Linux and Windows cross-builds
  • Live macOS update from v1.119.0 to v1.120.0 using the published GitHub asset
  • Verified final version and commit after re-exec
  • Verified no update or backup files remained

@Sayt-0
Sayt-0 requested a review from a team as a code owner August 3, 2026 12:48
@aheritier aheritier added area/core Core agent runtime, session management kind/fix PR fixes a bug (maps to fix:). Use on PRs only. labels Aug 3, 2026
@Sayt-0
Sayt-0 merged commit 8290df1 into main Aug 3, 2026
23 of 24 checks passed
@Sayt-0
Sayt-0 deleted the fix/3871-self-update-digest branch August 3, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core Core agent runtime, session management kind/fix PR fixes a bug (maps to fix:). Use on PRs only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sandbox runs broken by version skew: bundled v1.88.1 self-update 404s and ignores --models-gateway

3 participants