fix(ci): replace retired pnpm audit endpoint#103
Conversation
Greptile SummaryThis PR replaces
Confidence Score: 4/5Not safe to merge as-is — the replacement command is likely to fail or silently under-audit in this pnpm project due to the missing package-lock.json. Two P1 findings: (1) npm audit signatures in npm v10 requires a lockfile that does not exist in this repo, risking a new CI failure rather than a fix; (2) the developer's manual verification used pnpm audit signatures, which silently runs a standard audit and does not exercise the CI command. .github/workflows/test.yml — the only changed file, and both P1 issues originate here.
|
| Filename | Overview |
|---|---|
| .github/workflows/test.yml | Replaces pnpm audit --prod with npm audit signatures — a cross-tool switch that may fail at runtime because the repo has no package-lock.json and pnpm's virtual store layout may not be compatible with npm's arborist walker. Also changes the security gate from CVE detection to registry-signature verification. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[CI: Quality Job] --> B[pnpm install]
B --> C[Lint & Format]
C --> D[Type Check]
D --> E{Before PR 103}
D --> F{After PR 103}
E --> G[pnpm audit --prod CVE check via registry]
G --> H[HTTP 410 from retired npm endpoint]
F --> I[npm audit signatures registry signature check]
I --> J{package-lock.json present?}
J -- No --> K[May error: no lockfile found]
J -- Yes --> L[Verifies tarball signatures]
I --> M[pnpm virtual store: only top-level deps visible?]
Reviews (1): Last reviewed commit: "fix(ci): replace retired pnpm audit endp..." | Re-trigger Greptile
| - name: Security Audit | ||
| run: pnpm audit --prod | ||
| - name: Registry Signatures Audit | ||
| run: npm audit signatures |
There was a problem hiding this comment.
npm audit signatures likely fails without package-lock.json
This repo has only pnpm-lock.yaml — no package-lock.json. The npm v10 docs state: "By default npm requires a package-lock or shrinkwrap in order to run the audit." Running npm audit signatures (which uses the same underlying arborist machinery) without a lockfile may exit with an error rather than silently passing.
Beyond the lockfile, pnpm's virtual store places packages under node_modules/.pnpm/ behind symlinks. npm's arborist walker is designed for npm's flat node_modules layout; with pnpm's structure it may only see the top-level symlinks (direct dependencies) and silently skip the full transitive dependency tree in .pnpm/, giving an incomplete audit even if it does not error out.
A pnpm-native alternative that doesn't require a package-lock.json:
- name: Registry Signatures Audit
run: pnpm audit --audit-level=highOr, if signature-provenance verification (not CVE checking) is the goal, generate a throwaway lockfile first:
- name: Registry Signatures Audit
run: |
npm install --package-lock-only --ignore-scripts
npm audit signatures| - name: Security Audit | ||
| run: pnpm audit --prod | ||
| - name: Registry Signatures Audit | ||
| run: npm audit signatures |
There was a problem hiding this comment.
Verification step doesn't exercise the CI command
The PR description's verification line pnpm audit signatures does not test the same code path as npm audit signatures in CI. As documented in pnpm/pnpm#7909, the pnpm CLI silently ignores signatures and falls back to a standard pnpm audit (a vulnerability check, not a signature check). So the manual verification confirms nothing about whether npm audit signatures will succeed or produce meaningful output in this pnpm project.
| - name: Registry Signatures Audit | ||
| run: npm audit signatures |
There was a problem hiding this comment.
Security gate scope change: CVEs → registry signatures
pnpm audit --prod detected known CVEs in production dependencies. npm audit signatures verifies that package tarballs carry valid cryptographic signatures from the npm registry — a supply-chain integrity check, not a vulnerability check. The two are complementary but not interchangeable; after this change, CI will no longer catch packages with published CVEs.
If unblocking the HTTP 410 error is the immediate goal and CVE coverage should be preserved, you could run both:
| - name: Registry Signatures Audit | |
| run: npm audit signatures | |
| - name: Registry Signatures Audit | |
| run: | | |
| npm audit signatures | |
| pnpm audit --prod --audit-level=high || echo "::warning::pnpm audit failed (registry may be unavailable)" |
Summary
pm audit signatures
Verification
pm audit signatures
px -y npm@10.8.2 audit signatures