-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable
npm
lifecycle scripts by default (#1406)
Update the repository configuration to disable lifecycle scripts (such as installation scripts) by default. Adjust all current usage of such scripts to avoid relying on them and use alternatives instead. This is done as a security hardening measure, preventing supply chain attacks through installation scripts.
- Loading branch information
1 parent
d4c0438
commit 6e233d3
Showing
6 changed files
with
15 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -203,10 +203,7 @@ jobs: | |
run: npm clean-install | ||
- name: Simulate publish | ||
run: | | ||
# Dry run publish to trigger any hooks | ||
npm publish --dry-run | ||
# Pack to produce the archive that would be published | ||
npm run transpile | ||
npm pack | ||
- name: Compute checksum | ||
run: shasum -- *.tgz | tee checksums.txt | ||
|
@@ -216,7 +213,7 @@ jobs: | |
rm -- *.tgz | ||
- name: Simulate publish again | ||
run: | | ||
npm publish --dry-run | ||
npm run transpile | ||
npm pack | ||
- name: Verify checksum | ||
run: shasum --check checksums.txt --strict | ||
|
@@ -302,7 +299,7 @@ jobs: | |
- name: Install compatible npm version | ||
run: npm install --global [email protected] | ||
- name: Install dependencies | ||
run: npm clean-install --ignore-scripts | ||
run: npm clean-install | ||
- name: Run compatibility tests | ||
run: npm run coverage:compat | ||
- name: Upload coverage to Codecov | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
audit=false | ||
ignore-scripts=true | ||
lockfile-version=3 | ||
save-exact=true | ||
@gitlab-org:registry=https://gitlab.com/api/v4/packages/npm/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters