Skip to content

Commit

Permalink
Merge pull request #260 from devsecopsmaturitymodel/feat/openCRE
Browse files Browse the repository at this point in the history
feat: add openCRE
  • Loading branch information
wurstbrot authored Nov 23, 2023
2 parents e3eefee + 9a0031b commit 022f03a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,20 @@ <h1>
<li>{{ iso22 }}</li>
</ul>
</mat-expansion-panel>
<mat-expansion-panel>
<mat-expansion-panel-header>
<mat-panel-title>
<b>{{ openCREVersion }}</b>
</mat-panel-title>
</mat-expansion-panel-header>
<ul *ngFor="let openCRE of currentActivity.openCRE">
<li>
<a target="_blank" href="{{ openCRE }}">
<div [innerHTML]="currentActivity.uuid"></div>
</a>
</li>
</ul>
</mat-expansion-panel>
</mat-accordion>
</p>
</mat-expansion-panel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,17 @@ describe('ActivityDescriptionComponent', () => {
);
});

it('check if references is being genenrated', () => {
it('check if references is being generated', () => {
const testSAMM = [' Sample SAMM '];
const testISO = [' Sample ISO'];
const testISO22 = [' Sample ISO22'];
const uuid = 'abcd'; // for openCRE

component.currentActivity.samm = testSAMM;
component.currentActivity.iso = testISO;
component.currentActivity.iso22 = testISO22;
component.currentActivity.uuid = uuid;

fixture.detectChanges();
const HTMLElement: HTMLElement = fixture.nativeElement;
const contentDisplayedinParagraphTag = HTMLElement.querySelectorAll('p')!;
Expand All @@ -140,7 +144,9 @@ describe('ActivityDescriptionComponent', () => {
component.ISOVersion +
testISO[0] +
component.ISO22Version +
testISO22[0]
testISO22[0] +
component.openCREVersion +
uuid
);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export interface activityDescription {
iso: string[];
iso22: string[];
samm: string[];
openCRE: string[];
knowledge: number;
resources: number;
time: number;
Expand Down Expand Up @@ -57,6 +58,7 @@ export class ActivityDescriptionComponent implements OnInit {
samm: [''],
iso: [''],
iso22: [''],
openCRE: [''],
knowledge: -1,
resources: -1,
time: -1,
Expand All @@ -78,6 +80,7 @@ export class ActivityDescriptionComponent implements OnInit {
SAMMVersion: string = 'OWASP SAMM VERSION 2';
ISOVersion: string = 'ISO 27001:2017';
ISO22Version: string = 'ISO 27001:2022';
openCREVersion: string = 'OpenCRE';
@ViewChildren(MatAccordion) accordion!: QueryList<MatAccordion>;
constructor(private route: ActivatedRoute, private yaml: ymlService) {}

Expand Down Expand Up @@ -170,6 +173,10 @@ export class ActivityDescriptionComponent implements OnInit {
data['references']['samm2'],
[]
);
this.currentActivity.openCRE = this.defineStringArrayValues(
data['references']['openCRE'],
[]
);
} catch {
console.log('references does not exist');
}
Expand Down

0 comments on commit 022f03a

Please sign in to comment.