Problem/Motivation

At #3557585-63: Update to Composer 2.9.2 @andypost pointed out:

Sadly we need new issue to upgrade to 2.9.3 as it's a security upgrade https://getcomposer.org/changelog/2.9.3

This is the issue to do that.

Steps to reproduce

Proposed resolution

11.x / 11.3.x

https://git.drupalcode.org/project/drupal/-/merge_requests/14236 - Merged

11.2.x

TBD (composer/composer currently pinned to 2.8.9)
https://git.drupalcode.org/project/drupal/-/merge_requests/14238 if we want to bump to 2.9.3.

10.6.x

https://git.drupalcode.org/project/drupal/-/merge_requests/14237 - Merged

10.5.x

TBD (composer/composer currently pinned to 2.8.9)
https://git.drupalcode.org/project/drupal/-/merge_requests/14254 if we want to bump to 2.9.3.

Remaining tasks

  1. Decide what to do with 11.2.x and 10.5.x
  2. Commit MR 14238 to 11.2.x?
  3. Commit MR 14237 to 10.6.x
  4. Commit MR 14254 to 10.5.x?

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

TBD, probably need something?

Issue fork drupal-3565943

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

dww created an issue. See original summary.

dww’s picture

Status: Active » Needs review

Opened https://git.drupalcode.org/project/drupal/-/merge_requests/14236 with the trivial results of composer update composer/composer. Let's see what the bot thinks...

andypost’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Security

Thank you!

dww’s picture

Thanks for the review!

I opened MR 14237 for the 10.6.x backport: https://git.drupalcode.org/project/drupal/-/merge_requests/14237

I opened a branch for the 11.2.x backport, but composer is pinned to 2.8.9 there. Not sure what's happening in that branch, and if we update dependencies like this or not. Tagging for RM review to confirm if/where we want this change backported.

dww’s picture

Issue summary: View changes

Updating summary with links to MRs for each branch.
Remaining tasks including deciding what to do with 11.2.x and 10.5.x.

  • catch committed 2f611e39 on 11.3.x
    task: #3565943 [security hardening] Update composer to 2.9.3
    
    By: dww
    (...

  • catch committed 01703699 on 11.x
    task: #3565943 [security hardening] Update composer to 2.9.3
    
    By: dww
    
catch’s picture

Committed/pushed to 11.x and cherry-picked to 11.3.x

The 11.2.x branch didn't have a merge request yet, so I just added that.
edit: after doing that, I realised I hadn't properly read the comment above... doh.

catch’s picture

Title: [security hardening] Update composer to 2.9.3 » [backport] [security hardening] Update composer to 2.9.3
Status: Reviewed & tested by the community » Active

Moving to active for the backport discussion then.

dww’s picture

Issue summary: View changes

Thanks! Closed 14236, and made a few more updates to the summary for remaining tasks.

dww’s picture

Minimum changes to get composer/composer to 2.9.3 on 11.2.x:

composer require --dev 'composer/composer:^2.9' 'justinrainbow/json-schema:^6.5' 'react/promise:^3.3'

Resulted in a few more changes than I really wanted. I manually removed the react/promise line from the resulting composer.json so that we still just have it in the require section from composer/composer instead of a new root dependency.

Pushed the results to the 3565943-update-composer-2_9_3-D11_2 branch -- see https://git.drupalcode.org/project/drupal/-/merge_requests/14238.

quietone’s picture

For 10.6.x, I updated composer locally and my changes are the same as in the 14237.diff, with only index value changes. So, the 10.6.x MR is correct.

dww’s picture

Status: Active » Needs review

The 11.2.x MR is basically working now. Moving to NR for release manager review / sign-off / direction.

Thanks!
-Derek

dww’s picture

Issue summary: View changes

So we have it if we want it, opened an MR for 10.5.x, too.

ghost of drupal past’s picture

This is a very interesting moment since composer having learned nothing from the plugin fiasco released 2.9 instead of 3.0, deliberately breaking backwards compatibility with 2.8. Should this be forced on D10? I do not know but there should be ample warnings if you do this somehow perhaps release notes? and AFAIK at least Pantheon and Amazee needs a heads up since their build processes might include running composer during build and this most excellent composer version does break on both according to bug reports on composer which are obviously immediately shut down.

dww’s picture

Re: #20: that might all be true. However, this is only the dev dependency in the core composer.lock, not whatever version of composer might be in the PATH or otherwise in use by humans at the CLI, CI, deployment pipelines, etc.

quietone’s picture

Status: Needs review » Reviewed & tested by the community

Setting to RTBC for the 10.6 MR only.

  • catch committed 86a33d41 on 10.6.x
    task: #3565943 [backport] [security hardening] Update composer to 2.9.3...

catch’s picture

Status: Reviewed & tested by the community » Needs review

Yes #21 is correct this won't affect composer install/update at all.

I've gone ahead and committed the 10.6.x MR here.

I think the only question with 11.2/10..5 is whether we should do a bonus patch release for them (or roll the change into a security release if we need to do one), but we can probably commit them to the branches without deciding that - will wait to hear from other RMs though.

dww’s picture

Issue summary: View changes

Cool, thanks. Updating summary to match current reality.

smustgrave’s picture

Title: [backport] [security hardening] Update composer to 2.9.3 » [backport 11.2/10.5] [security hardening] Update composer to 2.9.3
Status: Needs review » Patch (to be ported)

Correct status?

dww’s picture

Status: Patch (to be ported) » Needs review

I don't believe so. It's already been ported. Now the release managers need to review and decide what to do with the open MRs. Maybe RTBC is more appropriate?

smustgrave’s picture

That’s my mistake I got this confused with another ticket that was backported to all the above branches.

catch’s picture

Status: Needs review » Reviewed & tested by the community

Yeah RTBC is good here I think.

longwave’s picture

The only reason to do a patch release that I can see is because of drupal/core-dev-pinned.

drupal/core-dev depends on composer/composer ^2.8.1 so users can already upgrade their Composer to a secure version if they need to; I have a site running on 11.2 with core-dev and my Composer there is already at 2.9.3 thanks to dependabot.

drupal/core-dev-pinned on the other hand explicitly depends on 2.8.1 only.

Given the work has been done we can commit this anyway, and then we can defer the decision about a release. No harm if it never gets released, and we will be ready if we do decide (or are forced) to make a release.

  • catch committed 9bd86322 on 11.2.x
    task: #3565943 [backport 11.2/10.5] [security hardening] Update composer...

  • catch committed cfbd8d94 on 10.5.x
    task: #3565943 [backport 11.2/10.5] [security hardening] Update composer...
catch’s picture

Title: [backport 11.2/10.5] [security hardening] Update composer to 2.9.3 » [security hardening] Update composer to 2.9.3
Version: 11.x-dev » 10.5.x-dev
Status: Reviewed & tested by the community » Fixed
Issue tags: -Needs release manager review

Committed/pushed to 11.2.x and cherry-picked to 10.5.x, thanks! As @longwave says we can worry about how/if to release later.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.