Skip to content

Commit 0b249f9

Browse files
author
Jörn Franke
committed
feat: securing npm package installation
1 parent cd1659e commit 0b249f9

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
* Backend: Update to [Spring Boot 4.0.2](https://spring.io/blog/2026/01/22/spring-boot-4-0-2-available-now), Hibernate 7.2.4.Final, Spring Modulith 2.0.2, BouncyCastle 1.83, OWASP HTML Sanitizer: 20260102.1, Gradle Plugin: CycloneDX 3.1.0, Spotless 8.2.1
1212
* Frontend: Add [linter based on eslint](https://angular.dev/cli/lint)
1313
* Frontend: Use [inject() instead of constructor injector](https://angular.dev/reference/migrations/inject-function)
14+
* Frontend: Build tool: Set for npm [allow-git](https://docs.npmjs.com/cli/v11/commands/npm-install#allow-git) to None and [min-release-age](min-release-age) to 2 days. Both settings aim at avoiding supply chain attacks
1415
* Frontend: Update to Angular 21.1.3
1516

1617
## [0.0.11] - 2025-11-21

backend/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ task installFrontEndDependencies(type:Exec) {
121121
workingDir "$webappDir"
122122
inputs.dir "$webappDir"
123123
group = BasePlugin.BUILD_GROUP
124-
commandLine "npm", "ci"
124+
commandLine "npm", "ci", "--allow-git=none", "--min-release-age=2"
125125
}
126126

127127
task buildAngular(type:Exec, dependsOn: installFrontEndDependencies) {

frontend/docs/BUILD.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ You need to have at least NodeJs 20 installed. We recommend to always use the la
99
You can install all the dependencies using the following command:
1010

1111
```
12-
npm install
12+
npm install --allow-git=none --min-release-age=2
1313
```
1414

1515
If you want to have an exactly reproducible build then you should use instead:
1616

1717
```
18-
npm ci
18+
npm ci --allow-git=none --min-release-age=2
19+
1920
```
2021

2122
# Run the frontend locally for development purposes

0 commit comments

Comments
 (0)