Skip to content

chore(deps): pin signing dependencies to exact versions - #842

Open
kome12 wants to merge 1 commit into
mainfrom
chore/pin-signing-deps
Open

kome12 wants to merge 1 commit into
mainfrom
chore/pin-signing-deps

Conversation

@kome12

@kome12 kome12 commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

A global npm install -g nansen-cli ignores package-lock.json, so the caret ranges on @noble/curves, @noble/hashes, @scure/base and @ethereumjs/rlp let a newly published release of a library that signs transactions and x402 payments reach users before anyone reviewed it.

  • Pin the four runtime dependencies to the versions already locked (no resolved version changes; @noble/curves 2.4.0 already pins its only dependency, @noble/hashes, exactly).
  • Add .npmrc with min-release-age=7: npm 11.14+ refuses to resolve versions younger than 7 days on install/update, which is how a maintainer bumps these pins. npm 10 ignores it.
  • The package test now fails if the packed package.json uses a version range for any runtime dependency.

Testing: npm test, npm run lint; the packed tarball lists exact versions; npm@11 ci works with the new .npmrc; reverting one pin to ^ makes the package test fail.

🤖 Generated with Claude Code

A global install ignores package-lock.json, so caret ranges let the next
release of @noble/curves, @noble/hashes, @scure/base or @ethereumjs/rlp
reach users before anyone has reviewed it. Pin them to the versions
already locked, and add a 7-day minimum release age for new versions
(.npmrc, enforced by npm 11.14+). The package test now fails if a
runtime dependency in the packed tarball uses a range.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread .npmrc
@@ -0,0 +1,3 @@
# Adopt a new dependency version only after it has been public for 7 days.
# npm 11.14+ enforces this on install/update; older npm ignores it.
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.

🟡 - Medium | Configure the release-age delay in minutes

npm interprets min-release-age as a number of minutes, not days. With this value, a newly published dependency can be installed after seven minutes, contrary to the comment and intended seven-day review window. Set it to 10080 to enforce seven days.

@nansen-pr-reviewer

Copy link
Copy Markdown

nansen-pr-reviewer summary

The change correctly pins the direct signing dependencies and adds a changeset, but the new npm release-age policy is configured with the wrong unit. npm interprets min-release-age as minutes, so this configuration delays adoption by only seven minutes rather than seven days.

Findings by Severity

Severity Count
🟡 Medium 1

Deterministic check: success — Found 1 finding(s) within acceptable thresholds

Risk: 3/5 (Elevated) — raised by: dependency/lockfile change

✅ Auto-approved — Deterministic gates passed: severity thresholds met, recommendation "approve_with_comments", risk level 3/5 within threshold 3.


Token usage: 69,373 input, 1,674 output, 2,296 cache read | Usage Guide

Cooldown: for the next 10 minutes (counting from when this review finished), new pushes to this PR will not trigger another review — the next push after the window expires will. Need a fresh review sooner? Comment @nansen-pr-reviewer[bot] re-review.

@nansen-pr-reviewer nansen-pr-reviewer 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.

✅ Auto-approved by Nansen review

Deterministic gates passed: severity thresholds met, recommendation "approve_with_comments", risk level 3/5 within threshold 3.

  • The deterministic severity check passed: Found 1 finding(s) within acceptable thresholds
  • Risk level 3/5 (Elevated)
  • The model recommended: approve_with_comments

Approval was decided by deterministic gates, not by the model. The model's recommendation can block auto-approval but never cause it.

@kome12 kome12 self-assigned this Nov 16, 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.

1 participant