Repository navigation
fix(ci): reject malformed advisories and bound audit delays - #137960
Conversation
Reject malformed npm advisory responses before filtering. Submit each dependency graph once, cap ordinary CI requests at 30 seconds, and publish audit summaries. Add a daily strict production audit with documented ownership and recovery. Builds on the single-request simplification in #137865 and the incomplete-coverage policy in #137881. Co-authored-by: Vincent Koc <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: blocked before merge. Reviewed September 4, 2026, 2:06 AM ET / 06:06 UTC. ClawSweeper reviewWhat this changesThe PR validates npm advisory responses before filtering, limits ordinary CI audit outages to a 30-second budget, adds a strict scheduled audit, and documents the behavior. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 5 items remain Keep open: current main still chunks audit graphs and silently skips malformed entries, while this branch moves validation to the shared boundary. No introduced P0–P2 defect was found; the live successful full-graph npm response remains the only material pre-merge proof gap. Priority: P2 Review scores
Verification
How this fits togetherDependency-audit scripts convert lockfile dependency graphs into npm advisory requests for CI and release checks. The validated response determines whether ordinary CI warns about incomplete coverage, blocks on findings/errors, or lets the scheduled audit fail strictly. flowchart LR
A[Lockfile dependency graph] --> B[Production audit script]
B --> C[npm bulk advisory service]
C --> D[Validated advisory map]
D --> E[Severity filtering]
E --> F[Ordinary CI warning or block]
E --> G[Release vulnerability gate]
E --> H[Strict scheduled audit]
Decision needed
Why: The implementation and controlled Node CLI evidence cover malformed, error, timeout, and scheduling outcomes, but a live successful full-graph response could not be observed during the endpoint outage. Before merge
Agent review detailsSecurityNone. PR surfaceTests +118, Docs +29, Config +33, Other +57. Total +237 across 8 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the shared validation and deadline owner, then capture one successful full-size npm bulk response before merge; if the outage persists, explicitly accept the documented endpoint-proof limitation rather than weakening validation. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main silently drops malformed advisory entries at the filtering boundary, while the branch’s focused tests exercise those exact malformed shapes and total-budget outcomes. Is this the best way to solve the issue? Yes: placing validation in the shared bulk-advisory reader protects both ordinary CI and the release gate, instead of duplicating consumer-side guards; successful live full-graph endpoint evidence remains unobserved. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 28f2f0a823c9. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Review follow-through for 2958994:
No source change follows the review. The strict local/release/scheduled policy remains intact, and the ordinary PR gate only downgrades explicit service unavailability. |
|
Merged via squash.
|
|
Post-merge hosted verification is complete. Landed through the native maintainer flow as ec87f91 after the exact-head CI run passed. Its ordinary-CI audit observed the live npm outage, stopped after 30.09 seconds, and continued with the explicit incomplete-coverage warning. I manually dispatched the new Dependency Audit workflow on main at This verifies both live policies: ordinary PR CI remains usable during an advisory outage, while the separate strict audit visibly reports missing coverage. It does not establish a successful full-size npm response or vulnerability clearance; that endpoint-recovery proof remains outstanding. #137865 is closed as superseded with contributor credit preserved and its original branch untouched. |
…#137960) Reject malformed npm advisory responses before filtering. Submit each dependency graph once, cap ordinary CI requests at 30 seconds, and publish audit summaries. Add a daily strict production audit with documented ownership and recovery. Builds on the single-request simplification in openclaw#137865 and the incomplete-coverage policy in openclaw#137881. Co-authored-by: Vincent Koc <[email protected]>
Related: #137881. Supersedes the single-request proposal in #137865; thanks @vincentkoc for that simplification.
What Problem This Solves
Fixes an issue where dependency audits could report no findings after receiving malformed advisory data, while ordinary CI still spent minutes waiting for an unavailable npm advisory service. Incomplete coverage also needed a visible summary and a separately owned strict check.
Why This Change Was Made
The shared npm boundary now validates advisory maps, entries, identifiers, severities, and vulnerable-version fields before either the production or release audit consumes them. Each non-empty dependency graph is sent in one request, preserving separate release product/tooling graphs and removing both caller-side batching loops. Invalid severity levels cannot match inherited object keys.
Ordinary CI selects a 30-second total request budget, including retry backoff and response reading. It continues to downgrade only the unavailable exit code; findings, malformed data, and permanent errors remain blocking. Local and release callers retain their strict behavior and longer retry policy. Both CLI outcomes and early failures publish bounded, escaped GitHub job summaries with outcome, package count, elapsed time, and timestamp.
A separate daily/manual Dependency Audit workflow runs the strict production audit with read-only permissions and no dependency installation. It names @steipete as the triage owner. Documentation explains recovery and GitHub's notification ownership/settings; summary mentions are not treated as delivered alerts. This workflow is not added to the ordinary PR merge gate.
User Impact
Malformed registry responses can no longer masquerade as a successful audit. Ordinary CI has fewer registry requests and a bounded wait during outages. Maintainers can see exactly when coverage was incomplete and use the strict scheduled audit to track failures and verify recovery.
Evidence
Successful full-size npm response proof remains unavailable during the observed endpoint outage. The complete-graph shape follows the directly inspected npm implementation and pnpm implementation. Controlled HTTP proof verifies the actual full-graph submission and all policy outcomes; no live success is claimed. The new manual workflow can only be dispatched after it exists on the default branch; its first hosted run will be verified immediately after landing.
This maintainer-owned replacement preserves Vincent Koc's contribution credit and leaves his original branch untouched. No release candidate, package, dependency pin, product configuration, or persistent storage changes.
Production/tooling/workflow delta: +208/-118 (net +90), including the new 33-line scheduled workflow. Growth implements the explicitly requested validation contract, total deadline, and visible coverage reporting while deleting batching and silent-discard paths. Tests/test support: +154/-36 (net +118). Documentation: +30/-1 (net +29).