snyk 1.892.0 → 1.893.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/784.index.js +101 -2
- package/dist/cli/784.index.js.map +1 -1
- package/dist/cli/917.index.js +13 -6
- package/dist/cli/917.index.js.map +1 -1
- package/dist/lib/formatters/iac-output/index.d.ts +5 -0
- package/dist/lib/formatters/{iac-output.d.ts → iac-output/v1/index.d.ts} +2 -2
- package/dist/lib/formatters/iac-output/v2/index.d.ts +4 -0
- package/dist/lib/formatters/test/display-result.d.ts +5 -1
- package/package.json +1 -1
package/dist/cli/917.index.js
CHANGED
|
@@ -1703,7 +1703,7 @@ const types_1 = __webpack_require__(55246);
|
|
|
1703
1703
|
const iac_test_result_1 = __webpack_require__(46816);
|
|
1704
1704
|
const formatters_1 = __webpack_require__(81329);
|
|
1705
1705
|
const utils = __webpack_require__(77978);
|
|
1706
|
-
const iac_output_1 = __webpack_require__(
|
|
1706
|
+
const iac_output_1 = __webpack_require__(68145);
|
|
1707
1707
|
const ecosystems_1 = __webpack_require__(5168);
|
|
1708
1708
|
const vuln_helpers_1 = __webpack_require__(14784);
|
|
1709
1709
|
const format_test_results_1 = __webpack_require__(59744);
|
|
@@ -1719,6 +1719,7 @@ const protect_update_notification_1 = __webpack_require__(79304);
|
|
|
1719
1719
|
const spotlight_vuln_notification_1 = __webpack_require__(24083);
|
|
1720
1720
|
const assert_iac_options_flag_1 = __webpack_require__(68590);
|
|
1721
1721
|
const assert_iac_options_flag_2 = __webpack_require__(68590);
|
|
1722
|
+
const feature_flags_1 = __webpack_require__(63011);
|
|
1722
1723
|
const debug = Debug('snyk-test');
|
|
1723
1724
|
const SEPARATOR = '\n-------------------------------------------------------\n';
|
|
1724
1725
|
// TODO: avoid using `as any` whenever it's possible
|
|
@@ -1850,9 +1851,15 @@ async function test(...args) {
|
|
|
1850
1851
|
err.sarifStringifiedResults = stringifiedSarifData;
|
|
1851
1852
|
throw err;
|
|
1852
1853
|
}
|
|
1854
|
+
const isNewIacOutputSupported = options.iac
|
|
1855
|
+
? await feature_flags_1.hasFeatureFlag('iacCliOutput', options)
|
|
1856
|
+
: false;
|
|
1853
1857
|
let response = results
|
|
1854
1858
|
.map((result, i) => {
|
|
1855
|
-
return display_result_1.displayResult(results[i],
|
|
1859
|
+
return display_result_1.displayResult(results[i], {
|
|
1860
|
+
...resultOptions[i],
|
|
1861
|
+
isNewIacOutputSupported,
|
|
1862
|
+
}, result.foundProjectCount);
|
|
1856
1863
|
})
|
|
1857
1864
|
.join(`\n${SEPARATOR}`);
|
|
1858
1865
|
if (notSuccess) {
|
|
@@ -1867,7 +1874,7 @@ async function test(...args) {
|
|
|
1867
1874
|
if (options.iac && iacScanFailures) {
|
|
1868
1875
|
errorResultsLength = iacScanFailures.length || errorResults.length;
|
|
1869
1876
|
for (const reason of iacScanFailures) {
|
|
1870
|
-
response += chalk_1.default.bold.red(iac_output_1.getIacDisplayErrorFileOutput(reason));
|
|
1877
|
+
response += chalk_1.default.bold.red(iac_output_1.getIacDisplayErrorFileOutput(reason, isNewIacOutputSupported));
|
|
1871
1878
|
}
|
|
1872
1879
|
}
|
|
1873
1880
|
if (results.length > 1) {
|
|
@@ -2283,7 +2290,7 @@ const theme_1 = __webpack_require__(86988);
|
|
|
2283
2290
|
const is_ci_1 = __webpack_require__(10090);
|
|
2284
2291
|
const detect_1 = __webpack_require__(45318);
|
|
2285
2292
|
const formatters_1 = __webpack_require__(81329);
|
|
2286
|
-
const iac_output_1 = __webpack_require__(
|
|
2293
|
+
const iac_output_1 = __webpack_require__(68145);
|
|
2287
2294
|
const constants_1 = __webpack_require__(68620);
|
|
2288
2295
|
const format_test_results_1 = __webpack_require__(59744);
|
|
2289
2296
|
const show_multi_scan_tip_1 = __webpack_require__(95100);
|
|
@@ -2350,7 +2357,7 @@ function displayResult(res, options, foundProjectCount) {
|
|
|
2350
2357
|
: dockerAdvice + nextStepsText + snykPackageTestTip + dockerCTA));
|
|
2351
2358
|
}
|
|
2352
2359
|
if (constants_1.TEST_SUPPORTED_IAC_PROJECTS.includes(res.packageManager)) {
|
|
2353
|
-
return iac_output_1.getIacDisplayedOutput(res, testedInfoText, meta, prefix);
|
|
2360
|
+
return iac_output_1.getIacDisplayedOutput(res, testedInfoText, meta, prefix, options.isNewIacOutputSupported);
|
|
2354
2361
|
}
|
|
2355
2362
|
// NOT OK => We found some vulns, let's format the vulns info
|
|
2356
2363
|
return format_test_results_1.getDisplayedOutput(res, options, testedInfoText, localPackageTest, projectType, meta, prefix, multiProjAdvice, dockerAdvice);
|
|
@@ -2377,7 +2384,7 @@ const remediation_based_format_issues_1 = __webpack_require__(57995);
|
|
|
2377
2384
|
const legacy_format_issue_1 = __webpack_require__(63540);
|
|
2378
2385
|
const docker_1 = __webpack_require__(41287);
|
|
2379
2386
|
const sarif_output_1 = __webpack_require__(5034);
|
|
2380
|
-
const iac_output_1 = __webpack_require__(
|
|
2387
|
+
const iac_output_1 = __webpack_require__(68145);
|
|
2381
2388
|
const vuln_helpers_1 = __webpack_require__(14784);
|
|
2382
2389
|
const json_1 = __webpack_require__(27019);
|
|
2383
2390
|
const open_source_sarif_output_1 = __webpack_require__(9401);
|