Skip to content

Commit

Permalink
add support for trivy configuration ignore unfixed
Browse files Browse the repository at this point in the history
Signed-off-by: Marlon Pina Tojal <[email protected]>
  • Loading branch information
Marlon Pina Tojal committed Jan 1, 2024
1 parent 9236df1 commit 75874ef
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,7 @@
"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",
Expand Down
12 changes: 12 additions & 0 deletions src/views/administration/analyzers/TrivyAnalyzer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@
v-model="apitoken"
lazy="true"
/>
<c-switch
id="ignoreUnfixed"
color="primary"
v-model="ignoreUnfixed"
label
v-bind="labelIcon"
/>
{{$t('admin.analyzer_trivy_ignore_unfixed')}}
</b-card-body>
<b-card-footer>
<b-button
Expand Down Expand Up @@ -61,6 +69,7 @@
scannerEnabled: false,
apitoken: '',
baseUrl: '',
ignoreUnfixed: false,
}
},
methods: {
Expand All @@ -69,6 +78,7 @@
{groupName: 'scanner', propertyName: 'trivy.enabled', propertyValue: this.scannerEnabled},
{groupName: 'scanner', propertyName: 'trivy.api.token', propertyValue: this.apitoken},
{groupName: 'scanner', propertyName: 'trivy.base.url', propertyValue: this.baseUrl},
{groupName: 'scanner', propertyName: 'trivy.ignore.unfixed', propertyValue: this.ignoreUnfixed},
]);
}
},
Expand All @@ -84,6 +94,8 @@
this.apitoken = item.propertyValue; break;
case "trivy.base.url":
this.baseUrl = item.propertyValue; break;
case "trivy.ignore.unfixed":
this.ignoreUnfixed = common.toBoolean(item.propertyValue); break;
}
}
});
Expand Down

0 comments on commit 75874ef

Please sign in to comment.