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

Compute SHA-256 in bundled_binary #471

Merged
merged 4 commits into from
Oct 17, 2024
Merged

Compute SHA-256 in bundled_binary #471

merged 4 commits into from
Oct 17, 2024

Conversation

ikretz
Copy link
Contributor

@ikretz ikretz commented Oct 16, 2024

This PR updates the bundled_binary metadata rule so that it includes SHA256 hashes of the binary files it finds.

The output format is updated so that files are organized by unique hash. Each file listed on the same line has the same hash. These listed files are all distinct, even if they have the same name.

Sample output:

$ guarddog npm scan sample-package --version 1.1.0 --rules bundled_binary
Found 1 potentially malicious indicators in sample-package

bundled_binary: Binary file/s detected in package:
843b9ff549ab7a1d4a7d60cd224321058029350a88ccb53855969f3a8649a342: conpty.dll (exe), conpty.dll (exe), c.dll (exe)
c081c868cc3c6dc5ca6c950772cd04644c326a18e9727fb188683f214d517409: OpenConsole.exe (exe)
0269664950a8bc65f9d30cb1d64213b3fc50507a3c56c174516d3ae243cbc3e0: conpty.dll (exe)
1ac1552204d73b82873d253e66303fa3acfdbac2a0650f23b57c3450682afe56: OpenConsole.exe (exe)

@ikretz ikretz merged commit 0aff7e7 into main Oct 17, 2024
10 checks passed
@ikretz ikretz deleted the ikretz/bundled_binary_sha branch October 17, 2024 11:32
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