Skip to content

Commit 0067002

Browse files
brianfclaude
andcommitted
Add OSS Index Base URL configuration field
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>
1 parent a33f8eb commit 0067002

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/views/administration/analyzers/OssIndexAnalyzer.vue

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@
2020
:title="$t('admin.vulnsource_alias_sync_enable_tooltip')"
2121
/>
2222
{{ $t('admin.vulnsource_alias_sync_enable') }}
23+
<b-validated-input-group-form-input
24+
id="ossindex-baseUrl"
25+
:label="$t('admin.base_url')"
26+
input-group-size="mb-3"
27+
rules="required"
28+
v-model="baseUrl"
29+
lazy="true"
30+
/>
2331
<b-validated-input-group-form-input
2432
id="ossindex-username"
2533
:label="$t('admin.registered_email_address')"
@@ -68,6 +76,7 @@ export default {
6876
return {
6977
scannerEnabled: false,
7078
aliasSyncEnabled: false,
79+
baseUrl: '',
7180
username: '',
7281
apitoken: '',
7382
labelIcon: {
@@ -89,6 +98,11 @@ export default {
8998
propertyName: 'ossindex.alias.sync.enabled',
9099
propertyValue: this.aliasSyncEnabled,
91100
},
101+
{
102+
groupName: 'scanner',
103+
propertyName: 'ossindex.base.url',
104+
propertyValue: this.baseUrl,
105+
},
92106
{
93107
groupName: 'scanner',
94108
propertyName: 'ossindex.api.username',
@@ -116,6 +130,9 @@ export default {
116130
case 'ossindex.alias.sync.enabled':
117131
this.aliasSyncEnabled = common.toBoolean(item.propertyValue);
118132
break;
133+
case 'ossindex.base.url':
134+
this.baseUrl = item.propertyValue;
135+
break;
119136
case 'ossindex.api.username':
120137
this.username = item.propertyValue;
121138
break;

0 commit comments

Comments
 (0)