diff --git a/src/assets/img/trivy-logo.svg b/src/assets/img/trivy-logo.svg
new file mode 100644
index 000000000..9ea7c6432
--- /dev/null
+++ b/src/assets/img/trivy-logo.svg
@@ -0,0 +1,32 @@
+
diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json
index 0c9c5bd67..101153dec 100644
--- a/src/i18n/locales/en.json
+++ b/src/i18n/locales/en.json
@@ -553,6 +553,7 @@
"oss_index": "Sonatype OSS Index",
"vulndb": "VulnDB",
"snyk": "Snyk (Beta)",
+ "trivy": "Trivy",
"vuln_sources": "Vulnerability Sources",
"nvd": "NVD",
"nvd_enable_mirroring_via_api": "Enable mirroring via API",
@@ -639,6 +640,8 @@
"analyzer_snyk_how_to_api_version_help": "Where do I find available versions?",
"analyzer_snyk_multiple_tokens_info": "Multiple tokens may be provided by separating them with semicolons, e.g. ",
"analyzer_snyk_why_multiple_cvss": "Why are there multiple CVSS Scores for the same vulnerability?",
+ "analyzer_trivy_enable": "Enable Trivy analyzer",
+ "analyzer_trivy_ignore_unfixed": "Ignores vulnerabilities that were not fixed",
"vulnsource_alias_sync_enable": "Enable vulnerability alias synchronization",
"vulnsource_alias_sync_enable_tooltip": "Alias data can help in identifying identical vulnerabilities across multiple databases. If the source provides this data, synchronize it with Dependency-Track's database.",
"vulnsource_nvd_enable": "Enable National Vulnerability Database mirroring",
diff --git a/src/router/index.js b/src/router/index.js
index dfae068f9..91e3c35c1 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -30,6 +30,7 @@ const InternalAnalyzer = () => import('@/views/administration/analyzers/Internal
const OssIndexAnalyzer = () => import('@/views/administration/analyzers/OssIndexAnalyzer')
const VulnDbAnalyzer = () => import('@/views/administration/analyzers/VulnDbAnalyzer')
const SnykAnalyzer = () => import('@/views/administration/analyzers/SnykAnalyzer')
+const TrivyAnalyzer = () => import('@/views/administration/analyzers/TrivyAnalyzer')
const VulnSourceNvd = () => import('@/views/administration/vuln-sources/VulnSourceNvd')
const VulnSourceGitHubAdvisories = () => import('@/views/administration/vuln-sources/VulnSourceGitHubAdvisories')
@@ -377,6 +378,16 @@ function configRoutes() {
permission: 'SYSTEM_CONFIGURATION'
},
},
+ {
+ path: 'analyzers/trivy',
+ component: TrivyAnalyzer,
+ meta: {
+ title: i18n.t('message.administration'),
+ i18n: 'message.administration',
+ sectionPath: '/admin',
+ permission: 'SYSTEM_CONFIGURATION'
+ },
+ },
{
path: 'vulnerabilitySources/nvd',
alias: ['vulnerabilitySources'],
diff --git a/src/shared/common.js b/src/shared/common.js
index 0ccddfc76..5df64b706 100644
--- a/src/shared/common.js
+++ b/src/shared/common.js
@@ -134,6 +134,14 @@ $common.formatAnalyzerLabel = function formatAnalyzerLabel(analyzer, vulnSource,
analyzerLabel = "Snyk";
analyzerUrl = "https://security.snyk.io/vuln/" + vulnId;
break;
+ case 'TRIVY_ANALYZER':
+ analyzerLabel = "Trivy";
+
+ analyzerUrl = "https://nvd.nist.gov/vuln/detail/" + vulnId;
+ if(vulnSource === "GITHUB") {
+ analyzerUrl = "https://github.com/advisories/" + vulnId;
+ }
+ break;
}
if (analyzerUrl) {
analyzerLabel = `${analyzerLabel} `;
diff --git a/src/views/administration/AdminMenu.vue b/src/views/administration/AdminMenu.vue
index b99733959..6984c03b6 100644
--- a/src/views/administration/AdminMenu.vue
+++ b/src/views/administration/AdminMenu.vue
@@ -109,6 +109,11 @@ import { ACCESS_MANAGEMENT, SYSTEM_CONFIGURATION } from "../../shared/permission
component: "SnykAnalyzer",
name: this.$t('admin.snyk'),
route: "analyzers/snyk"
+ },
+ {
+ component: "TrivyAnalyzer",
+ name: this.$t('admin.trivy'),
+ route: "analyzers/trivy"
}
]
},
diff --git a/src/views/administration/Administration.vue b/src/views/administration/Administration.vue
index 52403f873..203765c83 100644
--- a/src/views/administration/Administration.vue
+++ b/src/views/administration/Administration.vue
@@ -30,6 +30,7 @@ import TaskScheduler from "./configuration/TaskScheduler.vue";
import InternalAnalyzer from "./analyzers/InternalAnalyzer";
import OssIndexAnalyzer from "./analyzers/OssIndexAnalyzer";
import SnykAnalyzer from "./analyzers/SnykAnalyzer";
+import TrivyAnalyzer from "./analyzers/TrivyAnalyzer";
import VulnDbAnalyzer from "./analyzers/VulnDbAnalyzer";
// Vulnerability sources
import VulnSourceGitHubAdvisories from "./vuln-sources/VulnSourceGitHubAdvisories";
@@ -68,7 +69,7 @@ export default {
EventBus,
AdminMenu,
General, BomFormats, Email, Jira, InternalComponents, TaskScheduler, Search,
- InternalAnalyzer, OssIndexAnalyzer, VulnDbAnalyzer, SnykAnalyzer,
+ InternalAnalyzer, OssIndexAnalyzer, VulnDbAnalyzer, SnykAnalyzer, TrivyAnalyzer,
VulnSourceNvd, VulnSourceGitHubAdvisories, VulnSourceOSVAdvisories,
Cargo, Composer, Gem, GitHub, GoModules, Hex, Maven, Npm, Cpan, Nuget, Python,
Alerts, Templates,
diff --git a/src/views/administration/analyzers/TrivyAnalyzer.vue b/src/views/administration/analyzers/TrivyAnalyzer.vue
new file mode 100644
index 000000000..f6b488c8b
--- /dev/null
+++ b/src/views/administration/analyzers/TrivyAnalyzer.vue
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+ {{$t('admin.analyzer_trivy_enable')}}
+
+
+
+ {{$t('admin.analyzer_trivy_ignore_unfixed')}}
+
+
+
+ {{ $t('message.update') }}
+
+
+
+
+
+
diff --git a/src/views/portfolio/vulnerabilities/Vulnerability.vue b/src/views/portfolio/vulnerabilities/Vulnerability.vue
index a10879242..2fa914b0b 100644
--- a/src/views/portfolio/vulnerabilities/Vulnerability.vue
+++ b/src/views/portfolio/vulnerabilities/Vulnerability.vue
@@ -206,6 +206,8 @@
return "VulnDB (Risk Based Security)";
case 'SNYK':
return "Snyk";
+ case 'TRIVY':
+ return "Trivy";
default:
return "";
}