From a2f47d01f9ff194ce5452e81ba953ebf0c6818b0 Mon Sep 17 00:00:00 2001 From: deo002 Date: Wed, 27 Sep 2023 12:22:57 +0530 Subject: [PATCH] feat(add_vulnerability): Create vulnerability integration complete --- messages/en.json | 15 ++ messages/ja.json | 15 ++ messages/vi.json | 15 ++ messages/zh.json | 15 ++ .../add/components/AddVulnerability.tsx | 47 ++++++ .../vulnerabilities/components/AddValues.tsx | 93 ++++++++++++ .../components/VendorAdvisories.tsx | 139 ++++++++++++++++++ .../detail/[id]/components/Summary.tsx | 8 +- .../components/VulnerabilityDetailsTab.tsx | 4 +- src/object-types/VulnerabilityPayload.ts | 14 ++ .../VulnerabilitySummaryDataType.ts | 41 ------ 11 files changed, 359 insertions(+), 47 deletions(-) create mode 100644 src/app/[locale]/vulnerabilities/components/AddValues.tsx create mode 100644 src/app/[locale]/vulnerabilities/components/VendorAdvisories.tsx delete mode 100644 src/object-types/VulnerabilitySummaryDataType.ts diff --git a/messages/en.json b/messages/en.json index 4bb290ef7..240bb6cbf 100644 --- a/messages/en.json +++ b/messages/en.json @@ -6,6 +6,10 @@ ">=": ">=", "Attachment Usages": "Attachment Usages", "Add Additional Data": "Add Additional Data", + "Advisory Vendor": "Advisory Vendor", + "Advisory Name": "Advisory Name", + "Advisory Url": "Advisory Url", + "Assigned External Component Ids": "Assigned External Component Ids", "Analyst": "Analyst", "as of": "as of", "authentication": "authentication", @@ -83,6 +87,8 @@ "Cloud Service": "Cloud Service", "Categories": "Categories", "Change Log Id": "Change Log Id", + "Click to add Assigned External Component Id": "Click to add Assigned External Component Id", + "Click to add Vulnerability Reference": "Click to add Vulnerability Reference", "Change Log": "Change Log", "Change State": "Change State", "Change Type": "Change Type", @@ -145,6 +151,7 @@ "Click to add Releases": "Click to add Releases", "Change Vulnerability Rating And Action?": "Change Vulnerability Rating And Action?", "Create Account": "Create Account", + "Click to add Vendor Advisory": "Click to add Vendor Advisory", "Created By (Email)": "Created By (Email)", "Can not remove vulnerability because it is used by release": "Can not remove vulnerability because it is used by release", "Created by": "Created by", @@ -211,6 +218,8 @@ "Enter additional data key": "Enter additional data key", "Enter additional data value": "Enter additional data value", "External Ids": "External Ids", + "Enter Vulnerability Reference": "Enter Vulnerability Reference", + "Enter Assigned External Component Id": "Enter Assigned External Component Id", "External URLs": "External URLs", "external urls": "external urls", "Enter external id key": "Enter external id key", @@ -223,6 +232,9 @@ "Embedded Software": "Embedded Software", "Email": "Email", "Enter": "Enter", + "Enter Advisory Vendor": "Enter Advisory Vendor", + "Enter Advisory Name": "Enter Advisory Name", + "Enter Advisory Url": "Enter Advisory Url", "Enter text search": "Enter text search", "Enable Security Vulnerability Monitoring": "Enable Security Vulnerability Monitoring", "ECC": "ECC", @@ -637,6 +649,7 @@ "Vendor advisories": "Vendor advisories", "Vulnerability scoring": "Vulnerability scoring", "Vulnerable configurations": "Vulnerable configurations", + "Vulnerability Configuration": "Vulnerability Configuration", "VISIBILITY_INFO": "Private: Only visible by creator (and admin which applies to all visibility levels) \n Me and Moderators: Visible by creator and moderators \n Group and Moderators: All users of the same group and the moderators \n Everyone: Every user who is logged into the system", "Visibility": "Visibility", "Vulnerability has been deleted": "Vulnerability has been deleted", @@ -654,7 +667,9 @@ "Visual SourceSafe": "Visual SourceSafe", "Vulnerabilities": "Vulnerabilities", "Vulnerable Configuration": "Vulnerable Configuration", + "Vulnerability References": "Vulnerability References", "Vulnerability matching statistics": "Vulnerability matching statistics", + "Vendor Advisories": "Vendor Advisories", "Welcome to SW360!": "Welcome to SW360!", "Wiki": "Wiki", "Weighting": "Weighting", diff --git a/messages/ja.json b/messages/ja.json index 08a3809e1..1ca945c67 100644 --- a/messages/ja.json +++ b/messages/ja.json @@ -5,9 +5,13 @@ "<=": "<=", ">=": ">=", "Attachment Usages": "Attachment Usages", + "Assigned External Component Ids": "Assigned External Component Ids", "Application Software": "NOT TRANSLATED", "Analyst": "NOT TRANSLATED", "as of": "as of", + "Advisory Vendor": "Advisory Vendor", + "Advisory Name": "Advisory Name", + "Advisory Url": "Advisory Url", "authentication": "authentication", "Accountant": "NOT TRANSLATED", "ADJACENT_NETWORK": "ADJACENT_NETWORK", @@ -73,6 +77,8 @@ "Cancel": "キャンセル", "complexity": "complexity", "Click to add row to Additional Data": "NOT TRANSLATED", + "Click to add Assigned External Component Id": "Click to add Assigned External Component Id", + "Click to add Vulnerability Reference": "Click to add Vulnerability Reference", "Click to add row to External Id": "NOT TRANSLATED", "Click to add row to External Url": "NOT TRANSLATED", "Click to add Releases": "クリックしてリリースを追加します", @@ -158,6 +164,7 @@ "CPE ID": "CPE ID", "CVS": "CVS", "CriticalFilesFound": "Critical Files Found", + "Click to add Vendor Advisory": "Click to add Vendor Advisory", "Customer Project": "NOT TRANSLATED", "Contains OSS": "Contains OSS", "COMPLETE": "COMPLETE", @@ -209,6 +216,9 @@ "Export SBOM": "Export SBOM", "Edit Projects": "Edit Projects", "External URLs": "NOT TRANSLATED", + "Enter Advisory Vendor": "Enter Advisory Vendor", + "Enter Advisory Name": "Enter Advisory Name", + "Enter Advisory Url": "Enter Advisory Url", "Enter external id key": "NOT TRANSLATED", "Enter external url key": "NOT TRANSLATED", "Enter CVE Year": "Enter CVE Year", @@ -216,6 +226,8 @@ "Enter external id value": "NOT TRANSLATED", "Enter external url value": "NOT TRANSLATED", "Enter additional data key": "NOT TRANSLATED", + "Enter Vulnerability Reference": "Enter Vulnerability Reference", + "Enter Assigned External Component Id": "Enter Assigned External Component Id", "Enter additional data value": "NOT TRANSLATED", "End User": "NOT TRANSLATED", "Enter owner's accounting unit": "NOT TRANSLATED", @@ -641,8 +653,11 @@ "Version": "バージョン", "vector": "vector", "Vulnerable Configuration": "Vulnerable Configuration", + "Vulnerability Configuration": "Vulnerability Configuration", "Visual SourceSafe": "ビジュアルソースセーフ", "Vulnerabilities": "脆弱性", + "Vulnerability References": "Vulnerability References", + "Vendor Advisories": "Vendor Advisories", "Vulnerability has been deleted": "Vulnerability has been deleted", "Vulnerability matching statistics": "脆弱性マッチング統計", "Welcome to SW360!": "SW360へようこそ!", diff --git a/messages/vi.json b/messages/vi.json index 479011857..50cf839c2 100644 --- a/messages/vi.json +++ b/messages/vi.json @@ -5,7 +5,11 @@ "<=": "<=", ">=": ">=", "Attachment Usages": "Attachment Usages", + "Assigned External Component Ids": "Assigned External Component Ids", "Application Software": "NOT TRANSLATED", + "Advisory Vendor": "Advisory Vendor", + "Advisory Name": "Advisory Name", + "Advisory Url": "Advisory Url", "Analyst": "NOT TRANSLATED", "Accountant": "NOT TRANSLATED", "Advanced Filter": "Advanced Filter", @@ -75,6 +79,8 @@ "CVE ID": "CVE ID", "complexity": "complexity", "Cloud Service": "NOT TRANSLATED", + "Click to add Assigned External Component Id": "Click to add Assigned External Component Id", + "Click to add Vulnerability Reference": "Click to add Vulnerability Reference", "Click to add row to Additional Data": "NOT TRANSLATED", "Click to add row to External Id": "NOT TRANSLATED", "Click to add row to External Url": "NOT TRANSLATED", @@ -164,6 +170,7 @@ "CPE ID": "CPE ID", "CVS": "CVS", "Created on": "Được Tạo Vào", + "Click to add Vendor Advisory": "Click to add Vendor Advisory", "ClearCase": "ClearCase", "CycloneDX": "CycloneDX", "Clearing summary": "Clearing summary", @@ -209,6 +216,8 @@ "Export SBOM": "Export SBOM", "Edit Projects": "Edit Projects", "External Ids": "NOT TRANSLATED", + "Enter Vulnerability Reference": "Enter Vulnerability Reference", + "Enter Assigned External Component Id": "Enter Assigned External Component Id", "External URLs": "NOT TRANSLATED", "external urls": "NOT TRANSLATED", "Enter external id key": "NOT TRANSLATED", @@ -248,6 +257,9 @@ "Enter Owner Accounting Unit": "Nhập Owner Billing", "Enter Name": "Nhập Tên", "Enter Blog URL": "Nhập Url Blog", + "Enter Advisory Vendor": "Enter Advisory Vendor", + "Enter Advisory Name": "Enter Advisory Name", + "Enter Advisory Url": "Enter Advisory Url", "Enter Wiki URL": "Nhập Url Wiki", "Enter Mailing List URL": "Nhập Url Danh sách gửi thư", "Enter Description": "Nhập Miêu tả", @@ -631,6 +643,7 @@ "vector": "vector", "Vendors": "Nhà cung cấp", "Verification": "Xác minh", + "Vulnerability Configuration": "Vulnerability Configuration", "Vulnerability has been deleted": "Vulnerability has been deleted", "Vulnerability is created": "Vulnerability is created", "Vulnerability with the same External Id already exists": "Vulnerability with the same External Id already exists", @@ -641,6 +654,8 @@ "Vulnerability Summary": "Vulnerability Summary", "Vendor advisories": "Vendor advisories", "Vulnerability scoring": "Vulnerability scoring", + "Vulnerability References": "Vulnerability References", + "Vendor Advisories": "Vendor Advisories", "Vulnerable configurations": "Vulnerable configurations", "Vulnerability matching statistics": "Thống kê phù hợp với lỗ hổng", "Visual SourceSafe": "Nguồn trực quanAn toàn", diff --git a/messages/zh.json b/messages/zh.json index d6206b410..01734abf3 100644 --- a/messages/zh.json +++ b/messages/zh.json @@ -5,8 +5,12 @@ "<=": "<=", ">=": ">=", "Attachment Usages": "Attachment Usages", + "Assigned External Component Ids": "Assigned External Component Ids", "Application Software": "NOT TRANSLATED", "Analyst": "NOT TRANSLATED", + "Advisory Vendor": "Advisory Vendor", + "Advisory Name": "Advisory Name", + "Advisory Url": "Advisory Url", "Add Vulnerability": "Add Vulnerability", "All": "All", "Accountant": "NOT TRANSLATED", @@ -78,6 +82,8 @@ "Categories": "类别", "Commercial Details": "商用详细信息", "Commercial Details Administration": "商业详细信息管理", + "Click to add Assigned External Component Id": "Click to add Assigned External Component Id", + "Click to add Vulnerability Reference": "Click to add Vulnerability Reference", "Cancel": "取消", "Change Log": "更改日志", "Change Log Id": "更改日志 id", @@ -148,6 +154,7 @@ "Clearing Standard": "明确标准", "Cloud Backend": "NOT TRANSLATED", "Change Vulnerability Rating And Action?": "是否更改漏洞等级和操作?", + "Click to add Vendor Advisory": "Click to add Vendor Advisory", "Create Account": "创建账户", "Created By (Email)": "创建者(电子邮件)", "CriticalFilesFound": "Critical Files Found", @@ -214,6 +221,8 @@ "Enter external url key": "NOT TRANSLATED", "Enter external id value": "NOT TRANSLATED", "Enter external url value": "NOT TRANSLATED", + "Enter Vulnerability Reference": "Enter Vulnerability Reference", + "Enter Assigned External Component Id": "Enter Assigned External Component Id", "Enter additional data key": "NOT TRANSLATED", "Enter additional data value": "NOT TRANSLATED", "Enter one word tag": "NOT TRANSLATED", @@ -225,6 +234,9 @@ "Enable Security Vulnerability Monitoring": "NOT TRANSLATED", "ECC": "NOT TRANSLATED", "ECC Comment": "出口管制注释", + "Enter Advisory Vendor": "Enter Advisory Vendor", + "Enter Advisory Name": "Enter Advisory Name", + "Enter Advisory Url": "Enter Advisory Url", "ECC Details": "出口管制详细信息", "Enter Vulnerability External Id": "Enter Vulnerability External Id", "Enter Vulnerability Title": "Enter Vulnerability Title", @@ -624,6 +636,8 @@ "Vulnerability Detail": "Vulnerability Detail", "vector": "vector", "VULNERABILITIES": "VULNERABILITIES", + "Vulnerability References": "Vulnerability References", + "Vendor Advisories": "Vendor Advisories", "Vulnerability has been deleted": "Vulnerability has been deleted", "Vendor Name": "供应商名称", "Vulnerable Configuration": "Vulnerable Configuration", @@ -631,6 +645,7 @@ "Vulnerability Access": "Vulnerability Access", "Vendors": "供应商", "Verification": "検証", + "Vulnerability Configuration": "Vulnerability Configuration", "Vulnerability Summary": "Vulnerability Summary", "Vendor advisories": "Vendor advisories", "Vulnerability scoring": "Vulnerability scoring", diff --git a/src/app/[locale]/vulnerabilities/add/components/AddVulnerability.tsx b/src/app/[locale]/vulnerabilities/add/components/AddVulnerability.tsx index 44dd15d94..e46b929e9 100644 --- a/src/app/[locale]/vulnerabilities/add/components/AddVulnerability.tsx +++ b/src/app/[locale]/vulnerabilities/add/components/AddVulnerability.tsx @@ -27,10 +27,15 @@ import VulnerabilityImpact from '../../components/VulnerabilityImpact' import VulnerabilityAccess from '../../components/VulnerabilityAccess' import { ToastContainer } from 'react-bootstrap' import CVEReferences from '../../components/CVEReferences' +import AddValues from '../../components/AddValues' +import AddVendorAdvisory from '../../components/VendorAdvisories' +import AddKeyValueComponent from '@/components/AddKeyValue' +import InputKeyValue from '@/object-types/InputKeyValue' export default function AddVulnerability({ session }: { session: Session }) { const t = useTranslations(COMMON_NAMESPACE) const router = useRouter() + const [vulnerableConfiguration, setVulnerableConfiguration] = useState([]) const [vulnerabilityData, setVulnerabilityData] = useState({ title: '', description: '', @@ -59,8 +64,19 @@ export default function AddVulnerability({ session }: { session: Session }) { vector: '', }, cveReferences: [], + references: [], + assignedExtComponentIds: [], + vendorAdvisories: [], + vulnerableConfiguration: {}, }) + console.log(vulnerabilityData) + + const setDataVulnerableConfiguration = (config: Map) => { + const obj = Object.fromEntries(config) + setVulnerabilityData((prev) => ({ ...prev, vulnerableConfiguration: obj })) + } + const [toastData, setToastData] = useState({ show: false, type: '', @@ -111,7 +127,14 @@ export default function AddVulnerability({ session }: { session: Session }) { cveReferences: Array.from( new Set(vulnerabilityData.cveReferences.map((elem) => `${elem.year}-${elem.number}`)) ), + references: Array.from(new Set(vulnerabilityData.references)).filter((elem) => elem !== ''), + assignedExtComponentIds: Array.from(new Set(vulnerabilityData.assignedExtComponentIds)).filter( + (elem) => elem !== '' + ), + vendorAdvisories: Array.from(new Set(vulnerabilityData.vendorAdvisories)), + vulnerableConfiguration: vulnerabilityData.vulnerableConfiguration, } + console.log(payload) const response = await ApiUtils.POST('vulnerabilities', payload, session.user.access_token) if (response.status == HttpStatus.CREATED) { const data = await response.json() @@ -168,6 +191,30 @@ export default function AddVulnerability({ session }: { session: Session }) { + + + +
+ +
diff --git a/src/app/[locale]/vulnerabilities/components/AddValues.tsx b/src/app/[locale]/vulnerabilities/components/AddValues.tsx new file mode 100644 index 000000000..57e5e04c1 --- /dev/null +++ b/src/app/[locale]/vulnerabilities/components/AddValues.tsx @@ -0,0 +1,93 @@ +// Copyright (C) Siemens AG, 2023. Part of the SW360 Frontend Project. + +// This program and the accompanying materials are made +// available under the terms of the Eclipse Public License 2.0 +// which is available at https://www.eclipse.org/legal/epl-2.0/ + +// SPDX-License-Identifier: EPL-2.0 +// License-Filename: LICENSE + +'use client' + +import { Dispatch, SetStateAction } from 'react' + +import { useTranslations } from 'next-intl' +import { COMMON_NAMESPACE } from '@/object-types/Constants' + +import { VulnerabilityData } from '@/object-types/VulnerabilityPayload' + +import { FaTrashAlt } from 'react-icons/fa' + +export default function AddValues({ + componentName, + entityName, + payloadKeyName, + payload, + setPayload, +}: { + componentName: string + entityName: string + payloadKeyName: keyof VulnerabilityData + payload: VulnerabilityData + setPayload: Dispatch> +}) { + const t = useTranslations(COMMON_NAMESPACE) + + const addValue = () => { + setPayload((prev: VulnerabilityData) => { + return { ...prev, [payloadKeyName]: [...(prev[payloadKeyName] as string[]), ''] } + }) + } + + const handleChange = ( + e: React.ChangeEvent, + i: number + ) => { + setPayload((prev: VulnerabilityData) => { + const refs = prev[payloadKeyName] as string[] + refs[i] = e.target.value + return { ...prev, [payloadKeyName]: refs } + }) + } + + const deleteValue = (i: number) => { + setPayload((prev: VulnerabilityData) => { + const refs = (prev[payloadKeyName] as string[]).slice() + refs.splice(i, 1) + return { ...prev, [payloadKeyName]: refs } + }) + } + + return ( + <> +
+
+
{t(componentName)}
+
+ {(payload[payloadKeyName] as string[]).map((elem, i) => ( +
+
+ { + handleChange(e, i) + }} + className='form-control' + placeholder={t(`Enter ${entityName}`)} + /> +
+
+ deleteValue(i)} /> +
+
+ ))} +
+ +
+
+ + ) +} diff --git a/src/app/[locale]/vulnerabilities/components/VendorAdvisories.tsx b/src/app/[locale]/vulnerabilities/components/VendorAdvisories.tsx new file mode 100644 index 000000000..586b41925 --- /dev/null +++ b/src/app/[locale]/vulnerabilities/components/VendorAdvisories.tsx @@ -0,0 +1,139 @@ +// Copyright (C) Siemens AG, 2023. Part of the SW360 Frontend Project. + +// This program and the accompanying materials are made +// available under the terms of the Eclipse Public License 2.0 +// which is available at https://www.eclipse.org/legal/epl-2.0/ + +// SPDX-License-Identifier: EPL-2.0 +// License-Filename: LICENSE + +'use client' + +import { Dispatch, SetStateAction } from 'react' + +import { useTranslations } from 'next-intl' +import { COMMON_NAMESPACE } from '@/object-types/Constants' + +import { VulnerabilityData, VendorAdvisory } from '@/object-types/VulnerabilityPayload' + +import { FaTrashAlt } from 'react-icons/fa' + +export default function AddVendorAdvisory({ + payload, + setPayload, +}: { + payload: VulnerabilityData + setPayload: Dispatch> +}) { + const t = useTranslations(COMMON_NAMESPACE) + + const addAdvisory = () => { + setPayload((prev: VulnerabilityData) => { + return { ...prev, vendorAdvisories: [...prev.vendorAdvisories, { vendor: '', name: '', url: '' }] } + }) + } + + const handleChange = ( + e: React.ChangeEvent, + i: number + ) => { + setPayload((prev: VulnerabilityData) => { + const refs = prev.vendorAdvisories + refs[i][e.target.name as keyof VendorAdvisory] = e.target.value + return { ...prev, vendorAdvisories: refs } + }) + } + + const deleteAdvisory = (i: number) => { + setPayload((prev: VulnerabilityData) => { + const refs = prev.vendorAdvisories.slice() + refs.splice(i, 1) + return { ...prev, vendorAdvisories: refs } + }) + } + + return ( + <> +
+
+
{t('Vendor Advisories')}
+
+ {payload.vendorAdvisories.map((elem, i) => ( +
+
+ + { + handleChange(e, i) + }} + className='form-control' + placeholder={t('Enter Advisory Vendor')} + required + /> +
+
+ + { + handleChange(e, i) + }} + className='form-control' + placeholder={t('Enter Advisory Name')} + required + /> +
+
+ + { + handleChange(e, i) + }} + className='form-control' + placeholder={t('Enter Advisory Url')} + required + /> +
+
+ deleteAdvisory(i)} /> +
+
+ ))} +
+ +
+
+ + ) +} diff --git a/src/app/[locale]/vulnerabilities/detail/[id]/components/Summary.tsx b/src/app/[locale]/vulnerabilities/detail/[id]/components/Summary.tsx index 7021cf054..639767dc7 100644 --- a/src/app/[locale]/vulnerabilities/detail/[id]/components/Summary.tsx +++ b/src/app/[locale]/vulnerabilities/detail/[id]/components/Summary.tsx @@ -9,14 +9,14 @@ 'use client' -import { VulnerabilitySummaryDataType } from '@/object-types/VulnerabilitySummaryDataType' +import { VulnerabilityPayload } from '@/object-types/VulnerabilityPayload' import { useTranslations } from 'next-intl' import { COMMON_NAMESPACE } from '@/object-types/Constants' import { useState } from 'react' import Link from 'next/link' import styles from '../detail.module.css' -export default function Summary({ summaryData }: { summaryData: VulnerabilitySummaryDataType }) { +export default function Summary({ summaryData }: { summaryData: VulnerabilityPayload }) { const t = useTranslations(COMMON_NAMESPACE) const [toggle, setToggle] = useState(false) @@ -122,8 +122,8 @@ export default function Summary({ summaryData }: { summaryData: VulnerabilitySum return (
  • {'vendor'}: - {elem.vendor},{'name'}: - {elem.name},{'url'}: {elem.url} + {elem.vendor}, {'name'}: + {elem.name}, {'url'}: {elem.url}
  • ) })} diff --git a/src/app/[locale]/vulnerabilities/detail/[id]/components/VulnerabilityDetailsTab.tsx b/src/app/[locale]/vulnerabilities/detail/[id]/components/VulnerabilityDetailsTab.tsx index 516fc3041..0a07267ba 100644 --- a/src/app/[locale]/vulnerabilities/detail/[id]/components/VulnerabilityDetailsTab.tsx +++ b/src/app/[locale]/vulnerabilities/detail/[id]/components/VulnerabilityDetailsTab.tsx @@ -20,7 +20,7 @@ import { Session } from '@/object-types/Session' import HttpStatus from '@/object-types/enums/HttpStatus' import { signOut } from 'next-auth/react' -import { VulnerabilitySummaryDataType } from '@/object-types/VulnerabilitySummaryDataType' +import { VulnerabilityPayload } from '@/object-types/VulnerabilityPayload' import Summary from './Summary' import { notFound } from 'next/navigation' @@ -33,7 +33,7 @@ export default function VulnerabilityDetailsTab({ vulnerabilityId: string }) { const t = useTranslations(COMMON_NAMESPACE) - const [summaryData, setSummaryData] = useState(undefined) + const [summaryData, setSummaryData] = useState(undefined) useEffect(() => { const controller = new AbortController() diff --git a/src/object-types/VulnerabilityPayload.ts b/src/object-types/VulnerabilityPayload.ts index 686dd1ee6..d7beefc9b 100644 --- a/src/object-types/VulnerabilityPayload.ts +++ b/src/object-types/VulnerabilityPayload.ts @@ -12,6 +12,12 @@ export interface CVEReference { number: string } +export interface VendorAdvisory { + vendor: string + name: string + url: string +} + export interface VulnerabilityData { title: string description: string @@ -40,6 +46,10 @@ export interface VulnerabilityData { vector: string } cveReferences: CVEReference[] + assignedExtComponentIds: string[] + references: string[] + vendorAdvisories: VendorAdvisory[] + vulnerableConfiguration: object } export interface VulnerabilityPayload { @@ -67,4 +77,8 @@ export interface VulnerabilityPayload { vector: string } cveReferences: string[] + assignedExtComponentIds: string[] + references: string[] + vendorAdvisories: VendorAdvisory[] + vulnerableConfiguration: object } diff --git a/src/object-types/VulnerabilitySummaryDataType.ts b/src/object-types/VulnerabilitySummaryDataType.ts deleted file mode 100644 index e8bd5578d..000000000 --- a/src/object-types/VulnerabilitySummaryDataType.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (C) Siemens AG, 2023. Part of the SW360 Frontend Project. - -// This program and the accompanying materials are made -// available under the terms of the Eclipse Public License 2.0 -// which is available at https://www.eclipse.org/legal/epl-2.0/ - -// SPDX-License-Identifier: EPL-2.0 -// License-Filename: LICENSE - -export interface VulnerabilitySummaryDataType { - title: string - description: string - externalId: string - publishDate: string - lastExternalUpdate: string - priority: string - priorityText: string - action: string - impact: { - integrity: string - availability: string - confidentiality: string - } - legalNotice: string - assignedExtComponentIds: string[] - cveReferences: string[] - vendorAdvisories: { - vendor: string - name: string - url: string - }[] - cvss: string - cvssTime: string - access: { - complexity: string - vector: string - authentication: string - } - cwe: string - vulnerableConfiguration: object -}