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

SEND SOME Hash hash hash to IQ #208

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

SEND SOME Hash hash hash to IQ #208

wants to merge 3 commits into from

Conversation

DarthHater
Copy link
Member

Welp, why not send in a list of hashes, if people want to do that!

This allows someone to scan for situations where someone may have copied a downloaded file of jquery, etc... into their project, and bypassed using npm or yarn to manage it as a dependency (it happens!)

This pull request makes the following changes:

  • Adds Hasher, Lister and Merger classes, that hash files, list that they exist, and merges these files with an SBOM that is based on your declared dependencies
  • Adds tests (thanks @allenhsieh !)
  • Implements with a -g <path> or --deep <path> command line option

A test for this would be to create a garbage or etc... folder and pop a known vulnerable version of jquery or library of your choice into it. I used this file: https://code.jquery.com/jquery-1.12.4.min.js

Scan like so npm run start iq -- --application <your-application> --deep garbage

If all goes swimmingly, you should see this version of jQuery in your IQ report

I'd like to soft release this (not update docs), so people can play with it before we full bore announce it (I'd love to see how it helps overall)

This was based on #142, which was based off alpha, so I patched it over to new trunk.

It relates to the following issue #s:

cc @bhamail / @DarthHater / @allenhsieh / @ken-duck / @ButterB0wl

@DarthHater DarthHater added this to the 4.1.0 milestone Sep 30, 2020
Base automatically changed from master to main February 3, 2021 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant