Skip to content

fix(security): fail-hard on checksum verification failure during upgrade - #609

Merged
ajianaz merged 1 commit into
developfrom
fix/checksum-verify-fail-hard
Jul 7, 2026
Merged

ajianaz merged 1 commit into
developfrom
fix/checksum-verify-fail-hard

Conversation

@ajianaz

@ajianaz ajianaz commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Problem

Cora scan (via GLM-5.2 + Bifrost) found a security issue: uteke upgrade silently skipped SHA-256 checksum verification when the checksums file failed to download or the archive name was not found in the file. This allowed a MITM attacker to deliver a tampered binary by dropping the checksums request.

Changes

  • Fail with Err when checksums download fails (network error, HTTP error)
  • Fail when archive checksum is missing from checksums file
  • Add UTEKE_UPGRADE_SKIP_CHECKSUM=1 env var for explicit opt-out
  • Cleanup temp files on all new failure paths

Testing

  • cargo fmt --all -- --check ✅ passes
  • CI build + test

Found by

Cora code review (GLM-5.2 via Bifrost gateway)

Previously, uteke upgrade silently skipped SHA-256 checksum verification
when the checksums file failed to download or the archive name was not
found. This allowed a MITM attack to deliver a tampered binary.

Changes:
- Fail with Err when checksums download fails (network error or HTTP error)
- Fail when archive checksum is missing from checksums file
- Add UTEKE_UPGRADE_SKIP_CHECKSUM=1 env opt-in for explicit bypass
- Cleanup temp files on all failure paths

Found by: cora scan (glm-5.2 via Bifrost)
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-cli · BYOK · MIT

@ajianaz
ajianaz merged commit 70886e2 into develop Jul 7, 2026
8 checks passed
@ajianaz
ajianaz deleted the fix/checksum-verify-fail-hard branch July 7, 2026 12:38
ajianaz added a commit that referenced this pull request Aug 13, 2026
fix(security): fail-hard on checksum verification failure during upgrade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant