Improved client for OWASP DependencyTrack usage in CI CD.
Project description
DTrackAuditor
DTrackAuditor is the python script to facilitate usage of DependencyTrack in the CI, optionally failing the build based on different parameters.
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, e.g.: if number of critical is higher or equal to 10.
- Check policy violations and fail if any found.
- Return 0 or 1 exit status for Auto mode.
Usage
Basic Usage
python3 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.
python3 dtrackauditor.py -p myweb -v 1.0.0 -a
Vulnerability Rules
Auto mode for CI/CD with support for rules.
python3 dtrackauditor.py \
-u http://mydtrack.local:8080 \
-k mydtrackapikey \
-p hello \
-v 8.0.0 \
-a \
-r critical:1:true,high:2:true,medium:10:true,low:10:false
The rules are a list of:
<severity>:<count>:<action>
Where:
- severity: Either
critical
,high
,medium
,low
, orunassigned
- count: If the count of the issues for the
severity
is greater or equal, triggeraction
- action:
true
to fail the test,false
to just display a warning (default istrue
)
Policy Violations
DtrackAuditor return with code 1 (fails the test) in case any Policy Violations detected. This feature is not configurable and cannot be disabled using command line options.
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
dtrack-auditor-1.1.0.tar.gz
(6.8 kB
view hashes)
Built Distributions
Close
Hashes for dtrack_auditor-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb44ff027e0003e0942bd957e670de6818d20b5b80369872ffc5346868146c06 |
|
MD5 | 0386b5d5dc6b0850c4c852f3718d1933 |
|
BLAKE2b-256 | 65bef4ab8badcb781211468c355b2195d97ac1dc20e3b7a6fc0990513ea5eef7 |
Close
Hashes for dtrack_auditor-1.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9cba22f5a1cc440dfa3fe10f0f3ecb88e3dcc8c9ffb11a154194bd7e706a68c9 |
|
MD5 | 941ffebdee715f53992da06464d89de0 |
|
BLAKE2b-256 | e0c68bb1d5fa800f3b39e95dc9b9960f866448011e4688a4d5b25d8b8b5f3d78 |