Skip to content

Commit

Permalink
pass allow analytics flag to snyk-iac-test [IAC-3017]
Browse files Browse the repository at this point in the history
  • Loading branch information
ioannacaba committed Sep 13, 2024
1 parent 5f88825 commit 88f9d6c
Showing 1 changed file with 5 additions and 0 deletions.
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()) {
flags.push('-allow-analytics');
}

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

0 comments on commit 88f9d6c

Please sign in to comment.