Skip to content

Add npm min-release-age security setting - #243

Merged
davidperezgar merged 1 commit into
trunkfrom
claude/npm-min-release-age-5086b5
Aug 6, 2026
Merged

Add npm min-release-age security setting#243
davidperezgar merged 1 commit into
trunkfrom
claude/npm-min-release-age-5086b5

Conversation

@davidperezgar

@davidperezgar davidperezgar commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds .npmrc with min-release-age=7, delaying installs of npm packages until 7 days after publish to reduce exposure to supply-chain attacks (e.g. compromised maintainer accounts pushing malicious versions that get caught/pulled quickly).
  • Excludes .npmrc from the distribution build via .distignore.

Test plan

  • Verified .distignore still lists existing entries correctly with .npmrc added under the "Develop" section.

Generated by Claude Code

Open WordPress Playground Preview

Delays installing newly published npm packages to reduce exposure to supply-chain compromises, and excludes .npmrc from the distribution build.
@davidperezgar
davidperezgar merged commit 1684091 into trunk Aug 6, 2026
1 check passed
@davidperezgar
davidperezgar deleted the claude/npm-min-release-age-5086b5 branch August 6, 2026 08:17

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d66d6311bf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .npmrc
@@ -0,0 +1 @@
min-release-age=7

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Express the seven-day gate in seconds

npm's min-release-age documentation defines this value in seconds, so 7 delays eligible releases by only seven seconds rather than the seven days stated in the commit. This leaves the intended supply-chain protection effectively absent; use 604800 for seven days.

Useful? React with 👍 / 👎.

Comment thread .npmrc
@@ -0,0 +1 @@
min-release-age=7

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Pin npm to a version that supports the gate

Checked .github/workflows/pr-playground-preview.yml: the install job selects Node 20 and immediately runs npm ci, while Node 20 ships npm 10 (for example, the Node 20.19.5 release includes npm 10.8.2), whose config reference does not support min-release-age. In that workflow the option is treated as unknown and ignored, so pin or install a supporting npm version before relying on this control.

Useful? React with 👍 / 👎.

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