snyk 1.1044.0 → 1.1045.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 +20 -5
- package/dist/cli/784.index.js.map +1 -1
- package/dist/cli/895.index.js +1 -1
- package/dist/cli/895.index.js.map +1 -1
- package/dist/cli/917.index.js +19 -5
- package/dist/cli/917.index.js.map +1 -1
- package/dist/cli/index.js +12 -0
- package/dist/cli/index.js.map +1 -1
- package/package.json +3 -2
package/dist/cli/784.index.js
CHANGED
|
@@ -68,6 +68,7 @@ const is_multi_project_scan_1 = __webpack_require__(62435);
|
|
|
68
68
|
const ecosystems_1 = __webpack_require__(5168);
|
|
69
69
|
const monitor_2 = __webpack_require__(62406);
|
|
70
70
|
const process_command_args_1 = __webpack_require__(52369);
|
|
71
|
+
const feature_flags_1 = __webpack_require__(63011);
|
|
71
72
|
const SEPARATOR = '\n-------------------------------------------------------\n';
|
|
72
73
|
const debug = Debug('snyk');
|
|
73
74
|
const appVulnsReleaseWarningMsg = `${theme.icon.WARNING} Important: Beginning January 24th, 2023, application dependencies in container
|
|
@@ -104,13 +105,27 @@ async function monitor(...args0) {
|
|
|
104
105
|
// TODO remove 'app-vulns' options and warning message once
|
|
105
106
|
// https://github.com/snyk/cli/pull/3433 is merged
|
|
106
107
|
if (options.docker) {
|
|
107
|
-
|
|
108
|
+
// order is important here, we want:
|
|
109
|
+
// 1) exclude-app-vulns set -> no app vulns
|
|
110
|
+
// 2) app-vulns set -> app-vulns
|
|
111
|
+
// 3) neither set -> containerAppVulnsEnabled
|
|
112
|
+
if (options['exclude-app-vulns']) {
|
|
108
113
|
options['exclude-app-vulns'] = true;
|
|
109
114
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
115
|
+
else if (options['app-vulns']) {
|
|
116
|
+
options['exclude-app-vulns'] = false;
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
options['exclude-app-vulns'] = !(await feature_flags_1.hasFeatureFlag('containerCliAppVulnsEnabled', options));
|
|
120
|
+
// we can't print the warning message with JSON output as that would make
|
|
121
|
+
// the JSON output invalid.
|
|
122
|
+
// We also only want to print the message if the user did not overwrite
|
|
123
|
+
// the default with one of the flags.
|
|
124
|
+
if (options['exclude-app-vulns'] &&
|
|
125
|
+
!options['json'] &&
|
|
126
|
+
!options['sarif']) {
|
|
127
|
+
console.log(theme.color.status.warn(appVulnsReleaseWarningMsg));
|
|
128
|
+
}
|
|
114
129
|
}
|
|
115
130
|
}
|
|
116
131
|
// Handles no image arg provided to the container command until
|