Skip to content

SVIP-ui v1.2.1-alpha Pre-Release #228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
53d617b
Repair implementation
jwj7297 Nov 7, 2023
e3c4e52
Fixed [Object object] for non string fixes
jwj7297 Nov 8, 2023
e0e11c6
updated changelog
jwj7297 Nov 10, 2023
cdccdd7
Refreshes sbom on repair
jwj7297 Nov 10, 2023
255a9e5
rebrand readme and changelog
amandanitta Nov 11, 2023
010a64a
Fixed delete invalid sboms
jwj7297 Nov 14, 2023
a958954
Removed toolbar
jwj7297 Nov 14, 2023
6e59151
Merge pull request #221 from SoftwareDesignLab/dev-rebrand
amandanitta Nov 14, 2023
4a7c62c
Update ReadMe with word GUI
amandanitta Nov 14, 2023
5788987
Removed "repair" text for button
jwj7297 Nov 14, 2023
4e182d4
Removed SVIP from generate
jwj7297 Nov 14, 2023
4ba9aef
Merge pull request #222 from SoftwareDesignLab/dev-rebrand-ui
amandanitta Nov 14, 2023
b1a9400
Merge branch 'dev' into dev-repairImplementation
jwj7297 Nov 16, 2023
9eac9bc
Updated logo
jwj7297 Nov 16, 2023
e64206d
Fixed modal scaling
jwj7297 Nov 16, 2023
450007c
Removed repair text again
jwj7297 Nov 16, 2023
5b2413f
Merge pull request #218 from SoftwareDesignLab/dev-repairImplementation
amandanitta Nov 20, 2023
423ea78
update package json
amandanitta Nov 22, 2023
c37364f
Uses /project route for valid tools
jwj7297 Nov 23, 2023
1797b70
added purpose
amandanitta Nov 24, 2023
a8c7288
spelling error
amandanitta Nov 24, 2023
b509f4b
Merge pull request #225 from SoftwareDesignLab/dev-osiRefactor
dlg1206 Nov 28, 2023
9e1eb05
Merge pull request #224 from SoftwareDesignLab/dev-update-json
jwj7297 Nov 28, 2023
569216f
Added XML Options
jwj7297 Nov 29, 2023
d44cbc6
Update changelog.md
jwj7297 Nov 30, 2023
6fffe67
Merge pull request #227 from SoftwareDesignLab/dev-readme
dlg1206 Nov 30, 2023
7e458a3
Fixed convert option
jwj7297 Nov 30, 2023
c341362
Merge pull request #226 from SoftwareDesignLab/dev-xmlCDXSupport
dlg1206 Nov 30, 2023
9e367f7
update readme version
dlg1206 Nov 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions doc/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v1.2.1] - (11/29/23)
### Added
- Support for XML CDX SBOM's in Convert and Generate added

## [v1.2.0] - (11/10/23)
### Added
- Repair Button shows Repair Modal for fixing issues

## [v1.1.1] - (11/10/23)
- Change name from SVIP to SBOM-in-a-Box to better represent the platform

## [v1.1.0] - (9/28/23)
### Added
- Can download `vex` and `metrics` reports
Expand Down
109 changes: 55 additions & 54 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 10 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
# SBOM Visualization and Integration Platform GUI

> The SBOM Visualization and Integration Platform (**SVIP**) is a unified platform to promote the
# SBOM-in-a-Box GUI
> The **SBOM-in-a-Box** is a unified platform to promote the
> production, consumption, and utilization of Software Bills of Materials.
> This includes conversion between schemas, generation, comparision and evaluation of quality.

# Purpose of SBOM-in-a-Box
> SBOM-in-a-box has unique features including generation of SBOMs using multiple tools that allow for a more a complete SBOM to be created. There is also a feature within metrics, where the tool provides suggestions if there is a potential better way to showcase the attributes. There is also the ability to convert between SPDX and CycloneDX SBOM schemas, and to gain insight into vulnerabilities of software through SBOMs. These features allow for developers to create an SBOM that is the most relevant and suits their needs.

# SBOM-in-a-Box GUI
This serves as the front-end and human interaction with our software.

### Latest Release: [[v1.1.0] - (9/28/23)](doc/changelog.md)
### Latest Release: [[v1.2.1] - (11/30/23)](doc/changelog.md)

### System Requirements

- Requires Node >= 18.12.1

### Quick Start

