Skip to main content
In this lesson we inspect the OWASP Dependency-Check stage from a Jenkins pipeline and demonstrate how to migrate it into a GitHub Actions workflow. We’ll:
  • Review the migrated workflow that the importer produced.
  • Identify Dependency-Check-related steps that lacked matching transformers.
  • Use a helper transformer to print the Jenkins JSON for those steps.
  • Map the Jenkins configuration to an appropriate GitHub Action that runs OWASP Dependency-Check.
Overview: the migrated workflow already contains environment variables and a runner configuration. The first job installs dependencies:
A dry-run of the actions-importer confirms the GitHub Actions workflow file was generated:
The pipeline includes an NPM dependency audit job and an OWASP Dependency-Check job. Both migrated, but the Dependency-Check step (and the Dependency-Check publisher) had no matching transformers in the default migration. To implement a correct translation, inspect the JSON representation emitted by the importer for those Jenkins identifiers. Use a helper transformer that prints the item JSON for multiple identifiers. For example:
Run the importer with the helper transformer to emit the JSON for the dependencyCheck and dependencyCheckPublisher items. Example (abridged) output:
The important fields from the emitted JSON for the dependencyCheck step are:
Notes on the fields:
  • additionalArguments contains the CLI flags passed to OWASP Dependency-Check. Key items: --scan (path), --out (output path), --format (report formats), and --failOnCVSS 9 (fail build for CVSS ≥ 9).
  • nvdCredentialsId and odcInstallation are Jenkins-specific entries referencing credentials and installer configurations used to accelerate NVD downloads or select a preinstalled Dependency-Check binary. These typically do not translate directly to ephemeral GitHub Actions runners.
CVSS score ranges are commonly used to gate failures. For reference, scores ≥ 9 are considered Critical, and scores between 7 and 8.9 are High:
A screenshot of a Google Images results page for "cvss scores," showing many thumbnails and charts that display CVSS rating categories (Low, Medium, High, Critical) and score ranges. The browser is in a dark theme with search tabs visible across the top.
Jenkins’ nvdCredentialsId and odcInstallation point to server-side configuration. When migrating to Actions, prefer a maintained Action or Docker image that packages Dependency-Check. If you need authenticated or mirrored NVD access, you’ll need to provide credentials or a custom DB image to the Action.
Because GitHub Actions runners are ephemeral, the typical approach is to use an existing Action that runs Dependency-Check inside a Docker image. The GitHub Marketplace project dependency-check/dependency-check-action runs OWASP Dependency-Check in a container and exposes inputs for common CLI options. A mapped GitHub Actions job that runs Dependency-Check might look like this:
Key mapping decisions (Jenkins → GitHub Actions):
If your Jenkins pipeline relied on a pre-downloaded NVD DB (via odcInstallation) or private NVD credentials, you must plan how to supply that to Actions: either use a self-hosted runner with the database pre-populated or configure the Action to use an authenticated/mirrored NVD feed. Otherwise scans may be slower or behave differently.
Best practices when migrating Dependency-Check:
  • Translate CLI flags (--scan, --out, --format, --failOnCVSS) into the Action’s with inputs or into args.
  • Upload generated reports with actions/upload-artifact@v3 so they are available in the Actions UI.
  • For “publisher” logic (e.g., “fail build if N critical vulnerabilities”), convert to --failOnCVSS or implement a follow-up step that parses the XML report and fails the job based on thresholds from the Jenkins dependencyCheckPublisher config.
Next steps (next lesson/article):
  • Implement a custom transformer that extracts format, failOnCVSS, --scan path, and other important flags from the Jenkins JSON and emits a corresponding GitHub Actions step.
  • Translate the Dependency-Check publisher config: detect the XML pattern, and translate the “fail build if N criticals” logic into Action flags or a separate report-parsing step.
Links and references: That’s all for now.

Watch Video