Skip to content

website/docs: document npm install-script blocking#22461

Open
GirlBossRush wants to merge 3 commits into
mainfrom
docs/contributing-npm-script-blocking
Open

website/docs: document npm install-script blocking#22461
GirlBossRush wants to merge 3 commits into
mainfrom
docs/contributing-npm-script-blocking

Conversation

@GirlBossRush
Copy link
Copy Markdown
Contributor

Summary

Adds an :::info admonition to both contributor setup guides explaining:

  • the repo's .npmrc sets ignore-scripts=true and why (neutralizes the dominant npm supply-chain attack class — "Shai-Hulud" / "Mini Shai-Hulud" payloads run from preinstall)
  • how to recover when a package's install script is legitimately required: npm rebuild --foreground-scripts esbuild chromedriver tree-sitter tree-sitter-json
  • the explicit "do not flip ignore-scripts off" guidance

Files touched:

  • website/docs/developer-docs/setup/full-dev-environment.mdx — admonition right after make install
  • website/docs/developer-docs/setup/frontend-dev-environment.md — admonition right after make node-install

This is docs-only — no code or config changes. The motivation is that the rationale for .npmrc is currently only present as an inline comment in .npmrc itself; a contributor whose esbuild build silently fails has no obvious next step except to disable the protection, which is exactly what we want to discourage.

Test plan

  • Docs build (make docs / website preview) passes
  • Both :::info admonitions render correctly
  • The shell snippets are accurate against current web/package.json / root deps

The repo's `.npmrc` sets `ignore-scripts=true` to neutralize the
dominant npm supply-chain attack pattern (preinstall/postinstall
payloads, as used by the recent "Shai-Hulud" and "Mini Shai-Hulud"
incidents). The trade-off is that a handful of packages that ship
native binaries — esbuild, chromedriver, tree-sitter — need to be
rebuilt explicitly when their install step is required.

Today this is implicit; a new contributor whose build fails because
esbuild's binary didn't unpack has no obvious next step except to
disable the protection. Documenting it in both setup guides points
them at `npm rebuild --foreground-scripts <pkg>` and makes the
"don't flip `ignore-scripts` off" guidance explicit.

No code or config changes — docs only.

Co-authored-by: Agent <279763771+playpen-agent@users.noreply.github.com>
@GirlBossRush GirlBossRush requested a review from a team as a code owner May 19, 2026 11:32
@netlify
Copy link
Copy Markdown

netlify Bot commented May 19, 2026

Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit 2fce6f1
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/6a0d05874f0e3200080e67a6
😎 Deploy Preview https://deploy-preview-22461--authentik-integrations.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.29%. Comparing base (f992754) to head (2fce6f1).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #22461   +/-   ##
=======================================
  Coverage   93.28%   93.29%           
=======================================
  Files        1032     1032           
  Lines       60059    60059           
  Branches      400      400           
=======================================
+ Hits        56029    56030    +1     
+ Misses       4030     4029    -1     
Flag Coverage Δ
conformance 36.61% <ø> (+<0.01%) ⬆️
e2e 41.85% <ø> (-0.02%) ⬇️
integration 33.05% <ø> (+<0.01%) ⬆️
rust 0.00% <ø> (ø)
unit 81.11% <ø> (-11.09%) ⬇️
unit-migrate 92.25% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 19, 2026

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 2fce6f1
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a0d05873aad1f0007947a14
😎 Deploy Preview https://deploy-preview-22461--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

@tanberry tanberry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @GirlBossRush, this is very helpful. Especially the "do not turn off" explicitness.

@GirlBossRush GirlBossRush enabled auto-merge (squash) May 19, 2026 23:44
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.

2 participants