Skip to content

Ban pre|post-install NPM scripts#453

Merged
tombye merged 1 commit into
mainfrom
add-ban-on-pre-post-install-scripts
Mar 27, 2026
Merged

Ban pre|post-install NPM scripts#453
tombye merged 1 commit into
mainfrom
add-ban-on-pre-post-install-scripts

Conversation

@tombye
Copy link
Copy Markdown
Contributor

@tombye tombye commented Mar 27, 2026

What’s changed

These changes block any NPM packages running pre-install or post-install scripts.

Identifying a user need

Pre|post-install scripts are a common attack vector and blocking them like this is now the default practice across many teams at GDS.

Longer explanation from One Login docs:

https://team-manual.account.gov.uk/development-standards-processes/coding-practices-and-processes/configure-node-package-managers/#ignore-scripts

This should also give reviewers of other pull requests that involve the installation of NPM packages more confidence that doing so would not pull in malicious packages.

TLDR: they're a common attack vector and blocking
them is now the default practice across many teams
at GDS.

Longer explanation from One Login docs:

https://team-manual.account.gov.uk/development-standards-processes/coding-practices-and-processes/configure-node-package-managers/#ignore-scripts
@tombye tombye merged commit 29929bb into main Mar 27, 2026
3 checks passed
@tombye tombye deleted the add-ban-on-pre-post-install-scripts branch March 27, 2026 14:37
This was referenced Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants