File tree 5 files changed +15
-6
lines changed
local-cache/policy-engine/constants
5 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ const keys: (keyof IaCTestFlags)[] = [
22
22
'scan' ,
23
23
'experimental' ,
24
24
'var-file' ,
25
+ 'detectionDepth' ,
25
26
// PolicyOptions
26
27
'ignore-policy' ,
27
28
'policy-path' ,
Original file line number Diff line number Diff line change @@ -54,6 +54,8 @@ async function prepareTestConfig(
54
54
const projectTags = parseTags ( options ) ;
55
55
const targetName = getFlag ( options , 'target-name' ) ;
56
56
const remoteRepoUrl = getFlag ( options , 'remote-repo-url' ) ;
57
+ const depthDetection =
58
+ parseInt ( getFlag ( options , 'depth-detection' ) as string ) || undefined ;
57
59
const attributes = parseAttributes ( options ) ;
58
60
const policy = await findAndLoadPolicy ( process . cwd ( ) , 'iac' , options ) ;
59
61
const scan = options . scan ?? 'resource-changes' ;
@@ -73,6 +75,7 @@ async function prepareTestConfig(
73
75
remoteRepoUrl,
74
76
policy : policy ?. toString ( ) ,
75
77
scan,
78
+ depthDetection,
76
79
} ;
77
80
}
78
81
Original file line number Diff line number Diff line change 1
1
import * as os from 'os' ;
2
2
3
- const policyEngineChecksums = `2b96e44012ab42e6a181a954c83af374e1bbdcb0f39782504421730615dd8b0d snyk-iac-test_0.25.0_Windows_arm64.exe
4
- 6ed11a2f3fed1a382a69e5ad47eed37951490688dc0d0ea31c15b81e6022a98c snyk-iac-test_0.25.0_Linux_arm64
5
- 94cf0ffdb75108f826f2df2495f579c48e016f1fc5b63f25205f79a72523930d snyk-iac-test_0.25.0_Windows_x86_64.exe
6
- af7c9d6334cb6bc2af981a950035eeca755c26a366a7142e5b3774341104a80c snyk-iac-test_0.25.0_Darwin_x86_64
7
- e6f8838f419d8639b2358d84b134d0abd2cc6c855730db5ab27464f32911d8c2 snyk-iac-test_0.25.0_Darwin_arm64
8
- e89838a2d41ebc90e4575558c09074044b3e2966494590fa13b31efe9ed3efc6 snyk-iac-test_0.25.0_Linux_x86_64
3
+ const policyEngineChecksums = `104f3a8d8d1835f9621007fb7976a837ee8946510f41f7fc50323f728cebb21c snyk-iac-test_0.26.0_Darwin_arm64
4
+ 61bfc743d4392952eb7de3f3c4cdb6e0dfb4a491d0ca24d67c929fc3656d6c5f snyk-iac-test_0.26.0_Linux_x86_64
5
+ 73847b5bcc0f42cc8acd918f0dff97ee917a64ce84991785a8e6c46a6c4bc6f2 snyk-iac-test_0.26.0_Linux_arm64
6
+ ac9100c8a1314a22fe7db7df8faa7d6be0aa6ba986f2db172f727fe004a0853d snyk-iac-test_0.26.0_Windows_x86_64.exe
7
+ ad2983ff583989608e259441de12b6871d9e9dcb994eb81214e9dbb14d3b3dd4 snyk-iac-test_0.26.0_Darwin_x86_64
8
+ c7de20ee54fd66c885e2bbe37b8c1d533464a525a5abdbc1d86a6a5c8a76b2b8 snyk-iac-test_0.26.0_Windows_arm64.exe
9
9
` ;
10
10
11
11
export const policyEngineVersion = getPolicyEngineVersion ( ) ;
Original file line number Diff line number Diff line change @@ -113,6 +113,10 @@ function processFlags(
113
113
flags . push ( '-project-lifecycle' , options . attributes . lifecycle . join ( ',' ) ) ;
114
114
}
115
115
116
+ if ( options . depthDetection ) {
117
+ flags . push ( '-depth-detection' , `${ options . depthDetection } ` ) ;
118
+ }
119
+
116
120
if ( options . projectTags ) {
117
121
const stringifiedTags = options . projectTags
118
122
. map ( ( tag ) => {
Original file line number Diff line number Diff line change @@ -17,4 +17,5 @@ export interface TestConfig {
17
17
remoteRepoUrl ?: string ;
18
18
policy ?: string ;
19
19
scan : string ;
20
+ depthDetection ?: number ;
20
21
}
You can’t perform that action at this time.
0 commit comments