-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Thomas Junk
committed
Sep 4, 2023
1 parent
4fc9b4f
commit c047a17
Showing
3 changed files
with
99 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
<script lang="ts"> | ||
import { appStore } from "$lib/store"; | ||
import Vulnerability from "./Vulnerability.svelte"; | ||
$: vulnerabilities = $appStore.doc?.vulnerabilities; | ||
</script> | ||
|
||
<div /> | ||
<div> | ||
{#each vulnerabilities as vulnerability, index} | ||
<Vulnerability {vulnerability} index={index + 1} /> | ||
{/each} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<script lang="ts"> | ||
import Collapsible from "$lib/Collapsible.svelte"; | ||
export let vulnerability: any; | ||
export let index: number = 1; | ||
let header = `Vulnerability ${index}`; | ||
$: if (vulnerability.cve) { | ||
header = vulnerability.cve; | ||
} | ||
</script> | ||
|
||
<div> | ||
<Collapsible {header} class_="text-primary" index="3"> | ||
<div> | ||
<dl> | ||
{#if vulnerability.title} | ||
<dt>Title</dt> | ||
<dd>{vulnerability.title}</dd> | ||
{/if} | ||
{#if vulnerability.cwe} | ||
<dt>CWE ID</dt> | ||
<dd>{vulnerability.cwe.id}</dd> | ||
<dt>CWE Name</dt> | ||
<dd>{vulnerability.cwe.name}</dd> | ||
{/if} | ||
{#if vulnerability.discovery_date} | ||
<dt>Discovery date</dt> | ||
<dd>{vulnerability.discovery_date}</dd> | ||
{/if} | ||
{#if vulnerability.release_date} | ||
<dt>Release date</dt> | ||
<dd>{vulnerability.release_date}</dd> | ||
{/if} | ||
</dl> | ||
{#if vulnerability.ids && Array.isArray(vulnerability.ids)} | ||
<Collapsible header="IDs" index="4"> | ||
{#each vulnerability.ids as vulnerabilityID} | ||
<dl> | ||
<dt>Systemname</dt> | ||
<dd>{vulnerabilityID.system_name}</dd> | ||
<dt>Text</dt> | ||
<dd>{vulnerabilityID.text}</dd> | ||
</dl> | ||
{/each} | ||
</Collapsible> | ||
{/if} | ||
{#if vulnerability.notes && Array.isArray(vulnerability.notes)} | ||
<Collapsible header="Notes" index="4"> | ||
{#each vulnerability.notes as note} | ||
<dl> | ||
<dt>Title</dt> | ||
<dd>{note.title}</dd> | ||
<dt>Category</dt> | ||
<dd>{note.category}</dd> | ||
<dt>Text</dt> | ||
<dd>{note.text}</dd> | ||
</dl> | ||
{/each} | ||
</Collapsible> | ||
{/if} | ||
</div> | ||
</Collapsible> | ||
</div> | ||
|
||
<style> | ||
dt { | ||
font-size: large; | ||
float: left; | ||
clear: left; | ||
width: 15%; | ||
} | ||
dd { | ||
margin-bottom: 0.3em; | ||
} | ||
</style> |