Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REQUEST: Support bun.lock lockfile used by Bun #1405

Open
Fra9ment opened this issue Nov 18, 2024 · 4 comments · May be fixed by google/osv-scalibr#379
Open

REQUEST: Support bun.lock lockfile used by Bun #1405

Fra9ment opened this issue Nov 18, 2024 · 4 comments · May be fixed by google/osv-scalibr#379
Labels
enhancement New feature or request

Comments

@Fra9ment
Copy link

Fra9ment commented Nov 18, 2024

Bun( https://bun.sh/ ) is Node.js like JavaScript runtime.

And packages are hosted by npm.js.

This scanner may be able to support bun.lockb bun.lock files with minor modifications.

Note

The lock files are in binary format, so this issue might be tricky... (updated by #1405 (comment) )

User documentation on the lockfile can be found here: https://bun.sh/docs/install/lockfile

bun.lockb can also be generated from existing package-lock.json and package.json with this command.

bun pm migrate # docs here: https://bun.sh/docs/cli/pm#migrate

Or, if you have only package.json just exec

bun install
@G-Rath
Copy link
Collaborator

G-Rath commented Nov 18, 2024

I've previously looked into this and decided against it ("for now") due to the binary format - I now don't think it's worth doing because bun is moving away from the binary lockfile for exactly this kind of reason.

In the meantime you should be able to do scanning by generating a yarn.lock file

@cuixq cuixq added the enhancement New feature or request label Nov 18, 2024
@Fra9ment
Copy link
Author

Thank you.
Wow, the lockfile will be text format!

Now, I wait for the text one.
I respect and agree with your decision👍

@G-Rath G-Rath linked a pull request Jan 12, 2025 that will close this issue
@G-Rath
Copy link
Collaborator

G-Rath commented Jan 12, 2025

Bun has officially implemented their new text-based lockfile which will be the default in v1.2 - I have started on an extractor for this over at osv-scalibr

@Fra9ment Fra9ment changed the title REQUEST: Support bun.lockb lockfile used by Bun REQUEST: Support bun.lock lockfile used by Bun Jan 14, 2025
@Fra9ment
Copy link
Author

Thank you!
I updated issue title😉

bun.lockb → bun.lock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants