back to listing index

jeremylong/DependencyCheck

[web search]
Original source (github.com)
Tags: tooling vulnerabilities cve gradle owasp
Clipped on: 2019-10-03

Skip to content
OWASP dependency-check is a software composition analysis utility that detects publicly disclosed vulnerabilities in application dependencies. https://www.owasp.org/index.php/OWASP…
Java JavaScript CMake M4 Ruby Groovy Other
Branch: master
New pull request
Clone or download
Image (Asset 3/14) alt= .github update lock bot config 5 months ago ant version 5.2.2 12 days ago archetype version 5.2.2 12 days ago cli version 5.2.2 12 days ago core version 5.2.2 12 days ago maven version 5.2.2 12 days ago src updated per #2127 2 months ago utils version 5.2.2 12 days ago .gitattributes tuned linguist language stats 3 years ago .gitignore Add support for Rubys rbenv (#2061) 3 months ago .travis.settings.xml updated settings 2 years ago .travis.yml use trusty 2 months ago LICENSE.txt updated license to Apache 2.0 6 years ago NOTICE.txt releasing updates from private repo 6 years ago README.md Fix README instruction on how to build using mvn (#2188) 23 days ago RELEASE_NOTES.md release 5.2.2 11 days ago SECURITY.md updated supported versions 2 months ago coverity_scan.sh made coverity scan executable 2 years ago pom.xml Bump gmavenplus-plugin from 1.7.1 to 1.8.0 (#2207) 10 days ago publish_docker.sh update how docker image is built 3 months ago settings.xml updated to use dotnet core and improve dot analysis 7 months ago

README.md

Image (Asset 4/14) alt=Dependency-Check

Dependency-Check is a Software Composition Analysis (SCA) tool that attempts to detect publicly disclosed vulnerabilities contained within a project's dependencies. It does this by determining if there is a Common Platform Enumeration (CPE) identifier for a given dependency. If found, it will generate a report linking to the associated CVE entries.

Documentation and links to production binary releases can be found on the github pages. Additionally, more information about the architecture and ways to extend dependency-check can be found on the wiki.

Current Releases

Jenkins Plugin

For instructions on the use of the Jenkins plugin please see the OWASP Dependency-Check Plugin page.

Command Line

More detailed instructions can be found on the dependency-check github pages. The latest CLI can be downloaded from bintray's dependency-check page.

On *nix

$ ./bin/dependency-check.sh -h
$ ./bin/dependency-check.sh --project Testing --out . --scan [path to jar files to be scanned]

On Windows

> .\bin\dependency-check.bat -h
> .\bin\dependency-check.bat --project Testing --out . --scan [path to jar files to be scanned]

On Mac with Homebrew

$ brew update && brew install dependency-check
$ dependency-check -h
$ dependency-check --project Testing --out . --scan [path to jar files to be scanned]

Maven Plugin

More detailed instructions can be found on the dependency-check-maven github pages. By default, the plugin is tied to the verify phase (i.e. mvn verify). Alternatively, one can directly invoke the plugin via mvn org.owasp:dependency-check-maven:check.

The dependency-check plugin can be configured using the following:

<project>
    <build>
        <plugins>
            ...
            <plugin>
              <groupId>org.owasp</groupId>
              <artifactId>dependency-check-maven</artifactId>
              <executions>
                  <execution>
                      <goals>
                          <goal>check</goal>
                      </goals>
                  </execution>
              </executions>
            </plugin>
            ...
        </plugins>
        ...
    </build>
    ...
</project>

Ant Task

For instructions on the use of the Ant Task, please see the dependency-check-ant github page.

Development Usage

The following instructions outline how to compile and use the current snapshot. While every intention is to maintain a stable snapshot it is recommended that the release versions listed above be used.

The repository has some large files due to test resources. The team has tried to clean up the history as much as possible. However, it is recommended that you perform a shallow clone to save yourself time:

git clone --depth 1 https://github.com/jeremylong/DependencyCheck.git

On *nix

$ mvn -s settings.xml install
$ ./cli/target/release/bin/dependency-check.sh -h
$ ./cli/target/release/bin/dependency-check.sh --project Testing --out . --scan ./src/test/resources

On Windows

> mvn -s settings.xml install
> .\dependency-check-cli\target\release\bin\dependency-check.bat -h
> .\dependency-check-cli\target\release\bin\dependency-check.bat --project Testing --out . --scan ./src/test/resources

Then load the resulting 'dependency-check-report.html' into your favorite browser.

Docker

In the following example it is assumed that the source to be checked is in the current working directory. Persistent data and report directories are used, allowing you to destroy the container after running.

#!/bin/sh

OWASPDC_DIRECTORY=$HOME/OWASP-Dependency-Check
DATA_DIRECTORY="$OWASPDC_DIRECTORY/data"
REPORT_DIRECTORY="$OWASPDC_DIRECTORY/reports"

if [ ! -d "$DATA_DIRECTORY" ]; then
    echo "Initially creating persistent directories"
    mkdir -p "$DATA_DIRECTORY"
    chmod -R 664 "$DATA_DIRECTORY"

    mkdir -p "$REPORT_DIRECTORY"
    chmod -R 664 "$REPORT_DIRECTORY"
fi

# Make sure we are using the latest version
docker pull owasp/dependency-check

docker run --rm \
    --volume $(pwd):/src \
    --volume "$DATA_DIRECTORY":/usr/share/dependency-check/data \
    --volume "$REPORT_DIRECTORY":/report \
    owasp/dependency-check \
    --scan /src \
    --format "ALL" \
    --project "My OWASP Dependency Check Project" \
    --out /report
    # Use suppression like this: (/src == $pwd)
    # --suppression "/src/security/dependency-check-suppression.xml"

Building From Source

To build dependency-check run the command:

mvn -s settings.xml install

Mailing List

Subscribe: [dependency-check+subscribe@googlegroups.com] subscribe

Post: [dependency-check@googlegroups.com] post

Archive: google group

Copyright & License

Dependency-Check is Copyright (c) 2012-2017 Jeremy Long. All Rights Reserved.

Permission to modify and redistribute is granted under the terms of the Apache 2.0 license. See the LICENSE.txt file for the full license.

Dependency-Check makes use of several other open source libraries. Please see the NOTICE.txt file for more information.