Skip to content

chore: enforce 7-day supply-chain cooldown on dependencies#87

Open
pofallon wants to merge 1 commit into
mainfrom
chore/supply-chain-cooldown
Open

chore: enforce 7-day supply-chain cooldown on dependencies#87
pofallon wants to merge 1 commit into
mainfrom
chore/supply-chain-cooldown

Conversation

@pofallon

@pofallon pofallon commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Supply-chain cooldown (7-day minimum release age)

Part of an org-wide rollout hardening get2knowio repos against supply-chain attacks. A newly published dependency version must age 7 days before it can be installed/resolved or proposed by Dependabot — giving time for a malicious release to be detected and yanked. Security updates are never delayed (Dependabot cooldown applies to version updates only).

Config schema verified against current official docs (not training data).

Changes

  • npm (.npmrc) — created with min-release-age=7.
  • Dependabotcooldown: { default-days: 7 } on npm (excludes first-party @get2knowio/*) and github-actions.

Note: this package is @get2knowio/n8n-mcp; npm PM layer cannot exempt first-party (no exclusion key), but it has no self-dependency so this is moot.

Summary by CodeRabbit

  • Chores
    • Added a 7-day cooldown requirement for dependency updates, ensuring packages must be published at least 7 days before adoption across npm and GitHub Actions ecosystems.

Hold newly published dependency versions for 7 days before they can be
installed or proposed, so a malicious release has time to be detected and
yanked. Applied at the package-manager and/or Dependabot layer.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Two configuration files are updated to enforce a 7-day supply-chain cooldown. .github/dependabot.yml gains cooldown blocks for the npm ecosystem (excluding @get2knowio/*) and the github-actions ecosystem, each with a 7-day default. .npmrc adds min-release-age=7 to block installation of packages younger than 7 days.

Changes

7-day supply-chain cooldown policy

Layer / File(s) Summary
7-day cooldown for Dependabot and npm install
.github/dependabot.yml, .npmrc
Adds cooldown blocks with a 7-day default to the npm (excluding @get2knowio/*) and github-actions Dependabot entries, and sets min-release-age=7 in .npmrc to enforce the same age gate during installs.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐇 Seven days must pass and fade,
Before a package makes the grade.
No fresh-baked deps sneak in at night,
Dependabot waits—it's only right.
With .npmrc holding the gate,
The bunny ensures: new libs can wait! 🕰️

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: enforce 7-day supply-chain cooldown on dependencies' clearly and concisely summarizes the main change—implementing a 7-day cooldown policy for dependencies to harden supply-chain security.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/supply-chain-cooldown

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.npmrc:
- Line 4: The `min-release-age=7` setting in the .npmrc file prevents npm from
installing security patches published within the last 7 days, blocking critical
security updates during `npm install` and `npm update` commands. To fix this,
configure `min-release-age-exclude` in the .npmrc file to exempt
security-critical packages from the policy, allowing recently published security
patches to be installed immediately while maintaining the 7-day window for other
dependencies. Alternatively, lower the `min-release-age` value for packages with
known vulnerability exposure to reduce the delay in applying security fixes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3e517b17-386d-440a-8697-3703bee90db5

📥 Commits

Reviewing files that changed from the base of the PR and between 80150c9 and e89c467.

📒 Files selected for processing (2)
  • .github/dependabot.yml
  • .npmrc

Comment thread .npmrc
# Supply-chain cooldown: refuse versions published less than 7 days ago so a
# malicious release has time to be detected/yanked before install. npm has no
# per-package exclusion, so this applies to all deps.
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.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

For npm CLI, does min-release-age apply uniformly to all installs/resolutions (including security patch versions), and is there any built-in exception mechanism for security updates?

💡 Result:

In the npm CLI (as of June 2026), the min-release-age configuration applies to all package installations and resolutions performed by commands that involve dependency resolution, such as npm install and npm update [1][2][3]. It does not natively distinguish between standard package updates and security patches, meaning it will block recently published security fixes if they fall within the configured "cooldown" period, resulting in an ETARGET error [4]. There are two primary ways to manage exceptions for this policy: 1. Explicit Bypass via Command-line Flag: You can override the configuration for specific commands by setting the flag to zero. For example, running npm install <package-name> --min-release-age=0 will bypass the cooldown period for that specific operation [5][4]. This is commonly used in automated workflows (such as Dependabot) to ensure critical security patches are installed immediately [4]. 2. Built-in Exclusion Mechanism: Recently, npm introduced the min-release-age-exclude configuration option [6]. This allows users to define a list of packages (supporting exact names or glob patterns, such as @myorg/*) that are exempt from the min-release-age policy [7][6]. This provides a structured way to allow trusted packages or internal libraries to bypass the age restriction consistently without needing to manually override the flag for every command [7]. Note that min-release-age does not affect npm ci, as that command installs packages verbatim from the lockfile without performing new resolution [3]. Additionally, due to how npm handles configuration flattening, min-release-age may appear as null when checked via npm config get if it has been converted into a before date for internal use [8][9].

Citations:


min-release-age=7 blocks security patches during npm install/npm update even when Dependabot overrides it per-PR.

min-release-age applies globally to resolution-based commands and does not distinguish between security patches and standard updates. This means npm install and npm update will reject recently published security fixes within the 7-day window, resulting in an ETARGET error—delaying critical patches. (npm ci itself is unaffected as it uses the lockfile without resolution.)

While Dependabot can override with --min-release-age=0 per-PR, consider using the min-release-age-exclude configuration option to exempt security-critical packages from the policy, or lower the window for packages with known vulnerability exposure.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.npmrc at line 4, The `min-release-age=7` setting in the .npmrc file
prevents npm from installing security patches published within the last 7 days,
blocking critical security updates during `npm install` and `npm update`
commands. To fix this, configure `min-release-age-exclude` in the .npmrc file to
exempt security-critical packages from the policy, allowing recently published
security patches to be installed immediately while maintaining the 7-day window
for other dependencies. Alternatively, lower the `min-release-age` value for
packages with known vulnerability exposure to reduce the delay in applying
security fixes.

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.

1 participant