chore(security): restore checksumBehavior to throw in web and runtime - #10395
chore(security): restore checksumBehavior to throw in web and runtime#10395dev-hari-prasad wants to merge 1 commit into
Conversation
Revert checksumBehavior from update back to Yarn's default (throw) in web/.yarnrc.yml and runtime/.yarnrc.yml to restore tamper detection and ensure builds fail if downloaded package checksums do not match lockfiles.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. WalkthroughYarn checksum handling changes from silently updating mismatches to throwing errors in both the runtime and web configurations. ChangesYarn checksum enforcement
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to Runtime and web dependency installs now reject checksum mismatches rather than updating lockfile checksums. The configurations are aligned, with no current merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Part of #10363 (Item 4 from the tracking table).
This PR switches
checksumBehaviorfromupdateback to Yarn's default (throw) in bothweb/.yarnrc.ymlandruntime/.yarnrc.yml.Addressing Dave's Concerns
In #10363, Dave rightly cautioned:
To be completely certain this won't break CI, I investigated and tested both directories with
checksumBehavior: throwenabled:runtime/:yarn install --immutable→ Passed (Exit code 0)yarn install --check-cache --immutable→ Passed (Exit code 0)web/:yarn install --immutable→ Passed (Exit code 0)yarn install --check-cache --immutable→ Passed (Exit code 0)The
--check-cacherun forced Yarn to re-verify every single package archive against the remote npm registry. Zero mismatches were found, confirming that the historical 2023 mismatch is resolved and our lockfiles are 100% consistent today.Changes
checksumBehavior: updatetochecksumBehavior: throwinweb/.yarnrc.ymlchecksumBehavior: updatetochecksumBehavior: throwinruntime/.yarnrc.ymlBackground
Why was it originally set to
update?Back in July 2023 (commit
25e05de27),checksumBehavior: updatewas added to get around failing GitHub Actions test cases caused by a Yarn checksum error during the transition to Yarn Berry. While that unblocked CI at the time, leaving it set toupdatepermanently silenced Yarn's checksum mismatch detection across bothweb/andruntime/Summary by CodeRabbit