Skip to content

chore(npm): allow scripts of known NPM dependencies - #8922

Merged
max-nextcloud merged 1 commit into
mainfrom
chore/npm12
Jul 28, 2026
Merged

max-nextcloud merged 1 commit into
mainfrom
chore/npm12

Conversation

@mejo-

@mejo- mejo- commented Jul 28, 2026

Copy link
Copy Markdown
Member

Starting with NPM v12, scripts defined by dependencies need to be allowed explicitely to protect against supply-chain attacks.

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits

Starting with NPM v12, scripts defined by dependencies need to be allowed
explicitely to protect against supply-chain attacks.

Signed-off-by: Jonas <jonas@freesources.org>
@mejo- mejo- self-assigned this Jul 28, 2026
@github-project-automation github-project-automation Bot moved this to 🧭 Planning evaluation (don't pick) in 📝 Productivity team Jul 28, 2026
@mejo- mejo- moved this from 🧭 Planning evaluation (don't pick) to 👀 In review in 📝 Productivity team Jul 28, 2026
Comment thread package.json
Comment on lines +153 to +161
"allowScripts": {
"@parcel/watcher": true,
"core-js": true,
"cypress": true,
"esbuild": true,
"protobufjs": true,
"ssh2": true,
"cpu-features": true
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think I only use cypress and esbuild. Do we actually need the others?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The others are indirect dependencies and we have them since a long time. Until now (with NPM < v12), their scripts get executed all the time you run npm i or npm ci. If we don't add them, npm will mourn and show a warning each time. I think it's acceptable to add them.

@mejo-
mejo- requested a review from max-nextcloud July 28, 2026 12:14
@max-nextcloud
max-nextcloud merged commit 6b8262a into main Jul 28, 2026
62 of 65 checks passed
@max-nextcloud
max-nextcloud deleted the chore/npm12 branch July 28, 2026 12:46
@github-project-automation github-project-automation Bot moved this from 👀 In review to ☑️ Done in 📝 Productivity team Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants