Repository navigation
fix(library): pin the six remaining framework archive checksums - #2137
Merged
Merged
Conversation
rp2040_core, esp8266_framework, apollo3_core, stm32_core, arduino_mbed_core and silabs_core all built PackageBase with `checksum: None`, so their framework archive was downloaded and unpacked unverified. Each SHA-256 was computed from the exact URL the module builds, on 2026-11-21, and the archive was re-opened afterwards to confirm it still carries the content the installer expects (cores/*/Arduino.h; for SiliconLabs the empty extra/core-api the module declares). One test per module asserts the pin through both production constructors, so a constructor that loses the pin fails. Refs #2128 (stays open: bucket uploads, mirror-host additions and the other modules still passing None).
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
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.
What
Six
fbuild-librarymodules constructedPackageBasewithchecksum: None, sotheir framework archive was downloaded and unpacked unverified. This pins the
SHA-256 of each and adds a test per module that fails if a constructor loses it.
That is the remaining in-repo code work of #2128 ("audit: hard-coded vendor
download URLs that bypass the fbuild mirror bucket"), the same treatment #2130
gave the AVR registry entries.
library/rp2040_core.rsRP2040_CORE_SHA256earlephilhower/arduino-pico4.5.3rp2040-4.5.3.ziplibrary/esp8266_framework.rsESP8266_FRAMEWORK_SHA256esp8266/Arduino3.1.2esp8266-3.1.2.ziplibrary/apollo3_core.rsAPOLLO3_CORE_SHA256sparkfun/Arduino_Apollo3v2.2.1Arduino_Apollo3.tar.gzlibrary/stm32_core.rsSTM32_CORE_SHA256stm32duino/Arduino_Core_STM322.9.0archive/refs/tags/2.9.0.tar.gzlibrary/arduino_mbed_core.rsARDUINO_MBED_CORE_SHA256arduino/ArduinoCore-mbed4.5.0archive/refs/tags/4.5.0.tar.gzlibrary/silabs_core.rsSILABS_CORE_SHA256SiliconLabs/arduino2.2.0archive/refs/tags/2.2.0.tar.gzHow the digests were taken
Each URL is the one the code itself builds (not a hand-typed variant). All six
were downloaded from that exact URL on 2026-11-21 (
curl -sSL,rc=0), hashed,and then re-opened to confirm the archive still carries the content the
installer expects — a truncated or wrong-asset download would have failed that
check:
rp2040-4.5.3.zip96a19c55…f1f5ea51brp2040-4.5.3/cores/rp2040/Arduino.hesp8266-3.1.2.zipb3f47686…e335b182esp8266-3.1.2/cores/esp8266/Arduino.hArduino_Apollo3.tar.gz9906c1cf…231fb694Arduino_Apollo3/cores/arduino/mbed-bridge/Arduino.h2.9.0.tar.gz35d8657a…abb442e45Arduino_Core_STM32-2.9.0/cores/arduino/Arduino.h4.5.0.tar.gzc0fc6d51…bc8e1bcArduinoCore-mbed-4.5.0/cores/arduino/Arduino.h2.2.0.tar.gz79a80075…a6333a4279a9arduino-2.2.0/cores/silabs/Arduino.h,extra/core-api/empty asexpect_empty_submodulerequiresThe Silabs archive is the 480 MiB one the module header already documents; the
empty
extra/core-api/is exactly the shapeexpect_empty_submoduleasserts.Tests
Per module, in the existing
mod tests, through the two productionconstructors (
newand the scratch-rootwith_cache_root):(the six new ones:
library::{rp2040_core,esp8266_framework,apollo3_core,stm32_core,arduino_mbed_core,silabs_core}::tests::the_core_archive_is_checksum_pinned;fmt --checkrc 0;clippy -p fbuild-library --lib --all-targets -- -D warningsrc 0;ci/platform_boundary_research.py --checkrc 0,ci/enforce_platform_boundary.py --print-totalsrows=0; dylint_rows=0)Mutation check: reverting any one constructor's
Some(X_SHA256)toNonemakesthat module's
the_core_archive_is_checksum_pinnedfail (run forrp2040,soldr cargo test -p fbuild-library --lib rp2040-> FAILED naming the pin).Not in this PR
library/esp32_framework/mod.rscannot be pinned: its URL is dead.ESP32_FRAMEWORK_URL(
pioarduino/arduino-esp32release3.1.1/framework-arduinoespressif32-3.1.1.tar.gz)answers HTTP 404 today, so there is no bytes to hash. It is latent, not an
outage:
Esp32Framework::newis documented "legacy, for tests" and has noproduction caller — the ESP32 framework resolves through the platformio
registry. It needs a decision (delete the const or repoint it at the 4.x
asset), not a checksum.
The same
Nonepattern also survives inch32v_core.rs,cmsis_atmel.rs,sam_core.rs,teensy_core.rs,nrf52_core.rs:145,esp32_platform.rsandesptool.rs— one pass, one unit; listed on #2128 for the next one.Bucket uploads and
MIRRORED_VENDOR_HOSTSentries are unchanged: they stillneed maintainer approval (#2128), and pinning here is what makes a bucket copy
safe to serve later.
#2128 stays open (remaining cells: the bucket uploads, the mirror-host
additions, and the modules listed above).