Skip to content

Commit 4132453

Browse files
alan-agius4devversion
authored andcommitted
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.
1 parent 6b511cf commit 4132453

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
13+
- uses: pnpm/action-setup@f2b2b233b538f500472c7274c7012f57857d8ce0
14+
with:
15+
with_install: false
1316
- uses: actions/setup-node@d7a11313b581b306c961b506cfc8971208bb03f6
1417
with:
1518
node-version: 24
16-
- uses: pnpm/action-setup@f2b2b233b538f500472c7274c7012f57857d8ce0
17-
with:
18-
version: 9
1919
- run: pnpm i --frozen-lockfile
2020
- run: pnpm check-format
2121
- run: pnpm release-build

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727
"license": "MIT",
2828
"description": "Web Codegen Scorer is a tool for evaluating the quality of web code generated by Large Language Models (LLMs).",
2929
"type": "module",
30+
"packageManager": "[email protected]",
31+
"engines": {
32+
"npm": "Please use pnpm instead of NPM to install dependencies",
33+
"yarn": "Please use pnpm instead of Yarn to install dependencies",
34+
"pnpm": "10.16.1"
35+
},
3036
"bugs": {
3137
"url": "https://github.com/angular/web-codegen-scorer/issues"
3238
},

pnpm-workspace.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
packages:
22
- .
33
- report-app
4+
5+
# The minimum age of a release to be considered for dependency installation.
6+
# The value is in minutes (1440 minutes = 1 day).
7+
minimumReleaseAge: 1440

0 commit comments

Comments
 (0)