Skip to content

Add protection against cache poisoning. - #3045

Merged
mhsmith merged 2 commits into
beeware:mainfrom
freakboy3742:reverify-hashes
Sep 9, 2026
Merged

Add protection against cache poisoning.#3045
mhsmith merged 2 commits into
beeware:mainfrom
freakboy3742:reverify-hashes

Conversation

@freakboy3742

Copy link
Copy Markdown
Member

Adds a hash verification to already-downloaded assets.

My original motivation for this came from verifying CI results - in particular, verifying that hashes that have been added to templates are correct. Previously, when a download was cached, no hash verification is performed, which means there's no visibility if the hash encoded in a template is correct.

However, in the process of implementing the fix, it occurred to me that this also serves as protection against cache poisoning - if an attacker gains access to a build machine that has a warm download cache, they could insert malicious content into a stub binary or support package, and it would go undetected.

A hash is quick to compute; so adding a hash check on cached files solves both problems.

PR Checklist:

  • I will abide by the BeeWare Code of Conduct
  • I have read and have followed the CONTRIBUTING.md file
  • This PR was generated or assisted using an AI tool
    Assisted-by: Claude Sonnet 5

@freakboy3742
freakboy3742 requested a review from mhsmith September 9, 2026 03:49
@mhsmith
mhsmith merged commit 74308e1 into beeware:main Sep 9, 2026
103 of 106 checks passed
@freakboy3742
freakboy3742 deleted the reverify-hashes branch September 9, 2026 21:58
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.

2 participants