Skip to content

Commit

Permalink
Merge pull request #266 from kac89/dev
Browse files Browse the repository at this point in the history
cvss dialog update
  • Loading branch information
kac89 authored Oct 3, 2023
2 parents 89a9a88 + c2d81ad commit cb7cadd
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 35 deletions.
6 changes: 5 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ import { DialogAddreportprofileComponent } from './dialog-addreportprofile/dialo
import { DialogApierrorComponent } from './dialog-apierror/dialog-apierror.component';
import { DialogReportcssComponent } from './dialog-reportcss/dialog-reportcss.component';
import { NoSanitizePipe } from './nosanitizerpipe';
import { ClipboardModule } from '@angular/cdk/clipboard';
import { MatTooltipModule } from '@angular/material/tooltip';

@NgModule({
declarations: [
Expand Down Expand Up @@ -138,7 +140,9 @@ import { NoSanitizePipe } from './nosanitizerpipe';
MatRadioModule,
HammerModule,
MatProgressBarModule,
NgxChartsModule
NgxChartsModule,
ClipboardModule,
MatTooltipModule
],
providers: [MessageService, IndexeddbService, DatePipe],
exports: [],
Expand Down
33 changes: 22 additions & 11 deletions src/app/dialog-cvss/dialog-cvss.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h1 class="mat-display">
<div fxFlex="25%" fxFlex.sm="25%" fxFlex.xs="100%">
<label title="This metric reflects the context by which vulnerability exploitation is possible. The Base Score increases the more remote (logically, and physically) an attacker can be in order to exploit the vulnerable component."><b>Attack Vector (AV)</b></label><br>
<mat-radio-group class="example-radio-group" [(ngModel)]="selectedAnswers[0]">
<mat-radio-button class="example-radio-button" (change)="AVonclick(item)" *ngFor="let item of AV"
<mat-radio-button class="example-radio-button" [matTooltip]="item[1]" (change)="AVonclick(item)" *ngFor="let item of AV"
[value]="">
{{item[0]}}
</mat-radio-button>
Expand All @@ -21,7 +21,7 @@ <h1 class="mat-display">
<div fxFlex="25%" fxFlex.sm="25%" fxFlex.xs="100%">
<label title="This metric describes the conditions beyond the attacker’s control that must exist in order to exploit the vulnerability. Such conditions may require the collection of more information about the target or computational exceptions. The assessment of this metric excludes any requirements for user interaction in order to exploit the vulnerability. If a specific configuration is required for an attack to succeed, the Base metrics should be scored assuming the vulnerable component is in that configuration."><b>Attack Complexity (AC)</b></label><br>
<mat-radio-group class="example-radio-group" [(ngModel)]="selectedAnswers[1]">
<mat-radio-button class="example-radio-button" (change)="AConclick(item)" *ngFor="let item of AC"
<mat-radio-button class="example-radio-button" [matTooltip]="item[1]" (change)="AConclick(item)" *ngFor="let item of AC"
[value]="">
{{item[0]}}
</mat-radio-button>
Expand All @@ -31,7 +31,7 @@ <h1 class="mat-display">
<div fxFlex="25%" fxFlex.sm="25%" fxFlex.xs="100%">
<label title="This metric describes the level of privileges an attacker must possess before successfully exploiting the vulnerability."><b>Privileges Required (PR)</b></label><br>
<mat-radio-group class="example-radio-group" [(ngModel)]="selectedAnswers[2]">
<mat-radio-button class="example-radio-button" (change)="PRonclick(item)" *ngFor="let item of PR"
<mat-radio-button class="example-radio-button" [matTooltip]="item[1]" (change)="PRonclick(item)" *ngFor="let item of PR"
[value]="">
{{item[0]}}
</mat-radio-button>
Expand All @@ -41,7 +41,7 @@ <h1 class="mat-display">
<div fxFlex="25%" fxFlex.sm="25%" fxFlex.xs="100%">
<label title="This metric captures the requirement for a user, other than the attacker, to participate in the successful compromise the vulnerable component. This metric determines whether the vulnerability can be exploited solely at the will of the attacker, or whether a separate user (or user-initiated process) must participate in some manner."><b>User Interaction (UI)</b></label><br>
<mat-radio-group class="example-radio-group" [(ngModel)]="selectedAnswers[3]">
<mat-radio-button class="example-radio-button" (change)="UIonclick(item)" *ngFor="let item of UI"
<mat-radio-button class="example-radio-button" [matTooltip]="item[1]" (change)="UIonclick(item)" *ngFor="let item of UI"
[value]="">
{{item[0]}}
</mat-radio-button>
Expand All @@ -56,7 +56,7 @@ <h1 class="mat-display">
<div fxFlex="25%" fxFlex.sm="25%" fxFlex.xs="100%">
<label title="Does a successful attack impact a component other than the vulnerable component? If so, the Base Score increases and the Confidentiality, Integrity and Authentication metrics should be scored relative to the impacted component."><b>Scope (S)</b></label><br>
<mat-radio-group class="example-radio-group" [(ngModel)]="selectedAnswers[4]">
<mat-radio-button class="example-radio-button" (change)="Sonclick(item)" *ngFor="let item of S"
<mat-radio-button class="example-radio-button" [matTooltip]="item[1]" (change)="Sonclick(item)" *ngFor="let item of S"
[value]="">
{{item[0]}}
</mat-radio-button>
Expand All @@ -66,7 +66,7 @@ <h1 class="mat-display">
<div fxFlex="25%" fxFlex.sm="25%" fxFlex.xs="100%">
<label title="This metric measures the impact to the confidentiality of the information resources managed by a software component due to a successfully exploited vulnerability. Confidentiality refers to limiting information access and disclosure to only authorized users, as well as preventing access by, or disclosure to, unauthorized ones."><b>Confidentiality Impact (C)</b></label><br>
<mat-radio-group class="example-radio-group" [(ngModel)]="selectedAnswers[5]">
<mat-radio-button class="example-radio-button" (change)="Conclick(item)" *ngFor="let item of C"
<mat-radio-button class="example-radio-button" [matTooltip]="item[1]" (change)="Conclick(item)" *ngFor="let item of C"
[value]="">
{{item[0]}}
</mat-radio-button>
Expand All @@ -76,7 +76,7 @@ <h1 class="mat-display">
<div fxFlex="25%" fxFlex.sm="25%" fxFlex.xs="100%">
<label title="This metric measures the impact to integrity of a successfully exploited vulnerability. Integrity refers to the trustworthiness and veracity of information."><b>Integrity Impact (I)</b></label><br>
<mat-radio-group class="example-radio-group" [(ngModel)]="selectedAnswers[6]">
<mat-radio-button class="example-radio-button" (change)="Ionclick(item)" *ngFor="let item of I"
<mat-radio-button class="example-radio-button" [matTooltip]="item[1]" (change)="Ionclick(item)" *ngFor="let item of I"
[value]="">
{{item[0]}}
</mat-radio-button>
Expand All @@ -86,17 +86,28 @@ <h1 class="mat-display">
<div fxFlex="25%" fxFlex.sm="25%" fxFlex.xs="100%">
<label title="This metric measures the impact to the availability of the impacted component resulting from a successfully exploited vulnerability. It refers to the loss of availability of the impacted component itself, such as a networked service (e.g., web, database, email). Since availability refers to the accessibility of information resources, attacks that consume network bandwidth, processor cycles, or disk space all impact the availability of an impacted component."><b>Availability Impact (A)</b></label><br>
<mat-radio-group class="example-radio-group" [(ngModel)]="selectedAnswers[7]">
<mat-radio-button class="example-radio-button" (change)="Aonclick(item)" *ngFor="let item of A"
<mat-radio-button class="example-radio-button" [matTooltip]="item[1]" (change)="Aonclick(item)" *ngFor="let item of A"
[value]="">
{{item[0]}}
</mat-radio-button>
</mat-radio-group>
</div>

</div>
<hr>
<div>{{selectedItem}}</div>


<mat-form-field class="example-full-width" color="accent">
<mat-label>Score Vector</mat-label>
<input [formControl]="scorevector" matInput placeholder="CVSS:3.1/AV:_/AC:_/PR:_/UI:_/S:_/C:_/I:_/A:_" value="">
<button matSuffix mat-icon-button #tooltip="matTooltip" aria-label="Copy score vector" title="Copy score vector" color="accent" [cdkCopyToClipboard]="scorevector.value" (click)="copyText()" life="1000" tooltipEvent="focus" matTooltip="Copy to clipboard" matTooltipPosition="below">
<mat-icon>content_copy</mat-icon>
</button>

</mat-form-field>

<div *ngIf="mobile">
<hr>
<div>{{selectedItem}}</div>
</div>

</mat-dialog-content>
<mat-dialog-actions align="start">
Expand Down
Loading

0 comments on commit cb7cadd

Please sign in to comment.