Skip to content

Feature/bun within range fixture#562

Merged
sonukapoor merged 13 commits into
OWASP:mainfrom
coder-Yash886:feature/bun-within-range-fixture
Jun 7, 2026
Merged

Feature/bun within range fixture#562
sonukapoor merged 13 commits into
OWASP:mainfrom
coder-Yash886:feature/bun-within-range-fixture

Conversation

@coder-Yash886

Copy link
Copy Markdown
Contributor

(fixture #7 ) bun-within-range

Summary

Adds the bun-within-range crafted fixture for issue #540 — a minimal Bun lockfile where a transitive vulnerability (follow-redirects@1.14.0) can be fixed within the parent's declared range (axios@0.21.1 allows ^1.10.0), so the scanner emits bun update follow-redirects instead of a parent upgrade.

Also enhances the bun.lock parser to reconstruct transitive dependency paths from package relationships (required for within-range remediation on Bun lockfiles).

What was added

File Purpose
examples/bun-within-range/package.json Minimal manifest pinning axios@0.21.1
examples/bun-within-range/bun.lock Crafted lockfile with vulnerable follow-redirects@1.14.0 under axios
src/parsers/bun-lock.ts Build dependency paths from bun.lock package graph
src/parsers/index.ts Updated coverage note for Bun path derivation
tests/parsers.test.ts Test for project → axios → follow-redirects path reconstruction
examples/readme.md Document the new fixture

Scan output

npm install && npm run build
node dist/index.js examples/bun-within-range --verbose

@coder-Yash886

Copy link
Copy Markdown
Contributor Author

@sonukapoor Please Review the PR When you have free time

@sonukapoor sonukapoor left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on the branch — Bun path reconstruction is working correctly. bun update follow-redirects is generated for the within-range transitive fix and bun add axios@0.32.0 for the direct vulnerability. 416/416 tests pass. Nice work including the actual parser improvement alongside the fixture.

One minor note: the PR title should follow our naming convention — feat: add bun-within-range lockfile fixture. Not blocking.

@sonukapoor sonukapoor merged commit e6aefec into OWASP:main Jun 7, 2026
6 checks passed
@sonukapoor

Copy link
Copy Markdown
Collaborator

Merged — thank you @coder-Yash886!

@sonukapoor sonukapoor mentioned this pull request Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants