Python client for OWASP DependencyTrack usage in CI CD. Developed and Tested on OWASP DependencyTrack version 3.8.0
Project description
DTrackAuditor
DTrackAuditor is the python script to facilitate usage of DependencyTrack in the CI.
Specially made for the non Jenkins CI environment. DependencyTrack already has Jenkins plugin to be used https://plugins.jenkins.io/dependency-track/
This script helps to use DependencyTrack in the CI pipeline, failing the build based on different parameters.
The Golang based similar tool already exists here and is easy to use: https://github.com/ozonru/dtrack-audit
Setup
Install all the dependencies libraries required.
Requirement = Python 3.8 or above
Tested on Python 3.8
Features
- Auto mode for project creation given project name and version. Creates new project with version if already not found.
- Auto mode useful for CI pipeline.
- Optional filename path. Default is bom.xml
- Filter based on severity type (critical, high, medium, low, unassigned) and numbers. eg. if number of critical is higher or equal to 10. Default is critical with 3 counts
- Return 0 or 1 exit status for Auto mode.
Usage
python dtrackauditor.py -u 'http://mydtrack.local:8080' -k 'mydtrackapikey' -p myweb -v 1.0.0 -f myweb/target/bom.xml -a
If environment variable for DTRACK_SERVER and DTRACK_API_KEY are present then the usage can be direct.
python dtrackauditor.py -p myweb -v 1.0.0 -a
Auto mode for CI/ CD. Use risk, count and trigger flags to change defaults.
python dtrackauditor.py -u http://mydtrack.local:8080 -k mydtrackapikey -p hello -v 8.0.0 -a -s critical -c 20 -r 0 -l true
For more please use --help
python dtrackauditor.py --help
Docker usage
docker run --rm -v $PWD:/tmp thinksabin/dtrackauditor --url http://192.168.43.221:8081 --apikey XYQAQHW1kECL98LTaxUDjh -f /tmp/bom.xml -p myprojectname -v 2.0.0 -a
Pip usage
pip install dtrack-auditor
Setup usage
Clone the repo from the master branch for the latest test code commits. python3 setup.py
Project details
Release history Release notifications | RSS feed
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 dtrack-auditor-0.1.4.tar.gz
.
File metadata
- Download URL: dtrack-auditor-0.1.4.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cbfd901b5acfdfc2454f3e7e7668fe32d932035d3bc84f3398c62d910c0f0ec |
|
MD5 | 3d65fd4a873ce3a63e03833fc8b88861 |
|
BLAKE2b-256 | 132178788ca35fd2bd51f02d6f7f6b074ca9ab1ce158e5c1b4239f392dc66c04 |
File details
Details for the file dtrack_auditor-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: dtrack_auditor-0.1.4-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34906c26e56088475244eb3ad1c1244a433ea9c158c5fa9f8cadfda718fc9570 |
|
MD5 | 66b4d424626ce290e6b8a13fed00045e |
|
BLAKE2b-256 | 0da7e559f0259fb354c94e32d77d96b2941c258e64cdc374cc92652126ff4713 |