Skip to content

fix: migrate default OSS Index API URL to Sonatype Guide; supporting optional username#8404

Merged
jeremylong merged 5 commits intodependency-check:mainfrom
chadlwilson:oss-index-to-guide
Apr 12, 2026
Merged

fix: migrate default OSS Index API URL to Sonatype Guide; supporting optional username#8404
jeremylong merged 5 commits intodependency-check:mainfrom
chadlwilson:oss-index-to-guide

Conversation

@chadlwilson
Copy link
Copy Markdown
Collaborator

@chadlwilson chadlwilson commented Apr 8, 2026

Description of Change

  • Changes the default base URL to the new Sonatype Guide URL
    • Needed before 28 April 2026.
    • logs a warning if users are pointing to the old URL or have overridden it
  • Makes username optional when using a Sonatype Guide PAT (and deprecated since users need to migrate to Guide tokens before Dec 31 2026)
    • logs a warning when users don't use PATs.

References

Related issues

Have test cases been added to cover the new functionality?

yes

Also tested

  • Gradle plugin with this code with both OSS index token (user/pass) and Guide PATs (with and without username)
  • Gradle plugin still fails as expected when not supplying the request authentication
  • Overriding the base URL to new new URL is working OK with the existing ODC

@boring-cyborg boring-cyborg Bot added ant changes to ant cli changes to the cli core changes to core documentation site documentation maven changes to the maven plugin tests test cases labels Apr 8, 2026
@chadlwilson chadlwilson force-pushed the oss-index-to-guide branch 3 times, most recently from 608596d to 37e0345 Compare April 8, 2026 09:56
@chadlwilson chadlwilson marked this pull request as ready for review April 8, 2026 10:39
@chadlwilson chadlwilson requested review from Copilot and nhumblot April 8, 2026 14:13
@chadlwilson chadlwilson changed the title chore: migrate default OSS Index API URL to Sonatype Guide; supporting optional username fix: migrate default OSS Index API URL to Sonatype Guide; supporting optional username Apr 8, 2026
@chadlwilson chadlwilson added the ossindex Label for issues that relate to the OSSIndex API label Apr 8, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Dependency-Check’s OSS Index integration to align with Sonatype’s migration to Sonatype Guide by switching the default API base URL, making the OSS Index username optional when using Guide PATs, and updating related documentation/templates/tests to reflect the new auth/migration guidance.

Changes:

  • Updated the default OSS Index API base URL to Sonatype Guide (https://api.guide.sonatype.com) and refreshed documentation links throughout the site/docs/templates.
  • Updated OSS Index credential handling to support Guide PAT usage with optional username and added/adjusted warnings around legacy tokens and migration.
  • Expanded/updated unit tests around OSS Index analyzer error handling and credential enable/disable behavior.

Reviewed changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/site/markdown/related.md Updates “related work” link from OSS Index to Sonatype Guide OSS Index page.
src/site/markdown/dependency-check-gradle/configuration.md Documents new OSS Index base URL default and PAT-centric auth guidance for Gradle.
src/site/markdown/dependency-check-gradle/configuration-update.md Minor doc table formatting update (NVD validForHours row).
src/site/markdown/dependency-check-gradle/configuration-aggregate.md Mirrors Gradle config doc updates for aggregate task.
src/site/markdown/data/ossindex.md Updates OSS Index documentation references to Sonatype Guide.
src/site/markdown/data/index.md Updates external host list and OSS Index section links to Sonatype Guide.
src/site/markdown/analyzers/oss-index-analyzer.md Adds migration guidance and clarifies mandatory authentication.
src/site/markdown/analyzers/index.md Refreshes OSS Index analyzer row to Guide + auth-mandatory wording and reformats tables.
README.md Updates OSS Index auth/migration messaging at the top-level README.
maven/src/site/markdown/configuration.md Updates Maven plugin configuration docs for Guide URL + PAT/legacy token guidance.
maven/src/main/java/org/owasp/dependencycheck/maven/BaseDependencyCheckMojo.java Updates Maven plugin credential population to allow password-only (PAT) credentials via serverId and fixes a javadoc typo.
core/src/test/java/org/owasp/dependencycheck/analyzer/OssIndexAnalyzerTest.java Refactors and expands OSS Index analyzer tests for Guide URL/reference and updated error messages.
core/src/test/java/org/owasp/dependencycheck/analyzer/DependencyCheckPropertiesTest.java Broadens “test analyzer” detection to exclude test/nested test analyzers more generally.
core/src/main/resources/templates/sarifReport.vsl Updates OSS Index metadata link to Sonatype Guide page.
core/src/main/resources/templates/jsonReport.vsl Updates OSS Index metadata link to Sonatype Guide page.
core/src/main/resources/templates/jenkinsReport.vsl Updates OSS Index attribution link to Sonatype Guide page.
core/src/main/resources/templates/htmlReport.vsl Updates OSS Index attribution link to Sonatype Guide page.
core/src/main/resources/dependencycheck.properties Changes default OSS Index URL to https://api.guide.sonatype.com.
core/src/main/java/org/owasp/dependencycheck/data/ossindex/OssindexClientFactory.java Sets a Guide default base URL and centralizes cache TTL constant.
core/src/main/java/org/owasp/dependencycheck/analyzer/OssIndexAnalyzer.java Adjusts credential requirements (username optional for PATs), updates warnings/messages, and updates remote error messaging.
cli/src/site/markdown/arguments.md Updates CLI argument descriptions/defaults for Guide base URL and PAT auth semantics.
cli/src/main/java/org/owasp/dependencycheck/CliParser.java Updates CLI help text to reflect Guide base URL and deprecated username usage.
CHANGELOG.md Updates historical changelog lines (removes outdated auth-required URL; updates Package URL link).
ant/src/site/markdown/configuration.md Updates Ant configuration docs for Guide URL and PAT/legacy token behavior.
ant/src/site/markdown/config-update.md Minor doc table formatting update (NVD validForHours row).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread core/src/main/java/org/owasp/dependencycheck/analyzer/OssIndexAnalyzer.java Outdated
Comment thread core/src/test/java/org/owasp/dependencycheck/analyzer/OssIndexAnalyzerTest.java Outdated
Comment thread core/src/test/java/org/owasp/dependencycheck/analyzer/OssIndexAnalyzerTest.java Outdated
Comment thread src/site/markdown/analyzers/index.md Outdated
Suspect these will break soon based on the documentation from Sonatype.

Signed-off-by: Chad Wilson <[email protected]>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 25 out of 25 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Collaborator

@jeremylong jeremylong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jeremylong jeremylong merged commit 2f2c0ba into dependency-check:main Apr 12, 2026
15 checks passed
@jeremylong
Copy link
Copy Markdown
Collaborator

Will cut another release very soon.

@jeremylong jeremylong added this to the 12.2.2 milestone Apr 12, 2026
@chadlwilson chadlwilson deleted the oss-index-to-guide branch April 12, 2026 14:03
@chadlwilson
Copy link
Copy Markdown
Collaborator Author

Will cut another release very soon.

Yup, no worries. Good to have a few days to fix any regressions from 12.2.1 (if any).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ant changes to ant cli changes to the cli core changes to core documentation site documentation maven changes to the maven plugin ossindex Label for issues that relate to the OSSIndex API tests test cases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate from Sonatype OSS Index to Sonatype Guide API

3 participants