Giter Club home page Giter Club logo

bomber's People

Contributors

celliott80 avatar dependabot[bot] avatar djschleen avatar garethr avatar ilanad avatar mcombuechen avatar mirxcle avatar nhopkins19 avatar pablohn26 avatar thesayyn avatar topaztee avatar vasyharan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bomber's Issues

Add Snyk Shoutout

Snyk developed a provider and piping functionality. Need to call them out with some mad props.

Extract removeDuplicates to DKFM Common

The removeDuplicates function is handy and we can use it elsewhere in DKFM. Extract it from here, move it to DKFM Common (needs to be uppercased there), and wire bomber to use the new common version

bomber doesn't gracefully handle unauthorized requests to OSSIndex

When invalid credentials are passed to the ossindex provider, bomber doesn't error out gracefully, in fact, it says there are no vulnerabilities.

  • Inform the user that there were errors if a request fails
  • Don't keep hammering the remote endpoints if requests are failing

qt.qpa.xcb: could not connect to display

I tried to integrate bomber into a CI pipeline and got the following output when running it:

qt.qpa.xcb: could not connect to display 
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

I ran

bomber scan sbom.json --output=json

The same issue appeared when specifying the output to be HTML. Yet when previously testing the tool via an SSH connection manually I did not encounter any type of issue and the report was generated for all supported types of outputs. The machine I used for testing had the same hardware available.

Do you have any idea what's causing this issue?

Add License detail output

Add a section in the output of bomber that summarizes license information.

  • Add --license as a flag to include license information.
  • if no license info is found, indicate in the summary
  • Include details on the HTML report
  • Add a summary section to the JSON output
  • Summarize in the command line output

ubuntu install issue (hookz instead of bomber)

Hey, I followed the readme.md and downloaded the .deb. The .deb installs a binary with the name hookz instead of bomber. Is this a PEBKAC thing, is the install guide is missing a step, or is it a packaging oopsie?

Expected bomber

I want to follow the usage and issue commands for a bomber executable. No executables by that name though...

Actual hookz

The deb contains hookz

$ dpkg-deb -c bomber_0.1.1_linux_arm64.deb 
drwxr-xr-x root/root         0 2022-08-25 11:21 ./usr/
drwxr-xr-x root/root         0 2022-08-25 11:21 ./usr/bin/
-rwxr-xr-x root/root   6881280 2022-08-25 11:21 ./usr/bin/hookz

This binary acts like it is bomber.

$ /usr/bin/hookz --version
bomber version 0.1.1


$ /usr/bin/hookz 
Scans SBoMs for security vulnerabilities.

Usage:
  bomber [command]

Examples:
  bomber test.spdx

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  scan        Scans a provided SBoM file or folder containing SBoMs for vulnerabilities.

Flags:
      --debug     Displays debug level log messages.
  -h, --help      help for bomber
  -v, --verbose   Displays command line output. (default true)
      --version   version for bomber

Use "bomber [command] --help" for more information about a command.

$ /usr/bin/hookz scan 

 ██▄ ▄▀▄ █▄ ▄█ ██▄ ██▀ █▀▄
 █▄█ ▀▄▀ █ ▀ █ █▄█ █▄▄ █▀▄

DKFM - DevOps Kung Fu Mafia
https://github.com/devops-kung-fu/bomber
Version: 0.1.1

Both a username and token are required

Scans a provided SBoM file or folder containing SBoMs for vulnerabilities.

Usage:
  bomber scan [flags]

Flags:
  -h, --help              help for scan
      --token string      The API token of the provider being used.
      --username string   The user name of the provider being used.

Global Flags:
      --debug     Displays debug level log messages.
  -v, --verbose   Displays command line output. (default true)

I noticed the binary name of hookz on this file, in case it helps:

binary: hookz

Add EPSS scoring

An EPSS scoring alongside the NVD data would help contextualize the risk(s) presented in an SBOM.

Valid but minified CycloneDX SBOM failing to scan

Using the following SBOM https://gist.github.com/garethr/ab5e882cd23f8e7d4578466de71cf0a9#file-compressed-json

Which is a valid CycloneDX document

cyclonedx validate --input-file compressed.json
BOM validated successfully.

Using bomber build from source, from latest head (19aa8ec)

Bomber fails to scan.

./bomber scan --debug compressed.json
2022/09/29 05:20:09 Start

 ██▄ ▄▀▄ █▄ ▄█ ██▄ ██▀ █▀▄
 █▄█ ▀▄▀ █ ▀ █ █▄█ █▄▄ █▀▄

