fix: reconstruct transitive dependency paths from yarn.lock (#421).#576
Conversation
|
@sonukapoor Please review the PR when you have free time . |
Will take a look this week. We have a Slack channel as mentioned in our readme: https://owasp.org/slack/invite |
sonukapoor
left a comment
There was a problem hiding this comment.
Tested on the branch — yarn upgrade js-cookie is now correctly generated for the yarn-within-range fixture. Full test suite passes (419 tests, 1 skipped). The flat path problem is fixed. This unblocks #537.
sonukapoor
left a comment
There was a problem hiding this comment.
Tested on the branch — yarn upgrade js-cookie is now correctly generated for the yarn-within-range fixture. Full test suite passes (419 tests, 1 skipped). The flat path problem is fixed. This unblocks #537.
|
Merged — thank you @coder-Yash886! |
Closes #421
Summary
yarn.lock(Classic + Berry) using a BFS graph walk, following the pnpm fix: preserve multiple pnpm dependency paths for repeated package versions #335 approachresolveTransitiveRemediationViaRegistryfor deep chains so within-range remediation works for yarn/pnpm/bun without an npm lock graphtest-utils.tsWhat this fixes
The Yarn parser previously emitted flat paths (
["project", "js-cookie"]) instead of the full chain (["project", "aws-amplify", "@aws-amplify/core", "js-cookie"]). Without correct paths, the within-range resolver could not suggestyarn upgrade js-cookie.Once this lands, PR #537 (
yarn-within-rangefixture) should produce the expected scan output.Test plan
npm test— all 419 tests passexamples/yarn-classic—follow-redirectsclassified as transitive →yarn upgrade follow-redirectsexamples/yarn-within-range(from feat: add yarn-within-range lockfile fixture (#5) #537) emitsyarn upgrade js-cookie