Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(iac):pass allow analytics flag to snyk-iac-test [IAC-3017] #5484

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as os from 'os';

const policyEngineChecksums = `
102442f1a622c4006207b5fb3822ea493000fe711beeb1341359f14057872b67 snyk-iac-test_0.54.0_Darwin_arm64
11cc1ed464380932cf46551a1a1eb8fbaea0cae2da0853b7dccbe58d872bc44e snyk-iac-test_0.54.0_Linux_arm64
238cb88c2315d9bcca9a7f9a277934074f50902fdd595572cd739f4601b25ed1 snyk-iac-test_0.54.0_Linux_x86_64
487291b0193f3ed1a6647c631dfaa401faa81509d6c7fa328e1f29296115668b snyk-iac-test_0.54.0_Darwin_x86_64
c94f91823e135c9e585bb41e5c274116001f079a28865a62e19ff9c8688a88e0 snyk-iac-test_0.54.0_Windows_x86_64.exe
0946d45f8a4a2108af5019a54aeabee9a06c03830fd23a42ce59b914863e14b4 snyk-iac-test_0.55.0_Darwin_arm64
1b94bc7f10336732d67cba8afcff7536ddd6ee2bfe3aa7160e0ca70addcf9ecd snyk-iac-test_0.55.0_Linux_arm64
30b32dd4a4b366a79dc730193a9828219a99a2d0af3ec5754fc6b890e0a6cc37 snyk-iac-test_0.55.0_Darwin_x86_64
9ad3597d28590b21ecc7d74835d9fe734d5a45e52e5bedb4957adea3c21d41c4 snyk-iac-test_0.55.0_Windows_x86_64.exe
efd13679aeede92d549f0ead0f16d394e6efed376fc8718fadc653faa0941a35 snyk-iac-test_0.55.0_Linux_x86_64
`;

export const policyEngineVersion = getPolicyEngineVersion();
Expand Down
5 changes: 5 additions & 0 deletions src/lib/iac/test/v2/scan/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import config from '../../../../config';
import { api, getOAuthToken } from '../../../../api-token';
import envPaths from 'env-paths';
import { restoreEnvProxy } from '../../../env-utils';
import * as analytics from '../../../../analytics';

const debug = newDebug('snyk-iac');
const debugOutput = newDebug('snyk-iac:output');
Expand Down Expand Up @@ -129,6 +130,10 @@ function processFlags(
// required for infrastructureAsCodeSuccesses to be populated
flags.push('-include-passed-vulnerabilities');

if (analytics.allowAnalytics()) {
andreeaneata marked this conversation as resolved.
Show resolved Hide resolved
flags.push('-allow-analytics');
}

if (options.severityThreshold) {
flags.push('-severity-threshold', options.severityThreshold);
}
Expand Down
Loading