DKFM - DevOps Kung Fu Mafia
https://github.com/devops-kung-fu/bomber
Version: 0.3.2

2022/09/29 05:20:10 Reading: sbom.json
2022/09/29 05:20:10 WARNING: sbom.json isn't a valid SBOM
■ sbom.json is not an SBOM recognized by bomber

However, taking the same document and passing it through jq works fine.

Testing with https://gist.github.com/garethr/ab5e882cd23f8e7d4578466de71cf0a9#file-uncompressed-json

./bomber scan uncompressed.json

 ██▄ ▄▀▄ █▄ ▄█ ██▄ ██▀ █▀▄
 █▄█ ▀▄▀ █ ▀ █ █▄█ █▄▄ █▀▄

DKFM - DevOps Kung Fu Mafia
https://github.com/devops-kung-fu/bomber
Version: 0.3.2

■ Ecosystems detected: maven
■ Scanning 81 packages for vulnerabilities...
■ Vulnerability Provider: OSV Vulnerability Database (https://osv.dev)

/ Fetching vulnerability data from osv

Checking the two files using https://www.jsondiff.com/ says they are semantically the same.

Just paste the following URLs into each box:

I think tried the reverse. Taking the sbom/bomber.cyclonedx.json document from the source and minifying it with https://codebeautify.org/jsonminifier.

This results in https://gist.github.com/garethr/ab5e882cd23f8e7d4578466de71cf0a9#file-sbom_bomber-compressed-cyclonedx-json

I can confirm this then fails in Bomber.

bomber scan sbom/bomber.compressed.cyclonedx.json

 ██▄ ▄▀▄ █▄ ▄█ ██▄ ██▀ █▀▄
 █▄█ ▀▄▀ █ ▀ █ █▄█ █▄▄ █▀▄

DKFM - DevOps Kung Fu Mafia
https://github.com/devops-kung-fu/bomber
Version: 0.3.2

■ sbom/bomber.compressed.cyclonedx.json is not an SBOM recognized by bomber

Fetch data from VulnerableCode

@djschleen @juliojimenez This may be of interest to you guys: I have just launched https://public.vulnerablecode.io/

VulnerableCode is an open source vulnerability database (code at https://github.com/nexb/vulnerablecode ) that is keyed by package-url/purl like OSSindex (that has also adopted the purl spec that I created originally for ScanCode and VulnerableCode) . It is the only open source code and open data correlated and aggregated vulnerability database I know of. Some of its code is reused by Google OSV.

You can run a full instance of VulnerableCode independently or use the public service as you prefer. We provide seed data to speed up offline install and usage. And we started to publish a new mapping of legacy CPE to purl at https://github.com/nexB/vulnerablecode-purl2cpe

It has a new, experimental vulntotal total tool: aboutcode-org/vulnerablecode#801 ... like virustotal but for vulnerability databases comparison and it can compare the results of a purl query to VulnerableCode, OSSIndex, Snyk, Google, OSV, GitHub and GitLab at once and tells you which DB reports which vulnerability or not! which is pretty interesting.
Like a live benchmark.
So far, VulnerableCode is not doing too bad and holding its own against the proprietary databases! Because of the terms of services of each of these proprietary databases, the tool is not hostable centrally and you need to run the CLI locally. The input is a purl.

In addition, purldb is a new companion database of all the purls at https://github.com/nexB/purldb/ that can come handy for lookup and validation.

Both are extensively based on and use package-url/purl (I created and co-lead https://github.com/package-url/purl-spec and libraries FWIW).

So in a nutshell, these goodies may be of some interest for you to check out. And if you find them not too shabby, and you care to reuse some of them, ping me if I can help you out and I will.

Display detected ecosystems

Before sending any data to a vulnerability provider, bomber should output an info message showing all of the ecosystems that will be scanned.

Add a Progress Indicator when Querying

Large SBOMs produce a ton of PURLs. Some providers (ex: OSV) have batch endpoints that don't work. Snyk at this time can only return one response at a time. This results in scanning that may take a bit of time.

Put a fancy progress indicator in the CLI

Remove unused fields from SPDX structs

There are many parts of the SPDX spec that we don't use. Where possible remove the fields from the SPDX structs so that any changes to their structure will be easier to manage.

Remove unused fields from Syft structs

There are many parts of the Syft that we don't use. Where possible remove the fields from the Syft structs so that any changes to their structure will be easier to manage.

Not seeing any vulnerabilities (or errors) when scanning SBOMs with known vulnerabilities

I'm seeing some cases where bomber doesn't appear to be performing a vulnerability scan on the supplied SBOM, but it still reports "no vulnerabilities found" and exits 0. I'd recommend paying careful attention when reporting "no vulnerabilities found" to users, to avoid creating a false sense of security and eroding trust in the tool.

I installed bomber using the Homebrew instructions on the README. And here I'm using Syft version 0.54.0.

$ syft -q ubuntu:latest -o 'spdx-json=./ubuntu.spdx.json'
$ env | grep 'BOMBER'
BOMBER_PROVIDER_USERNAME=<redacted>
BOMBER_PROVIDER_TOKEN=<redacted>
$ bomber scan ./ubuntu.spdx.json

 ██▄ ▄▀▄ █▄ ▄█ ██▄ ██▀ █▀▄
 █▄█ ▀▄▀ █ ▀ █ █▄█ █▄▄ █▀▄

DKFM - DevOps Kung Fu Mafia
https://github.com/devops-kung-fu/bomber
Version: 0.0.1

Uses vulnerability information provided by the Sonatype OSS Index
https://ossindex.sonatype.org

■ Scanning 0 packages for vulnerabilities...

No vulnerabilities found!

■ Done
$ echo $?
0

In contrast, when I use Grype, it scans the SBOM for vulnerabilities correctly:

$ grype -q ./ubuntu.spdx.json
NAME          INSTALLED                 FIXED-IN          TYPE  VULNERABILITY   SEVERITY
coreutils     8.32-4.1ubuntu1                             deb   CVE-2016-2781   Low
libc-bin      2.35-0ubuntu3.1                             deb   CVE-2016-20013  Negligible
libc6         2.35-0ubuntu3.1                             deb   CVE-2016-20013  Negligible
libgmp10      2:6.2.1+dfsg-3ubuntu1                       deb   CVE-2021-43618  Low
libgnutls30   3.7.3-4ubuntu1            3.7.3-4ubuntu1.1  deb   CVE-2022-2509   Medium
libncurses6   6.3-2                                       deb   CVE-2022-29458  Negligible
libncursesw6  6.3-2                                       deb   CVE-2022-29458  Negligible
libpcre2-8-0  10.39-3build1                               deb   CVE-2022-1586   Low
libpcre2-8-0  10.39-3build1                               deb   CVE-2022-1587   Low
libpcre3      2:8.39-13ubuntu0.22.04.1                    deb   CVE-2017-11164  Negligible
libtinfo6     6.3-2                                       deb   CVE-2022-29458  Negligible
login         1:4.8.1-2ubuntu2                            deb   CVE-2013-4235   Low
ncurses-base  6.3-2                                       deb   CVE-2022-29458  Negligible
ncurses-bin   6.3-2                                       deb   CVE-2022-29458  Negligible
passwd        1:4.8.1-2ubuntu2                            deb   CVE-2013-4235   Low
perl-base     5.34.0-3ubuntu1                             deb   CVE-2020-16156  Medium
tar           1.34+dfsg-1build3                           deb   CVE-2019-9923   Low
zlib1g        1:1.2.11.dfsg-2ubuntu9                      deb   CVE-2022-37434  Medium

Output findings to JSON

Similar to #8, but add an output flag to bomber to save detailed output to a JSON file.

I'm interested in using this from CI/CD and would appreciate a JSON file for automated consumption. Thank you.

feat: Add support for scanning .sbt files

Would like to add the ability to scan build.sbt files for vulnerabilities.

Could we add a new command like "bomber convert", which would use something like syft to convert the file into CycloneDX format. And then we could run "bomber scan" on the newly created file and boom!

Add Files section to result output

The results struct should contain a map of filename and SHA256 hash of the files processed by bomber. This section should be added to both the STDOUT and HTML output types. (JSON output will already include it)

Display summary table with qualitative severity rating scale count

To leverage this in CI/CD, it would be helpful to have a summary table with a subtotal of each severity rating category. I would like to "break the build" if there are High or Critical findings and pass the build with warnings if there are Lows or Mediums (just an example). I would really benefit if this tool could provide the summary table for me.

Source: https://www.first.org/cvss/specification-document#Qualitative-Severity-Rating-Scale

Table 14: Qualitative severity rating scale

Rating CVSS Score
None 0.0
Low 0.1 - 3.9
Medium 4.0 - 6.9
High 7.0 - 8.9
Critical 9.0 - 10.0

Example

Instead of just saying "Vulnerabilities found: 13" below, maybe also include a breakdown underneath it

Rating Count
None 0
Low 2
Medium 3
High 7
Critical 1

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.