aws AWS Security Blog ·

Amazon Linux 2023 adds dependency cooldown for npm and pip

bloginfraawsengineer
feature

Amazon Linux 2023 now supports a dependency cooldown period for npm and pip package managers. This feature helps mitigate supply chain risks by delaying the installation of newly published packages, providing time for security analysis and potential removal of malicious code. The cooldown can be configured globally and overridden for urgent security updates, affecting Node.js 24 and Python 3.14 environments on Amazon Linux 2023.

  • Configuring a dependency cooldown for npm
  • Configuring a dependency cooldown for pip
  • Mitigating supply chain risks with dependency cooldown
  • Overriding cooldown for urgent security updates
  • Using audit tools to identify packages for urgent updates
Features (2)
  • Configuring a dependency cooldown for npm

    Users can set a minimum release age for npm packages by creating a global configuration file and using the command `npm-24 config set min-release-age 1 --location=global`. This setting ensures that new package versions are not installed until they have been available for at least 24 hours.

  • Configuring a dependency cooldown for pip

    For pip packages, a global configuration setting `global.uploaded-prior-to` can be used to implement the cooldown. The command `python3.14 -m pip config set --global global.uploaded-prior-to P1D` sets the cooldown period to one day. Older pip versions will silently ignore this setting.

Enhancements (2)
  • Overriding cooldown for urgent security updates

    While the cooldown enhances security, users can override it to install the latest versions of packages, particularly for critical security fixes. This is achieved by using command-line flags such as `--min-release-age=0` for npm and `--uploaded-prior-to='P0D'` for pip when installing specific packages.

  • Using audit tools to identify packages for urgent updates

    The post recommends using audit tools like `npm auditor` and `pip-audit` to identify packages with known security vulnerabilities. These tools can help pinpoint packages that require immediate updates, allowing users to selectively override the cooldown for these specific packages without disabling it entirely.

Notes (2)
  • Mitigating supply chain risks with dependency cooldown

    Newly published npm and pip packages pose the highest supply chain risk within the first 24 hours of their release, as security scanners may not have analyzed them yet. This feature introduces a 'dependency cooldown' that instructs package managers to skip versions published in the last 24 hours, allowing the security community time to detect and remove potentially malicious packages.

  • Prerequisites and availability

    This feature is available on Amazon Linux 2023 and requires Node.js 24 with npm 11.10.0+ or Python 3.14 with pip 26.1+. The necessary package versions are included in Amazon Linux 2023 releases starting from 2023.11.20260608. Pip-audit needs to be installed separately using `python3.14 -m pip install pip-audit`.

Read the original announcement →

https://aws.amazon.com/blogs/security/secure-your-npm-and-pip-package-updates-in-amazon-linux/

Related releases