Skip to content

ci(depcheck): switch to Dependency-Check_Action wrapper#12

Merged
jcputney merged 1 commit into
mainfrom
ci/depcheck-switch-to-action
May 20, 2026
Merged

ci(depcheck): switch to Dependency-Check_Action wrapper#12
jcputney merged 1 commit into
mainfrom
ci/depcheck-switch-to-action

Conversation

@jcputney
Copy link
Copy Markdown
Owner

Summary

  • Move CI dependency-check from the Maven plugin path to dependency-check/Dependency-Check_Action@main, mirroring ratchet. The Action's Docker image ships with a pre-warmed NVD dataset, so cold runs only fetch the daily delta instead of the full ~350k records.
  • Disable OssIndex (Sonatype now requires an auth token since Sep 2025) and the JS-ecosystem analyzers (Java-only repo).
  • Drop the per-runner NVD cache step and the 30-minute job timeout — both were workarounds for the cold-download problem this PR removes.
  • pom.xml security profile stays for local mvn -P security verify, with <ossindexAnalyzerEnabled>false</ossindexAnalyzerEnabled> added for local/CI parity.

Expected scan duration after this lands

~1.5–5 minutes on ubuntu-latest (per ratchet's recent runs), vs. the 30-min timeout cliff on the previous Maven plugin path.

Test plan

  • Dependency-Check workflow run on this PR's push to branch (manual workflow_dispatch since the workflow no longer triggers on PRs)
  • SARIF uploads to GitHub Security tab successfully
  • Report artifact attaches with HTML + SARIF
  • CodeQL, dependency-review, and CI verify checks all pass

Mirror ratchet's approach. The Maven plugin path was forced to cold-
download the full ~350k-record NVD dataset on every fresh runner, which
even with NVD_API_KEY takes several minutes and previously timed out the
30-minute job slot on cache misses. The Dependency-Check_Action Docker
image ships with a pre-warmed dataset baked in, so cold runs only fetch
the daily delta and finish in 1.5-5 minutes (validated against ratchet).

Workflow changes:
- Replace `mvn -P security verify` invocation with the GHA wrapper.
- Drop the ISO-week NVD cache step (no longer relevant — data lives in
  the Docker image, not on the runner filesystem).
- Drop the 30-minute timeout; default GitHub job timeout is fine now.
- Disable OssIndex (Sonatype auth-token required since Sep 2025) and the
  JS-ecosystem analyzers (nothing to scan in a Java repo).
- Compile-before-scan step (`mvn -DskipTests install`) populates ~/.m2
  and module target/ JARs so the CLI walks the full resolved graph.

pom.xml security profile stays for `mvn -P security verify` local use,
with `<ossindexAnalyzerEnabled>false</ossindexAnalyzerEnabled>` added so
local runs match CI behavior. Stale comments about CI cache layout were
updated to reflect that CI no longer uses this path.
@github-advanced-security
Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@jcputney jcputney merged commit 4f171b3 into main May 20, 2026
12 of 13 checks passed
@jcputney jcputney deleted the ci/depcheck-switch-to-action branch May 20, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants