feat(resolver): trust staged publishes#810
Conversation
Greptile SummaryThis PR introduces npm staged-publish approval as a new top-tier trust evidence source (
Confidence Score: 5/5Safe to merge. The trust-policy logic is correct, the is_approver edge cases raised in earlier review rounds are all addressed, and the test suite covers the full boundary space. The recursive is_approver correctly rejects Bool(false), [null], [""], [{},{}] and all-null objects — the edge cases flagged in previous review threads are now exercised by evidence_empty_approver_is_none. The early-exit break condition is correctly moved from TrustedPublisher to StagedPublish (the new maximum rank), so no correctness gap exists there. The approver field flows cleanly from VersionMetadataRaw through VersionMetadata with no conversion logic that could introduce mismatches. All struct call sites are updated. No new issues found. No files require special attention. crates/aube-resolver/src/trust.rs carries the main logic change and is well covered by the new and existing tests. Important Files Changed
Reviews (5): Last reviewed commit: "docs(settings): regenerate trust policy ..." | Re-trigger Greptile |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fe39891. Configure here.
| || n.as_u64().is_some_and(|u| u != 0) | ||
| || n.as_f64().is_some_and(|f| f != 0.0) | ||
| } | ||
| } |
There was a problem hiding this comment.
Loose approver object validation
Medium Severity
is_approver treats any non-empty object with at least one non-null JSON value as top-tier staged-publish evidence, so shapes like an empty name string or nested empty objects can qualify even though sibling checks require a non-empty trusted-publisher id or a valid SLSA predicateType.
Reviewed by Cursor Bugbot for commit fe39891. Configure here.
fe39891 to
a28855f
Compare


Summary
Tests
This PR was generated by Codex.
Note
Medium Risk
Changes install-time trust enforcement and may block installs when newer versions lack
approverbut older releases had staged approval; behavior is covered by expanded trust tests and docs.Overview
Adds npm staged-publish support to trust policy: packument parsing now keeps an optional
approverfield on version metadata, andtrustPolicy=no-downgradetreats it as the strongest signal (staged publish > trusted publisher > provenance).The resolver’s
evidence_for/check_no_downgradelogic ranksStagedPublishfirst, validatesapproverwith tolerant shape checks (empty/null objects do not count), and stops scanning older versions early once staged publish is found. Primer-sourced metadata still setsapprover: None. Settings and security docs describe the new evidence order; tests cover parsing, ranking, downgrades, and malformed approver values.Reviewed by Cursor Bugbot for commit 844f7be. Bugbot is set up for automated code reviews on this repo. Configure here.