Skip to content

fix(keeper): pin @percolatorct/shared to its npm release, not a raw git SHA - #370

Open
Morenikeoa wants to merge 1 commit into
dcccrypto:mainfrom
Morenikeoa:fix/shared-dependency-npm-pin
Open

fix(keeper): pin @percolatorct/shared to its npm release, not a raw git SHA#370
Morenikeoa wants to merge 1 commit into
dcccrypto:mainfrom
Morenikeoa:fix/shared-dependency-npm-pin

Conversation

@Morenikeoa

Copy link
Copy Markdown
Contributor

Problem

package.json pins @percolatorct/shared to a raw git commit SHA:

"@percolatorct/shared": "github:dcccrypto/percolator-shared#052edb592023de7c097f46edf8fba9a1cb20423f"

Resolved via a codeload.github.com tarball URL with no integrity hash in pnpm-lock.yaml. This is a second, distinct non-registry dependency from the already-fixed #326 (which covered @percolatorct/sdk's identical git-SHA-pin problem) — same weakness, different package.

Production Impact

A force-push or history rewrite at that commit ref (or a compromised GitHub tarball cache) silently changes what production installs, with no npm provenance and no hash to detect tampering on pnpm install — on a process that holds a hot signing wallet.

Fix

The pinned git SHA's own package.json reports "version": "1.0.0-beta.8", which is also published to npm under the beta dist-tag with a real sha512 integrity hash. Switched the dependency to that exact version — same code, now hash-verified on every install:

-"@percolatorct/shared": "github:dcccrypto/percolator-shared#052edb592023de7c097f46edf8fba9a1cb20423f",
+"@percolatorct/shared": "1.0.0-beta.8",

pnpm-lock.yaml now carries a sha512 integrity hash for this dependency instead of a bare git-tarball reference.

Proof of Fix

  • pnpm install — clean; lockfile entry confirmed to carry integrity: sha512-....
  • pnpm build — clean, zero errors.
  • Full test suite: 974 passed, 33 skipped, 1 pre-existing unrelated failure (tests/v17-risk-params.poc.test.ts — stale assertion from fix(keeper): accept maintenanceMarginBps==10000 (valid fast-path) — found in live devnet test #345, out of scope here). No regressions from the dependency swap, confirming the npm-published 1.0.0-beta.8 is behaviorally identical to the previously-pinned git SHA.

Test Output

 Test Files  1 failed | 93 passed | 2 skipped (96)
      Tests  1 failed | 974 passed | 33 skipped (1008)

…it SHA

package.json pinned @percolatorct/shared to a raw git commit SHA
(github:dcccrypto/percolator-shared#052edb5...) resolved via a
codeload.github.com tarball with NO integrity hash in pnpm-lock.yaml --
distinct from the already-fixed dcccrypto#326 (which covered the SDK's identical
git-SHA pin). A force-push or history rewrite at that ref silently changes
what production installs, with no npm provenance and no hash to detect
tampering on `pnpm install`, on a hot-wallet-adjacent process.

The pinned git SHA's own package.json reports version 1.0.0-beta.8, which is
also published to npm (the `beta` dist-tag) with a real sha512 integrity
hash. Switched the pin to that exact published version -- same code, now
hash-verified on every install.

Verified via `pnpm install` (lockfile now carries a sha512 integrity hash
for this dependency) + `pnpm build` (clean) + full test suite: 974 passed,
33 skipped, 1 pre-existing unrelated failure (tests/v17-risk-params.poc.test.ts,
stale assertion from dcccrypto#345, out of scope here) -- no regressions from the
dependency swap.

BUG-111 from a clean-room Phase 4 audit pass.
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Morenikeoa, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 43 minutes and 52 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ab06e88a-50c0-44a4-87b8-cf17d1e6502f

📥 Commits

Reviewing files that changed from the base of the PR and between 8ee810d and 4b5286f.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • package.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

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.

Security: SDK dependency pinned to unverified git SHA in production while CI tests npm release

1 participant