From dbe281e2665b33607298e419fd03447858cbc83b Mon Sep 17 00:00:00 2001 From: Alan Agius <17563226+alan-agius4@users.noreply.github.com> Date: Wed, 17 Sep 2025 13:08:30 +0000 Subject: [PATCH] build: enable minimumReleaseAge to mitigate dependency chain attacks This change configures pnpm's `minimumReleaseAge` setting to 1 day (1440 minutes). This is a security measure to mitigate dependency chain attacks, where malicious actors publish a new version of a dependency with malicious code and then trick users into updating to it before it can be discovered and reported. By delaying the adoption of new releases, we reduce the window of opportunity for such attacks. The list of excluded packages contains trusted and frequently updated dependencies from the Angular team, which are considered safe to use without this delay. --- package.json | 4 ++-- pnpm-workspace.yaml | 40 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 18d9cdb73e..298fba546e 100644 --- a/package.json +++ b/package.json @@ -10,11 +10,11 @@ "Angular", "multi-root ready" ], - "packageManager": "pnpm@10.15.1", + "packageManager": "pnpm@10.16.1", "engines": { "npm": "Please use pnpm instead of NPM to install dependencies", "yarn": "Please use pnpm instead of Yarn to install dependencies", - "pnpm": "10.15.1", + "pnpm": "10.16.1", "vscode": "^1.74.3" }, "capabilities": { diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 64bb0912a0..461d41aae3 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -3,4 +3,42 @@ packages: - integration/pre_standalone_project - integration/workspace - integration/pre_apf_project - - integration/project \ No newline at end of file + - integration/project + +# The minimum age of a release to be considered for dependency installation. +# The value is in minutes (1440 minutes = 1 day). +minimumReleaseAge: 1440 +# List of packages to exclude from the minimum release age check. +# Wildcards are not yet supported: https://github.com/pnpm/pnpm/issues/9983 +minimumReleaseAgeExclude: + - '@angular-devkit/architect' + - '@angular-devkit/build-angular' + - '@angular-devkit/build-webpack' + - '@angular-devkit/core' + - '@angular-devkit/schematics-cli' + - '@angular-devkit/schematics' + - '@angular-devkit/architect-cli' + - '@angular-devkit/architect' + - '@angular/animations' + - '@angular/benchpress' + - '@angular/cdk' + - '@angular/ng-dev' + - '@angular/cli' + - '@angular/ssr' + - '@angular/common' + - '@angular/compiler-cli' + - '@angular/compiler' + - '@angular/core' + - '@angular/forms' + - '@angular/language-service' + - '@angular/localize' + - '@angular/material' + - '@angular/material-moment-adapter' + - '@angular/platform-browser-dynamic' + - '@angular/platform-browser' + - '@angular/platform-server' + - '@angular/router' + - '@angular/service-worker' + - '@ngtools/webpack' + - '@schematics/angular' + - 'ng-packagr'