OWASP Dependency-Track Documentation

repository·main·Indexed 26 days ago

https://github.com/dependencytrack/dependency-track

An 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.

Tokens
30.6K
Snippets
58
Records
156
Agent score
86%

What's inside OWASP Dependency-Track

  1. Overview of OWASP Dependency-Track

    main
    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.
  2. Overview of dex durable execution engine

    main
    dex 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.
  3. Understand the OpenAPI specification layout

    main

    Dependency-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.yaml has a corresponding directory under resources/. 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).
  4. Architectural decision to replace Kafka with Postgres

    main
    Dependency-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).
  5. Understand Concurrency Key Wakeups in Dependency-Track

    main

    Dependency-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_wakeup table 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.

  6. Understand EPSS resolution logic

    main

    EPSS (Exploit Prediction Scoring System) data is managed by a single authoritative source (the FIRST mirror) and stored in a dedicated EPSS table 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:
      1. Score
      2. Percentile
      3. CVE identifier
  7. Understand task scheduling changes in Dependency-Track

    main

    Dependency-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-scheduler to run once per cluster on a cron schedule. This replaces the old system that required ShedLock and 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-scheduler to detect dead nodes, providing faster recovery than the previous claim-window-based approach.
  8. Understand finding status and attribution logic

    main

    Dependency-Track manages vulnerability findings through a relationship between components and vulnerabilities. A finding is considered active if it has at least one FINDINGATTRIBUTION record where DELETED_AT is NULL. If all associated attributions have a DELETED_AT timestamp, 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_AT timestamp. This preserves the audit trail and historical metrics.
    • Re-discovery: If an analyzer reports a finding again, its DELETED_AT column is unset (set to NULL), 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.
  9. Understand the consolidated User data model

    main

    Dependency-Track uses a consolidated user table to manage different types of users: MANAGED, LDAP, and OIDC. 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 TypeRequired Fields
    MANAGEDusername, email, password, last_password_change, non_expiry_password, force_password_change, suspended
    LDAPusername, email, ldap_dn
    OIDCusername, email, oidc_subject_identifier

    All users share common relationships with permission and team entities.

  10. Dependency-Track REST API v2 Overview

    main
    Dependency-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 using openapi-generator to produce JAX-RS interfaces and Java DTOs. The API design follows the Zalando RESTful API Guidelines.
  11. Understand the Dependency-Track module structure

    main

    Dependency-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 (under org.dependencytrack.resources.v1) and REST API v2 (under org.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 which apiserver is built.