OWASP Dependency Track Azure DevOps sync
Project description
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
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file owasp_dependency_track_azure_devops-0.0.3.tar.gz.
File metadata
- Download URL: owasp_dependency_track_azure_devops-0.0.3.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af97cc2919deaacd453e885c987f0b7ce4dac97c96ea45e42fed5a351d1e0363
|
|
| MD5 |
205310926f6b658091111923e30bd16a
|
|
| BLAKE2b-256 |
c8bc5d8fea6eba8958f6e156da4920dac30ad4104c074a451af7ee3c45aef7ef
|
File details
Details for the file owasp_dependency_track_azure_devops-0.0.3-py3-none-any.whl.
File metadata
- Download URL: owasp_dependency_track_azure_devops-0.0.3-py3-none-any.whl
- Upload date:
- Size: 15.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0125e8265b3f70018a4601528afae2e34c3f9e78b1e0d05397f67300c3900ba
|
|
| MD5 |
1e07306fc25381f97b4d629be5fba280
|
|
| BLAKE2b-256 |
f1d0159f72830d0faf52387ef3482698b977ec4cd38e4c32164d13738d0a2c0f
|