Shim to easily install OWASP dependency-check-cli into Python projects
Project description
Overview
dependency-check scans application dependencies and checks whether they contain any published vulnerabilities (based on the NIST NVD). It runs in the JVM, so you need some form of java available in your PATH. The script should work on Linux, Mac OSX and Windows, but right now is only tested on Linux.
Usage
After installation, you’ll have the dependency-check command available that, on first use, will automatically download and install the OWASP release archive once for all projects. It’ll then redirect any calls to that installation, meaning the downloaded NVD data is shared amongst projects. Please see the DependencyCheck site for more configuration and usage details.
To install from PyPI, add dependency-check to your dev-requirements.txt or a similar file. For more installation options, see the next section.
To just get the dependency-check CLI tool installed into your home, independant of any project, you can use the pip script installer or pip install --user dependency-check.
Customization
Using environment variables, you can change the version and download location of the release archive, and the directory for the local installation.
Variable |
Default |
---|---|
DEPENDENCY_CHECK_VERSION |
2.1.1 |
DEPENDENCY_CHECK_URL |
https://bintray.com/artifact/download/jeremy-long/owasp/dependency-check-{version}-release.zip |
DEPENDENCY_CHECK_HOME |
~/.local/dependency-check |
DEPENDENCY_CHECK_NVD_URL |
Use NIST NVD URLs |
To update to a new version of the OWASP software, delete ~/.local/dependency-check/bin/, set DEPENDENCY_CHECK_VERSION to the new version number, and call dependency-check.
The variable DEPENDENCY_CHECK_NVD_URL can be used to point to a local copy of the various NVD feeds, in a flat hierarchy with uncompressed XML files (if you set this, the options --cveUrl12Modified, --cveUrl20Modified, --cveUrl12Base, and --cveUrl20Base will be added to each call).
Installation
dependency-check can be installed via pip install dependency-check as usual, see releases for an overview of available versions. To get a bleeding-edge version from source, use these commands:
repo="jhermann/dependency-check-py" pip install -r "https://raw.githubusercontent.com/$repo/master/requirements.txt" pip install -U -e "git+https://github.com/$repo.git#egg=dependency-check"
As a developer, to create a working directory for this project, call these commands:
git clone "https://github.com/jhermann/dependency-check-py.git" cd "dependency-check-py" . .env --yes --develop invoke build check
You might also need to follow some setup procedures to make the necessary basic commands available on Linux, Mac OS X, and Windows.
Other Python Security Tools
openstack/bandit – Security linter designed to find common security issues in Python code, by static AST analysis.
pyupio/safety – Safety checks your installed dependencies for known security vulnerabilities.
pyupio/safety-db – A curated database of security vulnerabilities in Python packages.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dependency-check-0.2.0.zip
.
File metadata
- Download URL: dependency-check-0.2.0.zip
- Upload date:
- Size: 21.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9207b6213381c459bfe268f0bc4e57325a338d65d1cf0398f9ffc86a323eb903 |
|
MD5 | f71dd9ce4d5545fefeeaea6722354e53 |
|
BLAKE2b-256 | c4be2bea70cc2d5ad7d61e486c85ba953eb14ce8274d111e7323e4c321419eb3 |
File details
Details for the file dependency_check-0.2.0-py2.py3-none-any.whl
.
File metadata
- Download URL: dependency_check-0.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f69af40649fbce883a93e8f5ff7e97fb36727a6a5d45c1eb2f72ee6885410de2 |
|
MD5 | fc4ac215301351c8b9ccaff5349e3db0 |
|
BLAKE2b-256 | 0ef5836569a3ba79dbd9beb00232c57e0f2861f1a6b46d77a93ffab7a04525e3 |