Skip to content

Commit 42f2cb1

Browse files
authored
Merge pull request #148 from DependencyTrack/136-improve-github-advisory-config-ui-api-token-documentation
Improve GHSA description; Prevent saving of invalid configs; Add GitHub and NIST logos
2 parents 06945b7 + 1954708 commit 42f2cb1

File tree

4 files changed

+87
-6
lines changed

4 files changed

+87
-6
lines changed

src/assets/img/github-logo.svg

Lines changed: 50 additions & 0 deletions
Loading

src/i18n/locales/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,11 +442,12 @@
442442
"vulnsource_nvd_desc": "The National Vulnerability Database (NVD) is the largest publicly available source of vulnerability intelligence. It is maintained by a group within the National Institute of Standards and Technology (NIST) and builds upon the work of MITRE and others. Vulnerabilities in the NVD are called Common Vulnerabilities and Exposures (CVE). There are over 100,000 CVEs documented in the NVD spanning from the 1990’s to the present.",
443443
"vulnsource_nvd_feeds_url": "NVD Feeds URL",
444444
"vulnsource_github_advisories_enable": "Enable GitHub Advisory mirroring",
445-
"vulnsource_github_advisories_desc": "GitHub Advisories is a centralized source of vulnerability intelligence specific to GitHub projects. GitHub advisories may \nor may not be documented in the National Vulnerability Database. Restarting the Dependency-Track server is required to force the system to mirror the contents of GitHub Advisories. A Personal Access Token is needed, but it doesn't require any scope.",
445+
"vulnsource_github_advisories_desc": "GitHub Advisories (GHSA) is a database of CVEs and GitHub-originated security advisories affecting the open source world. Dependency-Track integrates with GHSA by mirroring advisories via GitHub's public GraphQL API. The mirror is refreshed daily, or upon restart of the Dependency-Track instance. A personal access token (PAT) is required in order to authenticate with GitHub, but no scopes need to be assigned to it.",
446446
"registered_email_address": "Registered email address",
447447
"api_token": "API token",
448448
"consumer_key": "Consumer key",
449449
"consumer_secret": "Consumer secret",
450+
"personal_access_token": "Personal Access Token",
450451
"identifier": "Identifier",
451452
"url": "URL",
452453
"enabled": "Enabled",

src/views/administration/vuln-sources/VulnSourceGitHubAdvisories.vue

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
<template>
22
<b-card no-body :header="header">
33
<b-card-body>
4-
<c-switch id="vulnsourceEnabled" color="primary" v-model="vulnsourceEnabled" label v-bind="labelIcon" />{{$t('admin.vulnsource_github_advisories_enable')}}
4+
<img alt="GitHub logo" src="@/assets/img/github-logo.svg" width="65"/>
5+
<hr/>
6+
<c-switch
7+
:disabled="!this.vulnsourceEnabled && !this.apitoken"
8+
color="primary"
9+
id="vulnsourceEnabled"
10+
label
11+
v-bind="labelIcon"
12+
v-model="vulnsourceEnabled"
13+
/>
14+
{{$t('admin.vulnsource_github_advisories_enable')}}
515
<b-validated-input-group-form-input
616
id="github-advisories-apitoken"
7-
:label="$t('admin.api_token')"
17+
:label="$t('admin.personal_access_token')"
818
input-group-size="mb-3"
919
rules="required"
1020
type="password"
@@ -15,7 +25,13 @@
1525
{{ $t('admin.vulnsource_github_advisories_desc') }}
1626
</b-card-body>
1727
<b-card-footer>
18-
<b-button variant="outline-primary" class="px-4" @click="saveChanges">{{ $t('message.update') }}</b-button>
28+
<b-button
29+
:disabled="this.vulnsourceEnabled && !this.apitoken"
30+
@click="saveChanges"
31+
class="px-4"
32+
variant="outline-primary">
33+
{{ $t('message.update') }}
34+
</b-button>
1935
</b-card-footer>
2036
</b-card>
2137
</template>

src/views/administration/vuln-sources/VulnSourceNvd.vue

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
<template>
22
<b-card no-body :header="header">
33
<b-card-body>
4-
<c-switch id="vulnsourceEnabled" color="primary" v-model="vulnsourceEnabled" label v-bind="labelIcon" />{{$t('admin.vulnsource_nvd_enable')}}
4+
<c-switch
5+
:disabled="!this.vulnsourceEnabled && !this.nvdFeedsUrl"
6+
id="vulnsourceEnabled"
7+
color="primary"
8+
v-model="vulnsourceEnabled"
9+
label
10+
v-bind="labelIcon"
11+
/>
12+
{{$t('admin.vulnsource_nvd_enable')}}
513
<b-validated-input-group-form-input
614
id="nvd-feeds-url"
715
:label="$t('admin.vulnsource_nvd_feeds_url')"
@@ -15,7 +23,13 @@
1523
{{ $t('admin.vulnsource_nvd_desc') }}
1624
</b-card-body>
1725
<b-card-footer>
18-
<b-button variant="outline-primary" class="px-4" @click="saveChanges">{{ $t('message.update') }}</b-button>
26+
<b-button
27+
:disabled="this.vulnsourceEnabled && !this.nvdFeedsUrl"
28+
variant="outline-primary"
29+
class="px-4"
30+
@click="saveChanges">
31+
{{ $t('message.update') }}
32+
</b-button>
1933
</b-card-footer>
2034
</b-card>
2135
</template>

0 commit comments

Comments
 (0)