fix(supply-chain): restore simple dependency-path cycle semantics - #872
fix(supply-chain): restore simple dependency-path cycle semantics#872cursor[bot] wants to merge 10 commits into
Conversation
Bolt reapplied a shared (package_key, matched_count) cache on top of the already-restored simple-path walk. That cache lets one package key satisfy two owner-chain positions through a cycle. Restore path-local frozenset prevention, keep the cycle and distinct-key regressions in two test modules, drop the unauthorized pdfjs-dist Trivy ignore, and record the unsafe optimization as a rejected change. Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Superseded by canonical existing owner #867 after exact-head reconciliation. #867 now has exact head |
There was a problem hiding this comment.
Closed duplicate; tree is preserved on #867
Exact-head f4a60530064321ebd04ed0c86f2d9dda7d6caefa keeps the protected-develop simple-path walk:
cargo_lock_has_named_dependency_pathuses a path-localfrozensetof package keys- there is no shared
(package_key, matched_count)cache .trivyignorehas noCVE-2026-16633entry- cycle
root → alpha@1 → beta → alpha@1 → charliereturnsFalsefor("alpha", "alpha", "charlie") - distinct keys
alpha@1thenalpha@2still returnTrue
git diff f4a60530 dbcbe6d is empty. This PR was closed after #867 absorbed this head as a merge parent, so the two-module cycle regressions and the .jules/bolt.md rejected-cache note already live on #867.
Next action: do not reopen #872. Continue merge work on #867 at dbcbe6d9f27020cdb3070b4dbfb1f905522c26c4 after that head's required checks are terminal-success. Inherited pdfjs-dist / CVE-2026-16633 stays with canonical #783.
Sent by Cursor Automation: Fix Issues


Summary
Do not merge #867 at
a88b213. That head reapplied a shared(package_key, matched_count)cache, deleted the cycle regressions, and added an undocumentedCVE-2026-16633Trivy ignore.This branch keeps the protected-
developsimple-path walk and adds the contract that Bolt keeps deleting:root → alpha@1 → beta → alpha@1cannot reusealpha@1to satisfy a secondalphabeforecharliealpha@1thenalpha@2may still satisfy repeatedalphapositionsdocs/security/dependency-policy.mdmake the simple-path authority explicit (Cormen et al., 2022, Appendix B.4)test_supply_chain_dependency_path_cycles.pyandtest_supply_chain_policy.pyso deleting one file still fails CI.jules/bolt.mdrecords the shared-state cache as a rejected change.trivyignoreentry forCVE-2026-16633; that finding stays with canonical fix(security): establish canonical npm, PDF.js, Nanoid, and Undici baseline #783Verification
a88b213(Truevs requiredFalse)python3 -m pytest services/analysis-engine/tests/test_supply_chain_dependency_path_cycles.py services/analysis-engine/tests/test_supply_chain_policy.py -k 'named_dependency_path or dependency_path_does_not or dependency_path_can_match'— 4 passed./scripts/harness/quickcheck.sh(CI on this PR)Security Notes
Attack surface
Cargo owner-chain matching in
scripts/checks/verify_supply_chain.pyand Trivy exception policy in.trivyignore.Trust boundary
Supply-chain checks decide whether a lockfile owner chain is accepted. A false positive can mark a cyclic or reused package key as a valid named path. An undocumented Trivy ignore can hide a real
pdfjs-distfinding.Mitigations
frozensetof package keys; a key may appear at most once on a candidate walk(package_key, matched_count)cachefrozensetcopiesTest points
root → alpha@1 → beta → alpha@1 → charliemust returnFalsefor("alpha", "alpha", "charlie")alpha@1thenalpha@2must returnTruefor the same name tupletest_supply_chain_policy.pyencode those casesDependency and Supply Chain
i18n impact
Reviewer checklist
developReferences
Cormen, T. H., Leiserson, C. E., Rivest, R. L., & Stein, C. (2022). Introduction to algorithms (4th ed.). MIT Press.