Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Commit 62e865f

Browse files
committed
Fixing the label scan-type for all subsequent scans
1 parent c404682 commit 62e865f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

hooks/imperative-subsequent-scans/scan-helpers.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ async function startSubsequentSecureCodeBoxScan({
4141
},
4242
};
4343

44+
// Changing label 'scan-type' (if defined by parent scan) to to the given scanType for the subsequent scan
45+
if( scanDefinition.metadata.labels && scanDefinition.metadata.labels['scan-type'] ) {
46+
scanDefinition.metadata.labels['scan-type'] = scanType;
47+
}
48+
4449
try {
4550
// Starting another subsequent sslyze scan based on the nmap results
4651
// found at: https://github.com/kubernetes-client/javascript/blob/79736b9a608c18d818de61a6b44503a08ea3a78f/src/gen/api/customObjectsApi.ts#L209

0 commit comments

Comments
 (0)