1. Follow the [SVIP API](https://github.com/SoftwareDesignLab/SVIP/tree/main#quick-start) quick start to launch the backend
1. Follow the [SBOM-in-a-Box API](https://github.com/SoftwareDesignLab/SVIP/tree/main#quick-start) quick start to launch the backend
2. `npm ci`
3. `npm start`

Expand Down
2 changes: 1 addition & 1 deletion src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div id="main-wrapper">
<app-navbar />
<app-navbar/>
<div class="body flex" style="overflow-y: auto;">
<app-upload/>
<app-view *ngIf="routing.GetPage() === 1"/>
Expand Down
12 changes: 6 additions & 6 deletions src/app/features/metrics/metrics/metrics.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<ng-template #metadata>
<div class="list">
<!-- Test results -->
<ng-container *ngFor="let testResult of getTestResults('metadata')">
<ng-container *ngFor="let testResult of getTestResults('0')">
<app-accordion *ngIf="isFiltered(testResult)">
<div title class="test-result">
<span>
Expand Down Expand Up @@ -54,7 +54,7 @@
</div>
<span body class="flex error-result">
{{ testResult.details }}
<app-button style="margin-left: auto;" text="Repair" (click)="openRepairModal(testResult.details)" *ngIf="testResult.status === 'FAIL'" icon="build"></app-button>
<app-button style="margin-left: auto;" (click)="openRepairModal(testResult, '0')" *ngIf="testResult.status === 'FAIL' && testResult.fixes.length > 0" icon="build"></app-button>
</span>
</app-accordion>
</ng-container>
Expand All @@ -67,11 +67,11 @@
<app-accordion
*ngIf="
component &&
component.key !== 'metadata' &&
component.key !== '0' &&
getTestResults(component.key).length
"
>
<div title class="component-title">{{ component.key }}</div>
<div title class="component-title">{{ this.qa.hashCodeMapping[component.key] }}</div>
<div body>
<!-- Test results -->
<ng-container
Expand Down Expand Up @@ -107,7 +107,7 @@
</div>
<span body class="flex error-result">
{{ testResult.details }}
<app-button style="margin-left: auto;" text="Repair" (click)="openRepairModal(testResult.details)" *ngIf="testResult.status === 'FAIL'" icon="build"></app-button>
<app-button style="margin-left: auto;" (click)="openRepairModal(testResult, component.key)" *ngIf="testResult.status === 'FAIL' && testResult.fixes.length > 0" icon="build"></app-button>
</span>
</app-accordion>
</ng-container>
Expand Down Expand Up @@ -137,4 +137,4 @@
</ng-template>
</app-viewer>

<app-repair-modal [selectedErrorMessage]="returnMessage()" [opened] = "repairModal" (close)="repairModal = false"/>
<app-repair-modal [sbomID]="sbomID" [error]="selectedError" [opened] = "repairModal" (close)="repairModal = false"/>
48 changes: 26 additions & 22 deletions src/app/features/metrics/metrics/metrics.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ export class MetricsComponent implements OnInit {
components: { [componentName: string]: testResult[] } = {};
attributes: filter = {};
name: string = '';
sbomID: number = 0;
palettes = palettes;
selectedErrorMessage: string = '';
selectedError: any = {};
public repairModal: boolean = false;
private _palette = PALETTE.DEFAULT;
get palette() {
Expand Down Expand Up @@ -61,6 +62,7 @@ export class MetricsComponent implements OnInit {
const sbom = data;

this.name = data.fileName;
this.sbomID = sbom.id;
SVIP.gradeSBOM(sbom.id).subscribe((qa) => {
if (qa) {
this.qa = qa;
Expand All @@ -75,23 +77,18 @@ export class MetricsComponent implements OnInit {

getKeys() {
// Components
Object.keys(this.qa.components).forEach((component) => {
Object.keys(this.qa.results).forEach((component) => {
this.components[component] = [];
const componentTestNames = Object.keys(this.qa.components[component]);
const tests = componentTestNames;
// Component tests
tests.forEach((test: any) => {
// test results
this.qa.components[component][test].forEach((testResult: any) => {
this.components[component].push(testResult);
if (testResult.status !== 'ERROR') {
const processors = testResult.attributes as string[];
// Processors/Attributes
processors.forEach((processor: string) => {
this.attributes[processor] = { shown: true, color: '' };
});
}
});

this.qa.results[component].forEach((testResult: any) => {
this.components[component].push(testResult);
if (testResult.status !== 'ERROR') {
const processors = testResult.attributes as string[];
// Processors/Attributes
processors.forEach((processor: string) => {
this.attributes[processor] = { shown: true, color: '' };
});
}
});
});
this.setColor();
Expand Down Expand Up @@ -132,14 +129,14 @@ export class MetricsComponent implements OnInit {
this.downloadService.Download(fileName, new Blob([reportJson], { type: 'application/json' }));
}

openRepairModal(errorMessage: string) {
console.log('Error Message:', errorMessage);
this.selectedErrorMessage = errorMessage;
openRepairModal(test: any, id: string) {
this.selectedError = test;
this.selectedError.id = id;
this.repairModal = true;
}

returnMessage(){
return this.selectedErrorMessage;
selectedTest(){
return this.selectedError;
}
}

Expand All @@ -149,4 +146,11 @@ interface testResult {
message: string;
details: string;
status: string;
fixes: fix<Object>[];
}

interface fix<T> {
old: T;
new: T;
type: any;
}
Loading