Skip to content

Commit 34b88c8

Browse files
committed
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. (cherry picked from commit d7998f2)
1 parent 3164bc2 commit 34b88c8

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"node": "^20.19.0 || ^22.12.0 || >=24.0.0",
3838
"npm": "Please use pnpm instead of NPM to install dependencies",
3939
"yarn": "Please use pnpm instead of Yarn to install dependencies",
40-
"pnpm": "^10.0.0"
40+
"pnpm": "10.16.1"
4141
},
4242
"author": "Angular Authors",
4343
"license": "MIT",

pnpm-workspace.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,40 @@ packages:
1616
- modules/testing/builder
1717
- tests
1818
- tools/baseline_browserslist
19+
# The minimum age of a release to be considered for dependency installation.
20+
# The value is in minutes (1440 minutes = 1 day).
21+
minimumReleaseAge: 1440
22+
# List of packages to exclude from the minimum release age check.
23+
# Wildcards are not yet supported: https://github.com/pnpm/pnpm/issues/9983
24+
minimumReleaseAgeExclude:
25+
- '@angular-devkit/architect'
26+
- '@angular-devkit/build-angular'
27+
- '@angular-devkit/build-webpack'
28+
- '@angular-devkit/core'
29+
- '@angular-devkit/schematics-cli'
30+
- '@angular-devkit/schematics'
31+
- '@angular-devkit/architect-cli'
32+
- '@angular-devkit/architect'
33+
- '@angular/animations'
34+
- '@angular/benchpress'
35+
- '@angular/cdk'
36+
- '@angular/ng-dev'
37+
- '@angular/cli'
38+
- '@angular/ssr'
39+
- '@angular/common'
40+
- '@angular/compiler-cli'
41+
- '@angular/compiler'
42+
- '@angular/core'
43+
- '@angular/forms'
44+
- '@angular/language-service'
45+
- '@angular/localize'
46+
- '@angular/material'
47+
- '@angular/material-moment-adapter'
48+
- '@angular/platform-browser-dynamic'
49+
- '@angular/platform-browser'
50+
- '@angular/platform-server'
51+
- '@angular/router'
52+
- '@angular/service-worker'
53+
- '@ngtools/webpack'
54+
- '@schematics/angular'
55+
- 'ng-packagr'

0 commit comments

Comments
 (0)