Skip to content

fix(security): The updater must re-verify the checksum of the downloaded artifact at install time so a same-uid swap after the confirmation prompt cannot replace the approved bytes. - #473

Open
github-actions[bot] wants to merge 3 commits into
mainfrom
fix/security-20261107-080157-scheduled-ok-plan-02
Open

github-actions[bot] wants to merge 3 commits into
mainfrom
fix/security-20261107-080157-scheduled-ok-plan-02

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown

Issue: Refs #321

What

  • Plan now carries WantChecksum, the SHA-256 digest verified at download time.
  • Apply re-verifies the artifact bytes at install time and aborts on mismatch, for both the package-manager and self-replace paths.
  • Apply also refuses any plan that carries no verified digest.
  • Regression tests cover the tampered-artifact and missing-digest cases.

Why

  • The artifact's checksum was verified once at download time, but nothing guaranteed the file on disk was still the verified bytes by the time it was installed. Re-verification at install time closes that security gap.

How

  • Check records the digest that passed verification in Plan.WantChecksum (internal/updater/updater.go).
  • The package-manager path re-reads and hashes the file right before handing it to the installer; the self-replace path hashes the archive through the same reader that unpacks it, so the digest always covers the exact bytes being installed (internal/updater/updater.go).

Verification

  • go build ./..., go vet ./..., gofmt -l ., and staticcheck ./... pass.
  • The security regression tests in internal/updater/download_tamper_security_test.go pass, along with the full updater test suite (go test ./internal/updater/...).

Follow-up

  • None.

Test Writer Agent and others added 3 commits November 7, 2026 09:33
Signed-off-by: Test Writer Agent <test-writer@security-remediate.invalid>
Signed-off-by: Test Writer Agent <test-writer@security-remediate.invalid>
…ded artifact at install time so a same-uid swap after the confirmation prompt cannot replace the approved bytes.

Signed-off-by: Fix Writer Agent <fix-writer@security-remediate.invalid>
@github-actions github-actions Bot added the do-not-merge Hold: automated fix PR, needs a human pass label Nov 7, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge Hold: automated fix PR, needs a human pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants