OWASP Dependency-Track Documentation
repository·main·Indexed 26 days ago
https://github.com/dependencytrack/dependency-trackAn intelligent Component Analysis platform that leverages Software Bill of Materials (SBOM) to identify and mitigate software supply chain risks. This documentation covers the REST API v2, the dex durable execution engine for workflows-as-code, data migration from v4 to v5 using the v4-migrator, and development environment configurations including Docker Compose, Kafka mTLS, and benchmarking.
What's inside OWASP Dependency-Track
- OWASP Dependency-Track is an intelligent Component Analysis platform designed to help organizations identify and reduce risks within their software supply chain. It utilizes Software Bill of Materials (SBOM) to perform component analysis and risk management.
Overview of dex durable execution engine
maindex is an embedded durable execution engine designed for "workflows-as-code," optimized specifically for PostgreSQL. It is heavily influenced by Microsoft's Durable Task Framework and Temporal. It provides a way to author long-running, reliable workflows that can survive process restarts or failures.Understand the OpenAPI specification layout
mainDependency-Track uses a resource-grouped layout for its OpenAPI specification. This structure organizes API definitions around the resources (tags) they represent to improve discoverability and maintainability.
Layout Structure:
- Resource Directories: Each tag in
openapi.yamlhas a corresponding directory underresources/. This directory contains:- Path files for that resource (one file per URL, containing all HTTP methods for that URL).
- A
schemas/subdirectory containing schemas owned by that resource.
- Shared Components: Components used across multiple resources are located in
shared/{parameters,responses,schemas}/. - Path Filenames: Uses descriptive, kebab-case names (e.g.,
secret.yaml). - Schema Naming: Schema basenames must be globally unique across all
**/schemas/**directories to prevent collisions in generated Java classes. If disambiguation is needed, a resource prefix is used (e.g.,list-vuln-policy-bundles-response-item.yaml).
- Resource Directories: Each tag in
Migrate data from Dependency-Track v4 to v5 using v4-migrator
mainArchitectural decision to replace Kafka with Postgres
mainDependency-Track is transitioning away from using Kafka as a message broker. The project has decided to leverage Postgres for asynchronous operations, queues, and messaging tasks instead of maintaining a separate Kafka infrastructure. This change aims to simplify the technology stack, improve observability, and utilize existing expertise in Postgres management and migrations (via Liquibase).Understand Concurrency Key Wakeups in Dependency-Track
mainDependency-Track uses concurrency keys (e.g.,
import-bom:<project uuid>) to ensure that background workflows—such as BOM imports, vulnerability analysis, or policy evaluations—do not run concurrently for the same project. This prevents race conditions on project findings and metrics.To maintain performance at scale (handling backlogs of >200k runs), the engine uses concurrency key wakeups. Instead of scanning the entire backlog on every poll, the scheduler inspects a specialized
dex_workflow_concurrency_key_wakeuptable containing 'hints' about keys that recently had an event (like a new run being created or an old one completing) that might make them schedulable.Understand EPSS resolution logic
mainEPSS (Exploit Prediction Scoring System) data is managed by a single authoritative source (the FIRST mirror) and stored in a dedicated
EPSStable keyed by CVE ID.To ensure non-CVE vulnerabilities can benefit from EPSS data, Dependency-Track resolves EPSS values at read time using the alias schema.
Resolution Rules:
- CVE-sourced vulnerabilities: Resolve directly using their CVE ID.
- Non-CVE vulnerabilities: Inherit the EPSS score of their CVE sibling via the alias group.
- Multiple CVEs in an alias group: If an alias group contains multiple CVEs, the system returns the most impactful record, ordered by:
- Score
- Percentile
- CVE identifier
Understand task scheduling changes in Dependency-Track
mainDependency-Track has transitioned from a legacy in-memory event system to a more robust scheduling model. This change affects how tasks are coordinated in clustered deployments and how operators manage settings.
Task Types
- Simple repeating jobs: These use
db-schedulerto run once per cluster on a cron schedule. This replaces the old system that requiredShedLockand manual lock time management. - Long, multi-step, or coordinated work: These use the durable execution engine (
dex). This engine provides persistence, retries, and observability for complex workflows.
Operational Changes
- Reduced Configuration: The minimum and maximum lock time settings per task, as well as the worker thread pool settings required by the old event system, have been removed.
- Improved Crash Recovery: The system now uses regular heartbeats via
db-schedulerto detect dead nodes, providing faster recovery than the previous claim-window-based approach.
- Simple repeating jobs: These use
Understand finding status and attribution logic
mainDependency-Track manages vulnerability findings through a relationship between components and vulnerabilities. A finding is considered active if it has at least one
FINDINGATTRIBUTIONrecord whereDELETED_ATisNULL. If all associated attributions have aDELETED_ATtimestamp, the finding is considered inactive.Key behaviors:
- Soft-deletion: When an analyzer stops reporting a finding, its attribution is not deleted but marked with a
DELETED_ATtimestamp. This preserves the audit trail and historical metrics. - Re-discovery: If an analyzer reports a finding again, its
DELETED_ATcolumn is unset (set toNULL), making the finding active again. - Visibility: Inactive findings are hidden by default in the UI and API to prevent clutter, but they remain in the database to maintain data integrity and audit history.
- Soft-deletion: When an analyzer stops reporting a finding, its attribution is not deleted but marked with a
Understand the consolidated User data model
mainDependency-Track uses a consolidated
usertable to manage different types of users:MANAGED,LDAP, andOIDC. This single-table approach uses a discriminator column (TYPE) to distinguish between user types and enforces data integrity through database-level check constraints.User Types and Field Requirements
User Type Required Fields MANAGED username,email,password,last_password_change,non_expiry_password,force_password_change,suspendedLDAP username,email,ldap_dnOIDC username,email,oidc_subject_identifierAll users share common relationships with
permissionandteamentities.Dependency-Track REST API v2 Overview
mainDependency-Track's REST API v2 is defined using the OpenAPI v3.0 specification. The specification is modular, consisting of many small files that are assembled at build time usingopenapi-generatorto produce JAX-RS interfaces and Java DTOs. The API design follows the Zalando RESTful API Guidelines.Understand the Dependency-Track module structure
mainDependency-Track is a multi-module Maven project. The architecture is divided into functional modules, shared building blocks, shared infrastructure, and support libraries. Understanding this structure is essential for locating specific features, APIs, or infrastructure components.
Core Application Modules (Product Features)
api: Contains the OpenAPI specification for REST API v2 (Spec-first).apiserver: The main application. It hosts REST API v1 (underorg.dependencytrack.resources.v1) and REST API v2 (underorg.dependencytrack.resources.v2).notification: Notification API, publishers, and templating.package-metadata: Resolves package metadata from package repositories.vuln-analysis: Vulnerability analyzers (e.g., OSS Index, Snyk, Trivy, internal database).vuln-data-source: Adapters for vulnerability feeds (e.g., NVD, GitHub, OSV).
Shared Infrastructure (Cross-cutting Services)
cache: Cache API and providers (e.g.,memory,database).dex: Durable execution engine.file-storage: File storage API and providers (e.g.,local,memory,s3).plugin: Plugin API and runtime used to load providers like notification publishers or vulnerability analyzers.secret-management: Secret storage.alpine: The framework upon whichapiserveris built.