Giter Club home page Giter Club logo

mavendependencycve-scanner's Introduction

Simple Maven Dependency vulnerability scanner

Current Release Java CI with Maven Build release Release CodeQL License

Inspired by logpresso Scanner where I was able to contribute some parts :-)

And I have to do some automatic builds and releases with GitHub Actions...

Build

Simple checkout and build via mvn package. GraalVM native-images can be created with mvn package -Pnative. An installed GraalVM with native-image must be installed.

Autoversioning

This project uses the Maven Git Versioning Extension to automaticly set the version numbers. For a flawless experience you need to disable this extension during project import in IntelliJ. Disable it by adding -Dversioning.disable=true to Maven Importer VM options.

Execute

In the release section you can find the JAR for all JRE 8+ environments. Also you can download a native binary for linux, macOS or windows.

To execute the scanner simple call java -jar CVE_MavenScanner-<version>.jar -cve <CVE-Number> scanPath where 'scanPath' is the directory you want to scan. All ZIPs, JARs, WARs and EARs in the directory are scanned (also Fat-JARs are supported). Also all directories are scanned recursive. Native binaries can be executed without installed Java - please pick the correct for you system. All Available CVEs will be listed when called without parameters

Attention: After downloading the macOS binary you may need to remove the quarantine attribute. Do this via xattr -d com.apple.quarantine CVE_MavenScanner-mac-amd64.

You get a return code 0 when everything is fine, > 1 if there are findings.

Sample Output

Scan for CVE-2022-42889
Findings: 4
[-] โœ… org.apache.commons:commons-text:1.10.0 in Log4j-Scanner/src/test/resources/commons-text/commons-text-1.10.0.jar
[*] ๐Ÿ”ฅ org.apache.commons:commons-text:1.9 in Log4j-Scanner/src/test/resources/commons-text/commons-text-1.9.jar
[*] ๐Ÿ”ฅ org.apache.commons:commons-text:1.8 in Log4j-Scanner/src/test/resources/commons-text/commons-text-1.8.jar
[?] โ“ null in Log4j-Scanner/src/test/resources/commons-text/commons-text_potentially.jar

Process finished with exit code 3

mavendependencycve-scanner's People

Contributors

afrouper avatar chkemper avatar dependabot[bot] avatar

Stargazers

 avatar

Watchers

 avatar  avatar

mavendependencycve-scanner's Issues

Refactor build workflow and release

I'm the author of JReleaser, a tool that helps automating releases. The tool is ideal for applications that produce native executables such as yours. JReleaser may be invoked as a Gradle plugin, Maven plugin, Docker image, or as a CLI.

An example of its usage can be found at https://github.com/kcctl/kcctl

I can help setting it up should you be interested in exploring the tool.

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.