10BC0 Add minimum-release-age config to filter newly released packages by crocodele · Pull Request #12692 · composer/composer · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@crocodele
Copy link

Introduces a configurable waiting period before new package versions can be installed, reducing the risk of exposure to supply chain attacks. Many vulnerable package versions are identified within hours/days of publication.

Configuration:

  • config.minimum-release-age.minimum-age: duration (e.g., "7 days")
  • config.minimum-release-age.exceptions: list of package patterns to bypass
  • COMPOSER_MINIMUM_RELEASE_AGE env var override

Key features:

  • Security fixes automatically bypass cooldown when released after a security advisory (within 2x cooldown window)
  • Dev versions, locked packages, and platform packages are never filtered
  • Packages without release dates are allowed through conservatively
  • Clear error messages show when packages are filtered and time remaining

Developed with assistance from Claude Code with Opus 4.5 as model.

Related to #12633.

Introduces a configurable waiting period before new package versions can
be installed, reducing the risk of exposure to supply chain attacks. Many
vulnerable package versions are identified within hours/days of
publication.

Configuration:
- config.minimum-release-age.minimum-age: duration (e.g., "7 days")
- config.minimum-release-age.exceptions: list of package patterns to bypass
- COMPOSER_MINIMUM_RELEASE_AGE env var override

Key features:
- Security fixes automatically bypass cooldown when released after a
  security advisory (within 2x cooldown window)
- Dev versions, locked packages, and platform packages are never filtered
- Packages without release dates are allowed through conservatively
- Clear error messages show when packages are filtered and time remaining
@Seldaek Seldaek added this to the 2.10 milestone Dec 29, 2025
'client-certificate' => [],
'forgejo-domains' => ['codeberg.org'],
'forgejo-token' => [],
'minimum-release-age' => ['minimum-age' => null, 'exceptions' => []],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be great to add support in ConfigCommand as well for setting the age and exceptions

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in 5e094e3. I added test cases only for happy paths.

@Seldaek
Copy link
Member
Seldaek commented Dec 29, 2025

Thanks a bunch, looks quite solid at first sight but I'll have to review more in depth for sure.

@crocodele crocodele requested a review from Seldaek December 29, 2025 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0