Add a validator to check that PHP-TUF's Composer integration is present and configured correctly

Created on 20 October 2022, over 1 year ago
Updated 9 May 2023, about 1 year ago

Problem/Motivation

After much discussion and deliberation with the security team and core committers, it has been decided that TUF protection will be required for the use of Package Manager in virtually all cases.

Right now, packages.drupal.org is still in the process of rolling out TUF support. We need to be ready for that, by having the code in place to ensure that Package Manager operations will be protected by TUF.

Proposed resolution

We should add a validator that checks the following on create, require, and apply, in both the active and stage directories:

  1. The PHP-TUF Composer plugin is installed.
  2. And enabled in Composer's allow-plugins config.
  3. And configured to protect the packages.drupal.org repository, which must be defined in composer.json.

If any of these things aren't true, the validator will flag an error.

For now, this validator should be added as a service, but NOT tagged as an event subscriber. That will be done in a follow-up, when we add a hard dependency on PHP-TUF: 📌 [PP-1] Require PHP-TUF's Composer integration plugin Postponed

📌 Task
Status

Fixed

Version

3.0

Component

Code

Created by

🇺🇸United States tedbow Ithaca, NY, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024