Skip to content

Commit 82c7f01

Browse files
committed
Merge remote-tracking branch 'upstream/master' into osv-support-enable-flag
2 parents b97e197 + a4f7d49 commit 82c7f01

File tree

22 files changed

+479
-59
lines changed

22 files changed

+479
-59
lines changed

.github/workflows/ci-publish.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ jobs:
6666
6767
- name: Update Release
6868
env:
69-
# or change it to a custom PAT that should be credited for the release
70-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
GITHUB_TOKEN: ${{ secrets.BOT_RELEASE_TOKEN }}
7170
run: |-
7271
cat << EOF >> .github/default-release-notes.md
7372
\`\`\`text

.github/workflows/ci-release.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,17 @@ jobs:
3030
cache: 'npm'
3131

3232
- name: Bump version and tag via NodeJS
33-
# if you use a bot-user to create the release in the next step
34-
# then it might be a solid idea to change the git config values below to the bot-user's name + email
3533
run: |-
36-
git config user.name "github-actions[bot]"
37-
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
34+
git config user.name "dependencytrack-bot"
35+
git config user.email "106437498+dependencytrack-[email protected]"
3836
3937
npm version ${{ github.event.inputs.version-to-bump }} -m "prepare-release: set version to %s"
4038
4139
git push origin "HEAD:refs/heads/master"
4240
4341
- name: Create GitHub Release
4442
env:
45-
# or change it to a custom PAT that should be credited for the release
46-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
GITHUB_TOKEN: ${{ secrets.BOT_RELEASE_TOKEN }}
4744
GH_OPTS: ""
4845
run: |-
4946
VERSION=`jq -r '.version' package.json`

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/containers/DefaultHeaderProfileDropdown.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
boundary="viewport"
99
tag="div"
1010
class="text-center">
11-
<strong>{{ $t('message.profile') }}</strong>
11+
{{ $t('message.connected_as') }}
12+
<strong>{{ user }}</strong>
1213
</b-dropdown-header>
1314
<b-dropdown-item v-if="canUpdateProfile()" v-b-modal.profileEditModal><i class="fa fa-user text-primary" /> {{ $t('message.profile_update') }}</b-dropdown-item>
1415
<b-dropdown-item v-if="canChangePassword()" to="/change-password"><i class="fa fa-key text-primary" /> {{ $t('message.change_password') }}</b-dropdown-item>
@@ -22,18 +23,25 @@
2223
import { HeaderDropdown as AppHeaderDropdown } from '@coreui/vue'
2324
import EventBus from '../shared/eventbus';
2425
import { decodeToken, getToken } from '../shared/permissions'
26+
import globalVarsMixin from "../mixins/globalVarsMixin";
2527
2628
export default {
2729
name: 'DefaultHeaderProfileDropdown',
30+
mixins: [globalVarsMixin],
2831
components: {
2932
AppHeaderDropdown
3033
},
3134
data: () => {
32-
return {
35+
return {
3336
itemsCount: 42,
3437
identityProvider: decodeToken(getToken()).idp
3538
}
3639
},
40+
computed: {
41+
user() {
42+
return this.currentUser.fullname || this.currentUser.username
43+
}
44+
},
3745
methods: {
3846
logout: function () {
3947
// Instructs all tabs (via localStorage event) that the session is being invalidated

src/i18n/locales/en.json

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"name": "Name",
6060
"published": "Published",
6161
"cwe": "CWE",
62+
"cwe_full": "Common Weakness Enumeration (CWE)",
6263
"cwe_id": "CWE ID",
6364
"cwe_desc": "Common Weakness Enumeration (CWE) is a taxonomy of software and hardware weakness types",
6465
"select_cwe": "Select CWE",
@@ -99,6 +100,7 @@
99100
"component_created": "Component created",
100101
"component_updated": "Component updated",
101102
"component_deleted": "Component deleted",
103+
"component_hash": "Component Hash",
102104
"property_created": "Property created",
103105
"property_deleted": "Property deleted",
104106
"create_project": "Create Project",
@@ -237,6 +239,7 @@
237239
"hashes": "Hashes",
238240
"component_name": "Component name",
239241
"component_namespace_group_vendor": "Namespace / group / vendor",
242+
"component_author": "Author",
240243
"coordinates": "Coordinates",
241244
"coordinates_version_tooltip": "You can use the comparison operators >, <, >=, <=, == and != to match specific versions or version ranges",
242245
"package_url_full": "Package URL (PURL)",
@@ -262,6 +265,7 @@
262265
"component_name_desc": "The name of the component as provided by the supplier",
263266
"component_version_desc": "The version of the component as provided by the supplier",
264267
"component_group_desc": "The suppliers higher-level namespace, group, or vendor identifier",
268+
"component_author_desc": "The author of the component",
265269
"component_package_url_desc": "A Valid Package URL is required for libraries and frameworks. PURL syntax: pkg:type/namespace/name@version?qualifiers#subpath",
266270
"component_cpe_desc": "The CPE v2.2 or v2.3 URI as provided by MITRE or NIST. All assets (applications, operating systems, and hardware) should have a CPE specified",
267271
"component_swid_tagid_desc": "The ISO/IEC 19770-2:2015 (SWID) tag ID provided by the software vendor",
@@ -275,7 +279,7 @@
275279
"component_removed": "Component removed",
276280
"required_project_name": "The project name is required",
277281
"project_name_desc": "The name of the project or component as provided by the supplier",
278-
"profile": "Profile",
282+
"connected_as": "Connected as",
279283
"profile_update": "Update Profile",
280284
"profile_updated": "Profile updated",
281285
"logout": "Logout",
@@ -436,6 +440,9 @@
436440
"internal_identification_queued": "Internal component identification queued",
437441
"internal_identification_error": "An error occurred queueing internal component identification. Check server logs for details",
438442
"analyzer_internal_enable": "Enable internal analyzer",
443+
"analyzer_internal_fuzzy_enable": "Enable fuzzy CPE matching. Helps with inconsistent NVD data, highlighting missing risks but also increasing false positives",
444+
"analyzer_internal_fuzzy_exclude_purl": "Enable fuzzy CPE matching on components that have a Package URL (PURL) defined",
445+
"analyzer_internal_fuzzy_exclude_internal": "Enable fuzzy CPE matching on internal components",
439446
"analyzer_internal_desc": "The internal analyzer evaluates components against an internal vulnerability database derived from the National Vulnerability Database, GitHub Advisories (if enabled) and VulnDB (if enabled). This analyzer makes use of the Common Platform Enumeration (CPE) defined in components. Components with a valid CPE will be evaluated with this analyzer.",
440447
"analyzer_ossindex_enable": "Enable OSS Index analyzer",
441448
"analyzer_ossindex_desc": "OSS Index is a service provided by Sonatype which identifies vulnerabilities in third-party components. Dependency-Track integrates natively with the OSS Index service to provide highly accurate results. Use of this analyzer requires a valid PackageURL for the components being analyzed.",
@@ -460,6 +467,7 @@
460467
"enabled": "Enabled",
461468
"integration_fortify_ssc_enable": "Enable Fortify SSC integration",
462469
"integration_defectdojo_enable": "Enable DefectDojo integration",
470+
"integration_defectdojo_reimport_enable": "Enable reimport",
463471
"synchronization_cadence_minutes": "Synchronization cadence (in minutes)",
464472
"synchronization_cadence_restart_required": "Restarting Dependency-Track is required for cadence changes to take effect",
465473
"integration_kenna_enable": "Enable Kenna Security integration",
@@ -529,7 +537,23 @@
529537
"repository_deleted": "Repository deleted",
530538
"portfolio_access_control": "Portfolio Access Control",
531539
"project_access": "Project access",
532-
"select_project": "Select Project"
540+
"select_project": "Select Project",
541+
"create_template": "Create Template",
542+
"template_created": "Template created",
543+
"delete_template": "Delete Template",
544+
"template_deleted": "Template deleted",
545+
"template_basedir": "Template base directory",
546+
"template_basedir_tooltip": "This property is used as base directory for notification templates search",
547+
"general_template_configuration": "General template configuration",
548+
"template_override_description": "Switching the template override control on and providing a template base directory allow you to override Dependency Track default notification publisher templates.",
549+
"template_override_file_hierarchy": "Any Pebble templates available in the template base directory with the appropriate directory hierarchy and naming scheme (e.g ${base directory}/templates/notification/publisher/email.peb) will override Dependency Track default one.",
550+
"template_override_security_warning": "You must set appropriate rights to the template base directory to prevent untrusted third party from supplying fraudulent Pebble templates that could lead to potential remote code execution.",
551+
"template_override_restart_needed": "Dependency Track restart is required for the modifications to be taken into account.",
552+
"enable_default_template_override": "Enable default template override",
553+
"restore_default_template": "Restore default templates",
554+
"default_template_restored": "Default templates restored",
555+
"clone_template": "Clone Template",
556+
"template_cloned": "Template cloned"
533557
},
534558
"condition": {
535559
"warning": "Warning",
@@ -547,7 +571,23 @@
547571
"is": "is",
548572
"is_not": "is not",
549573
"matches": "matches",
550-
"no_match": "does not match"
574+
"no_match": "does not match",
575+
"contains_any": "contains any",
576+
"contains_all": "contains all"
577+
},
578+
"hashes" : {
579+
"md5": "MD5",
580+
"sha_1": "SHA-1",
581+
"sha_256": "SHA-256",
582+
"sha_384": "SHA-384",
583+
"sha_512": "SHA-512",
584+
"sha3_256": "SHA3-256",
585+
"sha3_384": "SHA3-384",
586+
"sha3_512": "SHA3-512",
587+
"blake_256": "BLAKE2b-256",
588+
"blake_384": "BLAKE2b-384",
589+
"blake_512": "BLAKE2b-512",
590+
"blake3": "BLAKE3"
551591
},
552592
"policy_violation": {
553593
"fails": "Violation Failures",

src/mixins/globalVarsMixin.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import Vue from 'vue'
22
import axios from "axios";
3+
import EventBus from "@/shared/eventbus";
34

45
export default {
56
data () {
67
return {
7-
dtrack: Object
8+
dtrack: Object,
9+
currentUser: Object
810
}
911
},
1012
created() {
@@ -17,5 +19,19 @@ export default {
1719
}
1820
);
1921
}
22+
if (this.$currentUser) {
23+
this.currentUser = this.$currentUser;
24+
} else {
25+
EventBus.$emit('profileUpdated');
26+
}
27+
},
28+
mounted() {
29+
EventBus.$on('profileUpdated', () => {
30+
axios.get(`${Vue.prototype.$api.BASE_URL}/${Vue.prototype.$api.URL_USER_SELF}`)
31+
.then((result) => {
32+
this.currentUser = result.data;
33+
}
34+
);
35+
});
2036
}
2137
}

src/router/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,8 @@ router.beforeEach((to, from, next) => {
262262
// let backend verify the token
263263
router.app.axios.get(`${router.app.$api.BASE_URL}/${router.app.$api.URL_USER_SELF}`, {
264264
headers: { 'Authorization': `Bearer ${jwt}` }
265-
}).then(() => {
265+
}).then((result) => {
266+
Vue.prototype.$currentUser = result.data
266267
// allowed to proceed
267268
next();
268269
}).catch(() => {

src/views/administration/accessmanagement/OidcGroups.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export default {
8282
<b-row class="expanded-row">
8383
<b-col sm="6">
8484
<b-input-group-form-input id="input-oidcgroup-name" :label="$t('admin.oidc_group_name')" input-group-size="mb-3"
85-
required="true" type="text" v-model="oidcGroup.name" lazy="true"
85+
required="true" type="text" v-model="oidcGroup.name" lazy="true" autofocus="true"
8686
v-debounce:750ms="updateOidcGroup" :debounce-events="'keyup'" />
8787
<b-form-group :label="this.$t('admin.mapped_teams')">
8888
<div class="list-group">

src/views/administration/accessmanagement/Teams.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
<b-row class="expanded-row">
113113
<b-col sm="6">
114114
<b-input-group-form-input id="input-team-name" :label="$t('admin.team_name')" input-group-size="mb-3"
115-
required="true" type="text" v-model="name" lazy="true"
115+
required="true" type="text" v-model="name" lazy="true" autofocus="true"
116116
v-debounce:750ms="updateTeam" :debounce-events="'keyup'" />
117117
<b-form-group :label="this.$t('admin.api_keys')">
118118
<div class="list-group">

src/views/administration/analyzers/InternalAnalyzer.vue

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<b-card no-body :header="header">
33
<b-card-body>
44
<c-switch id="scannerEnabled" color="primary" v-model="scannerEnabled" label v-bind="labelIcon" />{{$t('admin.analyzer_internal_enable')}}
5-
<!--
65
<br/>
76
<c-switch id="scannerCpeFuzzyEnableInput" color="primary" v-model="scannerCpeFuzzyEnableInput" label v-bind="labelIcon" />{{$t('admin.analyzer_internal_fuzzy_enable')}}
87
<br/>
98
<c-switch id="scannerCpeFuzzyExcludePurlInput" color="primary" v-model="scannerCpeFuzzyExcludePurlInput" label v-bind="labelIcon" />{{$t('admin.analyzer_internal_fuzzy_exclude_purl')}}
10-
-->
9+
<br/>
10+
<c-switch id="scannerCpeFuzzyExcludeInternalInput" color="primary" v-model="scannerCpeFuzzyExcludeInternalInput" label v-bind="labelIcon" />{{$t('admin.analyzer_internal_fuzzy_exclude_internal')}}
1111
<hr/>
1212
{{ $t('admin.analyzer_internal_desc') }}
1313
</b-card-body>
@@ -34,7 +34,8 @@
3434
return {
3535
scannerEnabled: false,
3636
scannerCpeFuzzyEnableInput: false,
37-
scannerCpeFuzzyExcludePurlInput: false,
37+
scannerCpeFuzzyExcludePurlInput: true,
38+
scannerCpeFuzzyExcludeInternalInput: true,
3839
labelIcon: {
3940
dataOn: '\u2713',
4041
dataOff: '\u2715'
@@ -44,11 +45,15 @@
4445
methods: {
4546
saveChanges: function() {
4647
this.updateConfigProperties([
47-
{groupName: 'scanner', propertyName: 'internal.enabled', propertyValue: this.scannerEnabled}
48-
// TODO: Future
49-
// {groupName: 'scanner', propertyName: 'internal.fuzzy.enabled', propertyValue: this.fuzzyEnabled}
50-
// {groupName: 'scanner', propertyName: 'internal.fuzzy.exclude.purl', propertyValue: this.fuzzyExcludePurl}
48+
{groupName: 'scanner', propertyName: 'internal.enabled', propertyValue: this.scannerEnabled},
49+
{groupName: 'scanner', propertyName: 'internal.fuzzy.enabled', propertyValue: this.scannerCpeFuzzyEnableInput},
50+
{groupName: 'scanner', propertyName: 'internal.fuzzy.exclude.purl', propertyValue: !this.scannerCpeFuzzyEnableInput || !this.scannerCpeFuzzyExcludePurlInput},
51+
{groupName: 'scanner', propertyName: 'internal.fuzzy.exclude.internal', propertyValue: !this.scannerCpeFuzzyEnableInput || !this.scannerCpeFuzzyExcludeInternalInput}
5152
]);
53+
if (!this.scannerCpeFuzzyEnableInput){
54+
this.scannerCpeFuzzyExcludePurlInput = false;
55+
this.scannerCpeFuzzyExcludeInternalInput = false;
56+
}
5257
}
5358
},
5459
created () {
@@ -62,7 +67,9 @@
6267
case "internal.fuzzy.enabled":
6368
this.scannerCpeFuzzyEnableInput = common.toBoolean(item.propertyValue); break;
6469
case "internal.fuzzy.exclude.purl":
65-
this.scannerCpeFuzzyExcludePurlInput = common.toBoolean(item.propertyValue); break;
70+
this.scannerCpeFuzzyExcludePurlInput = !common.toBoolean(item.propertyValue); break;
71+
case "internal.fuzzy.exclude.internal":
72+
this.scannerCpeFuzzyExcludeInternalInput = !common.toBoolean(item.propertyValue); break;
6673
}
6774
}
6875
});

0 commit comments

Comments
 (0)