Repository navigation
[#3311] Added a 7-day Composer 'cooldown' policy with Drupal core exempt. - #3343
Conversation
…wn' path for urgent security releases.
…direct dependencies back.
|
Warning Review limit reached
This review includes 4 billable files and costs up to $1.00.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 42 minutes for your next included review. View limit details
|
|
📖 Documentation preview for this pull request has been deployed to Netlify: https://6afb8806d3814a02bc5bf181--vortex-docs.netlify.app This preview is rebuilt on every commit and is not the production documentation site. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
|
Code coverage (threshold: 90%) Per-class coverage |
This comment has been minimized.
This comment has been minimized.
1 similar comment
|
Code coverage (threshold: 90%) Per-class coverage |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3343 +/- ##
=======================================
Coverage 92.66% 92.66%
=======================================
Files 115 115
Lines 5110 5110
Branches 49 49
=======================================
Hits 4735 4735
Misses 375 375 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Closes #3311
Summary
The template
composer.jsonnow setsconfig.policy.cooldownwith aperiodof7 days, socomposer updateandcomposer requireskip any tagged release published in the last week.drupal/coreanddrupal/core-*are listed underignore, so a Drupal core security release resolves on the day it ships.Until now, a manual
composer updateorcomposer requirewould pull a release that was minutes old, and so would the transitive updates in a Renovate PR, because Renovate's 14-dayminimumReleaseAgeonly ages the direct dependencies it bumps. That's exactly the window in which compromised releases tend to get caught and pulled. Composer 2.11 added the cooldown, and it readspublished-timefrom both Packagist andpackages.drupal.org, so it covers contrib modules too.Routine Renovate PRs aren't affected, because their 14-day delay is longer than the cooldown. 2 paths can now hit it, and the docs cover both with
--no-cooldown. The first is a core release whosedrupal/core-recommendedpins a dependency younger than 7 days, such as a fresh Symfony patch. The second is a Renovate security PR for a fix released in the last 7 days.composer installfrom a lock file doesn't change.Before / After
Changes
Template config
composer.json: addedconfig.policy.cooldownwithperiod: "7 days"andignoreentries fordrupal/coreanddrupal/core-*. Thedrupal/core-*pattern was picked overdrupal/core*, so contrib projects whose names start withcore_still get the cooldown.Documentation
development/composer.mdx: a new "Release cooldown" section under "Update dependencies". It covers what the cooldown holds back, which versions it leaves alone (branch versions such asdev-main, installs from a lock), the core exemption and itsdrupal/core-recommendedpin caveat, and the--no-cooldowncommand. It also notes that a full update inside the window can move an indirect dependency back to an older release, and how to change or turn off theperiod. Thepolicybullet in theconfigreference links to it.development/dependency-updates.mdx: the "Drupal core" and "Security fixes" sections explain when Renovate'scomposer.lockupdate hits the cooldown and how to finish the PR locally with--with-dependencies --no-cooldown.development/security/dependency-audit.mdx: the Composer version note says thecooldownsection needs Composer 2.11.Fixtures
handler_processsnapshots were regenerated for the baseline and the 3 scenarios that rewritecomposer.json(hosting_acquia,hosting_project_name___acquia,starter_drupal_cms_profile).How it was checked
A scratch project with this policy,
drupal/core-recommended,drupal/coffeeandsymfony/consoleresolved cleanly against Packagist andpackages.drupal.orgwith Composer 2.11, and 3 versions were withheld. WithCOMPOSER_POLICY_COOLDOWN_PERIOD="30 days", core resolved to 11.4.11 (27 days old), which confirms theignoreentries apply. It didn't reach 11.4.12, because that release pins Symfony versions that were still inside the window. Thedrupal/core-recommendedcaveat in the docs comes from that run.