OWASP Dependency Track / Azure DevOps Sync
Synchronizes OWASP Dependency Track Findings with Azure DevOps WorkItems.
Installation
pip install owasp-dependency-track-azure-devops
Usage
The following command will log possible change operations, when the environment variables are configured:
owasp-dtrack-azure-devops
Use the following flag to perform these changes:
owasp-dtrack-azure-devops --apply
As Container runtime:
podman|docker \
run --rm \
-eAZURE_ORG_URL="https://dev.azure.com/organisation" \
-eAZURE_PROJECT="my-project" \
-eAZURE_API_KEY="abc" \
-eAZURE_WORK_ITEM_DEFAULT_AREA_PATH="My\Path" \
-eOWASP_DTRACK_URL="http://192.168.1.100:8081" \
-eOWASP_DTRACK_VERIFY_SSL="false" \
-eOWASP_DTRACK_API_KEY="xyz" \
ghcr.io/mreiche/owasp-dependency-track-azure-devops:latest --apply
Environment variables
These environment variables are available for configuration:
AZURE_ORG_URL="https://dev.azure.com/organisation" # Azure organisation URL
AZURE_PROJECT="" # Azure project name
AZURE_API_KEY="" # Azure API key to use (PAT also works)
AZURE_WORK_ITEM_DEFAULT_AREA_PATH="My\Path" # The default area path for new work items (recommended)
OWASP_DTRACK_URL="http://localhost:8081" # Base-URL to OWASP Dependency Track
OWASP_DTRACK_VERIFY_SSL="False" # Do not verify SSL
OWASP_DTRACK_API_KEY="" # Your OWASP Dependency Track API Key
HTTPS_PROXY="" # URL for HTTP(S) proxy (optional)
LOG_LEVEL="info" # Logging verbosity (optional)
HTTPX_LOG_LEVEL="warning" # Log level of the httpx framework (optional)
You can also pass these variables from a file:
owasp-dtrack-azure-devops --env path/to/your/file.env
Templating
The WorkItem description is being rendered by the provided template. You can pass your own template using
owasp-dtrack-azure-devops --template path/to/your/template.jinja2
Custom filtering and mapping
You can filter findings and apply changes on the work items using custom mappers:
def process_finding(finding):
return finding.component.project_name == "My_Project"
def new_work_item(work_item_adapter):
work_item_adapter.title = "New Finding"
if work_item_adapter.finding.component.project_name == "Other project":
work_item_adapter.area = "Path\\To\\My\\Custom\\Area"
def map_analysis_to_work_item(analysis_adapter, work_item_adapter):
# Call this method if you want to re-render the ticket description from template
work_item_adapter.render_description()
# Remove mappers you don't need
# def map_work_item_to_analysis(work_item_adapter, analysis_adapter):
# pass
and pass this mapper using:
owasp-dtrack-azure-devops --mapper path/to/your/mapper.py
In Container runtime, keep in mind that you have to mount the mapper location as volume first.
podman|docker \
run --rm -v"$(pwd):$(pwd)"
...
ghcr.io/mreiche/owasp-dependency-track-azure-devops:latest --mapper "$(pwd)/path/to/your/mapper.py"
More OWASP Dependency Track utils
This library is part of a wider OWASP Dependency Track tool chain:
- OWASP Dependency Track Python API client: https://github.com/mreiche/owasp-dependency-track-python-client
- OWASP Dependency Track CLI: https://github.com/mreiche/owasp-dependency-track-cli
- OWASP Dependency Track Azure DevOps Sync: https://github.com/mreiche/owasp-dependency-track-azure-devops
Metadata
Release files for owasp-dependency-track-azure-devops 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| owasp_dependency_track_azure_devops-0.0.3.tar.gz | 14.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| owasp_dependency_track_azure_devops-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.4 kB
Release files / owasp_dependency_track_azure_devops-0.0.3.tar.gz
| Download URL | owasp_dependency_track_azure_devops-0.0.3.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af97cc2919deaacd453e885c987f0b7ce4dac97c96ea45e42fed5a351d1e0363
|
|
BLAKE2b-256 checksum How to use checksums |
c8bc5d8fea6eba8958f6e156da4920dac30ad4104c074a451af7ee3c45aef7ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / owasp_dependency_track_azure_devops-0.0.3-py3-none-any.whl
| Download URL | owasp_dependency_track_azure_devops-0.0.3-py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d0125e8265b3f70018a4601528afae2e34c3f9e78b1e0d05397f67300c3900ba
|
|
BLAKE2b-256 checksum How to use checksums |
f1d0159f72830d0faf52387ef3482698b977ec4cd38e4c32164d13738d0a2c0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|