This repository was archived by the owner on Oct 14, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
hooks/declarative-subsequent-scans Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ kc.loadFromDefault();
66
77const k8sApiCRD = kc . makeApiClient ( k8s . CustomObjectsApi ) ;
88
9+ const namespace = process . env [ "NAMESPACE" ] ;
10+
911export async function startSubsequentSecureCodeBoxScan ( {
1012 name,
1113 parentScan,
@@ -57,12 +59,11 @@ export async function startSubsequentSecureCodeBoxScan({
5759 console . log ( `Starting Scan ${ name } ` ) ;
5860
5961 try {
60- // Starting another subsequent sslyze scan based on the nmap results
61- // found at: https://github.com/kubernetes-client/javascript/blob/79736b9a608c18d818de61a6b44503a08ea3a78f/src/gen/api/customObjectsApi.ts#L209
62+ // Submitting the Scan to the kubernetes api
6263 await k8sApiCRD . createNamespacedCustomObject (
6364 "execution.experimental.securecodebox.io" ,
6465 "v1" ,
65- "default" ,
66+ namespace ,
6667 "scans" ,
6768 scanDefinition ,
6869 "false"
@@ -75,7 +76,6 @@ export async function startSubsequentSecureCodeBoxScan({
7576
7677export async function getCascadingRulesFromCluster ( ) {
7778 try {
78- const namespace = process . env [ "NAMESPACE" ] ;
7979 const response : any = await k8sApiCRD . listNamespacedCustomObject (
8080 "cascading.experimental.securecodebox.io" ,
8181 "v1" ,
You can’t perform that action at this time.
0 commit comments