Skip to content

fix(library): pin the three remaining registry framework archives - #2158

Merged
zackees merged 1 commit into
mainfrom
agent/pin-registry-framework-archives
Nov 23, 2026
Merged

zackees merged 1 commit into
mainfrom
agent/pin-registry-framework-archives

Conversation

@zackees

@zackees zackees commented Nov 23, 2026

Copy link
Copy Markdown
Member

What

Three framework/header packages still constructed PackageBase with
checksum: None, so a truncated or substituted download was unpacked
unverified — the same integrity gap #2130 and #2137 closed for AVR, SAMD,
RP2040, ESP8266, Apollo3, STM32, mbed and SiLabs. This pins the remaining
three, all of them dl.registry.platformio.org artifacts:

module package version sha256
library/sam_core.rs framework-arduino-sam 1.6.12 c657856d…94b9
library/teensy_core.rs framework-arduinoteensy 1.160.0 b1c21d18…e34d
library/cmsis_atmel.rs framework-cmsis-atmel 1.2.2 de7778f0…a60c

Each module gains a *_SHA256 const with a provenance comment (byte size and
date), the const is passed from every constructor (new, with_override,
with_cache_root), and one test per module asserts the pin is wired through
both new and with_cache_root — a test that calls the constant directly
would prove the value, not the wiring.

Why these are safe to pin

Registry artifacts are immutable per version and the modules build their URL
from a const version, so the pin cannot drift without a version bump — and a
bump that forgets the digest now fails the test instead of silently unpacking
something new. PackageBase::install verifies self.checksum on the whole
archive before extraction (crates/fbuild-packages-fetch/src/lib.rs:551-560),
so the pin is enforced, not decorative.

Verification (real output)

  • Digests computed 2026-11-22 by downloading the exact URLs the modules build:
c657856d3aa8e8355c2feac26b8865b580725a914ac614a0b8c1d5fdd27494b9  framework-arduino-sam-1.6.12.tar.gz        (37,924,299 bytes)
b1c21d181257eee1ac34bdaf417ab79608dab1a22ff5d44370fee35d56ede34d  framework-arduinoteensy-1.160.0.tar.gz      (22,462,028 bytes)
de7778f049e2558e1c8dbb50478f47c5680d4b393bc49e702203ffdd7a6ca60c  framework-cmsis-atmel-1.2.2.tar.gz          (4,146,988 bytes)
  • https://api.registry.platformio.org/v3/packages/platformio/tool/{framework-arduino-sam,framework-arduinoteensy,framework-cmsis-atmel}
    resolves the same three download URLs for those versions, so the hashes
    describe the canonical artifacts.
  • soldr cargo test -p fbuild-library --lib — full suite result is in the
    first comment on this PR (posted from the run).
  • soldr cargo fmt clean on the three files.

Deliberately not touched

#2128 stays open (remaining cells: bucket uploads for the non-GitHub vendor
hosts, which need maintainer approval, and the pinned-GitHub-release-asset
prefix-allowlist decision, which reverses part of #1815).

sam-core 1.6.12, framework-arduinoteensy 1.160.0 and framework-cmsis-atmel
1.2.2 still unpacked an unverified download (checksum: None). Each now
carries a SHA-256 const taken 2026-11-22 from the exact
dl.registry.platformio.org URL the module builds, passed from every
constructor, with a test proving the pin reaches PackageBase::install.

Continues the #2128 checksum work (#2130/#2137).
@zackees

zackees commented Nov 23, 2026

Copy link
Copy Markdown
Member Author

Full fbuild-library lib suite on 20d43ddf (host load 8-36, soldr 5-way concurrency):

running 392 tests
test library::cmsis_atmel::tests::the_cmsis_atmel_archive_is_checksum_pinned ... ok
test library::sam_core::tests::the_sam_core_archive_is_checksum_pinned ... ok
test library::teensy_core::tests::the_framework_arduinoteensy_archive_is_checksum_pinned ... ok
test result: ok. 383 passed; 0 failed; 9 ignored; 0 measured; 0 filtered out; finished in 0.46s
exit=0

@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

Parsing warnings: 1

Validation error: Unrecognized key: "enabled" at "reviews.pre_merge_checks"
Configuration instructions

  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@zackees
zackees added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit c85ebb6 Nov 23, 2026
34 checks passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Nov 23, 2026
@zackees
zackees deleted the agent/pin-registry-framework-archives branch November 24, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant