Giter Site home page Giter Site logo

seabreg / dependencycheck Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jeremylong/dependencycheck

0.0 1.0 0.0 95.8 MB

OWASP dependency-check is a software composition analysis utility that detects publicly disclosed vulnerabilities in application dependencies.

Home Page: https://www.owasp.org/index.php/OWASP_Dependency_Check

License: Apache License 2.0

Java 56.08% Dockerfile 0.03% PLSQL 0.08% SQLPL 0.06% Batchfile 0.01% Shell 0.19% M4 1.71% CMake 10.95% Cuda 0.01% C++ 0.07% JavaScript 29.44% C 0.10% Python 0.19% Ruby 0.66% Swift 0.03% Groovy 0.39%

dependencycheck's Introduction

Maven Central Build Status Coverity Scan Build Status Codacy Badge CII Best Practices Apache 2.0 License

Black Hat Arsenal Black Hat Arsenal Black Hat Arsenal

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 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 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 777 "$DATA_DIRECTORY"

    mkdir -p "$REPORT_DIRECTORY"
    chmod -R 777 "$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"

Upgrade Notes

Upgrading from 1.x.x to 2.x.x

Note that when upgrading from version 1.x.x that the following changes will need to be made to your configuration.

Suppression file

In order to support multiple suppression files, the mechanism for configuring suppression files has changed. As such, users that have defined a suppression file in their configuration will need to update.

See the examples below:

Ant

Old:

<dependency-check
  failBuildOnCVSS="3"
  suppressionFile="suppression.xml">
</dependency-check>

New:

<dependency-check
  failBuildOnCVSS="3">
  <suppressionFile path="suppression.xml" />
</dependency-check>
Maven

Old:

<plugin>
  <groupId>org.owasp</groupId>
  <artifactId>dependency-check-maven</artifactId>
  <configuration>
    <suppressionFile>suppression.xml</suppressionFile>
  </configuration>
</plugin>

New:

<plugin>
  <groupId>org.owasp</groupId>
  <artifactId>dependency-check-maven</artifactId>
  <configuration>
    <suppressionFiles>
      <suppressionFile>suppression.xml</suppressionFile>
    </suppressionFiles>
  </configuration>
</plugin>

Gradle

In addition to the changes to the suppression file, the task dependencyCheck has been renamed to dependencyCheckAnalyze.

Old:

buildscript {
    repositories {
		mavenLocal()
    }
    dependencies {
        classpath 'org.owasp:dependency-check-gradle:2.0.1-SNAPSHOT'
    }
}
apply plugin: 'org.owasp.dependencycheck'

dependencyCheck {
	suppressionFile='path/to/suppression.xml'
}
check.dependsOn dependencyCheckAnalyze

New:

buildscript {
    repositories {
		mavenLocal()
    }
    dependencies {
        classpath 'org.owasp:dependency-check-gradle:2.0.1-SNAPSHOT'
    }
}
apply plugin: 'org.owasp.dependencycheck'

dependencyCheck {
	suppressionFiles = ['path/to/suppression1.xml', 'path/to/suppression2.xml']
}
check.dependsOn dependencyCheckAnalyze

Mailing List

Subscribe: [[email protected]] subscribe

Post: [[email protected]] 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.

dependencycheck's People

Contributors

jeremylong avatar awhitford avatar dwvisser avatar hansjoachim avatar colezlaw avatar stevespringett avatar wmaintw avatar stefanneuhaus avatar dependabot-support avatar brianf avatar bloihl avatar bkimminich avatar hgomez avatar aikebah avatar janpapenbrock avatar pwhittlesea avatar prakhash avatar sethjackson avatar mealingr avatar stephengroat avatar lllama avatar ctrl-alt-dev avatar markrekveld avatar msrb avatar xthk avatar thc202 avatar tobix avatar willis7 avatar paulirwin avatar ktham avatar

Watchers

James Cloos avatar

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.