Skip to content

False positive with new text-based bun.lock #3770

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

Open
notramo opened this issue Dec 12, 2024 · 2 comments
Open

False positive with new text-based bun.lock #3770

notramo opened this issue Dec 12, 2024 · 2 comments
Assignees
Labels

Comments

@notramo
Copy link

notramo commented Dec 12, 2024

A text-based lockfile (bun.lock) was recently added to Bun (to replace the previously used binary bun.lockb file). It can be created with bun install --save-text-lockfile. (Currently only the nightly builds have this feature.)

The plain-text file contains many checksums, and trufflehog mistakenly detects some checksums as access tokens.

This is a line from bun.lock that triggers a false positive:

    "@oxlint/linux-x64-gnu": ["@oxlint/linux-x64-gnu@0.15.0", "", { "os": "linux", "cpu": "x64" }, "sha512-e/KSj4fg5EFdK/bJLJjGRzaw2KZdYgr2mTt3k9HF9YIGl0UnBoX5h+q0hJ9scDTNNailT8qytvOjuiUhyJpAPA=="],

It says q0hJ9scDTNNailT8qytvOjuiUhyJpAPA (part of the checksum) is a Box access token.

@notramo notramo added the bug label Dec 12, 2024
@shahzadhaider1
Copy link
Contributor

Hey @notramo,

Thank you for taking the time to open this issue, we really appreciate your contribution to the project!
We’ll take a look and get back to you as soon as we can. If we need any clarification, we’ll follow up here.

Thanks again for helping make this project better!

@shahzadhaider1 shahzadhaider1 self-assigned this May 27, 2025
@shahzadhaider1
Copy link
Contributor

This is somewhat related to this issue.

For now, you can try ignoring this file as explained here, the --exclude-paths flag can be used to skip specific files or directories during scanning.

How to do that:

Create a file exclude.txt and add all the paths separated by newline that need to be excluded. and then add the following to your command:

--exclude-paths exclude.txt

This approach offers greater flexibility compared to permanently excluding a file or updating the detector, as there may be scenarios where scanning that file is desired. We’d appreciate your thoughts on this.

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

No branches or pull requests

2 participants