Skip to content

Conversation

@brianf
Copy link

@brianf brianf commented Jan 26, 2026

Summary

Adds configurable Base URL field to the OSS Index analyzer admin UI, allowing users to point to alternative OSS Index API endpoints (e.g., https://api.guide.sonatype.com).

Changes

  • Added Base URL input field to OSS Index analyzer configuration panel
  • Field positioned between Alias Sync and Username fields
  • Implements required field validation with lazy evaluation
  • Uses existing translation key admin.base_url
  • Property: scanner.ossindex.base.url (default: https://ossindex.sonatype.org)

Implementation Details

This implementation follows the established pattern from Snyk and Trivy analyzers for consistency:

  • Uses b-validated-input-group-form-input component
  • Validation: rules="required", lazy="true"
  • Integrates with configPropertyMixin for API communication
  • Reads from: GET /api/v1/configProperty/
  • Writes to: POST /api/v1/configProperty/aggregate

Related PRs

This PR requires the backend changes from:

Both PRs should be reviewed and merged together.

Testing

Manual testing required:

  1. Navigate to Admin → Analyzers → OSS Index
  2. Verify Base URL field appears between Alias Sync and Username
  3. Test required field validation
  4. Test saving custom URL (e.g., https://api.guide.sonatype.com)
  5. Verify persistence after page refresh
  6. Verify invalid URL handling

Files Changed

  • src/views/administration/analyzers/OssIndexAnalyzer.vue - Added Base URL configuration field (4 changes: template, data, save, load)

🤖 Generated with Claude Code

Adds configurable Base URL field to the OSS Index analyzer admin UI,
allowing users to point to alternative OSS Index API endpoints
(e.g., https://api.guide.sonatype.com).

Implementation follows the established pattern from Snyk and Trivy
analyzers for consistency:
- Uses b-validated-input-group-form-input component
- Implements required field validation with lazy evaluation
- Integrates with configPropertyMixin for API communication
- Property: scanner.ossindex.base.url (default: https://ossindex.sonatype.org)

The Base URL field appears between Alias Sync and Username fields,
maintaining logical grouping of configuration options.

Related backend PR: DependencyTrack/dependency-track#5736

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Brian Fox <brianf@sonatype.com>
@owasp-dt-bot
Copy link

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

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