Skip to content

Commit a14a67f

Browse files
committed
Merge branch 'develop' into fix/ci-artifacts-reports
2 parents 9cb68f0 + 13ae59d commit a14a67f

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "0.3.19-beta-3",
3+
"version": "0.3.21",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Shared/Components/Security/SecurityModal/config/CodeScan.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import {
3232
TablePropsType,
3333
} from '../types'
3434
import { OpenDetailViewButton } from '../components'
35+
import { getCVEUrlFromCVEName } from '../../utils'
3536

3637
export const getCodeScanVulnerabilities = (data: CodeScan['vulnerability']) => ({
3738
headers: [
@@ -57,7 +58,7 @@ export const getCodeScanVulnerabilities = (data: CodeScan['vulnerability']) => (
5758
/* FIXME: which ones should be linked and which ones should not? */
5859
component: (
5960
<a
60-
href={`https://cve.mitre.org/cgi-bin/cvename.cgi?name=${element.cveId}`}
61+
href={getCVEUrlFromCVEName(element.cveId)}
6162
rel="noopener noreferrer"
6263
target="_blank"
6364
data-testid="security-vulnerability-detail--cve-id"

src/Shared/Components/Security/utils.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ export const getSeverityCountFromSummary = (
2020
low: scanResultSeverities?.LOW || 0,
2121
unknown: scanResultSeverities?.UNKNOWN || 0,
2222
})
23+
24+
export const getCVEUrlFromCVEName = (cveName: string): string =>
25+
`https://cve.mitre.org/cgi-bin/cvename.cgi?name=${cveName}`

0 commit comments

Comments
 (0)