snyk 1.974.0 → 1.977.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/184.index.js +11 -7
- package/dist/cli/184.index.js.map +1 -1
- package/dist/cli/784.index.js +43 -7
- package/dist/cli/784.index.js.map +1 -1
- package/dist/cli/895.index.js +11 -11
- package/dist/cli/895.index.js.map +1 -1
- package/dist/cli/917.index.js +29 -19
- package/dist/cli/917.index.js.map +1 -1
- package/dist/cli/thirdPartyNotice.json +2 -2
- package/dist/lib/formatters/iac-output/v2/formatters.d.ts +1 -1
- package/dist/lib/iac/drift/driftctl.d.ts +1 -1
- package/dist/lib/iac/test/v2/setup/local-cache/policy-engine/constants/index.d.ts +1 -1
- package/dist/lib/reachable-vulns.d.ts +1 -0
- package/help/cli-commands/container.md +2 -0
- package/help/cli-commands/iac-test.md +14 -0
- package/help/cli-commands/iac.md +2 -2
- package/help/cli-commands/monitor.md +4 -0
- package/help/cli-commands/test.md +4 -0
- package/package.json +1 -1
package/dist/cli/184.index.js
CHANGED
|
@@ -210187,9 +210187,9 @@ function inspect(root, targetFile, options) {
|
|
|
210187
210187
|
if (!options) {
|
|
210188
210188
|
options = { dev: false };
|
|
210189
210189
|
}
|
|
210190
|
-
const isCoursierPresent = yield plugin_search_1.isPluginInstalled(root, targetFile, constants_1.sbtCoursierPluginName);
|
|
210191
|
-
const isSbtDependencyGraphPresent = yield plugin_search_1.isPluginInstalled(root, targetFile, constants_1.sbtDependencyGraphPluginName);
|
|
210192
|
-
const isNewSbtDependencyGraphPresent = yield plugin_search_1.isPluginInstalled(root, targetFile, constants_1.sbtDependencyGraphPluginNameNew);
|
|
210190
|
+
const isCoursierPresent = yield (0, plugin_search_1.isPluginInstalled)(root, targetFile, constants_1.sbtCoursierPluginName);
|
|
210191
|
+
const isSbtDependencyGraphPresent = yield (0, plugin_search_1.isPluginInstalled)(root, targetFile, constants_1.sbtDependencyGraphPluginName);
|
|
210192
|
+
const isNewSbtDependencyGraphPresent = yield (0, plugin_search_1.isPluginInstalled)(root, targetFile, constants_1.sbtDependencyGraphPluginNameNew);
|
|
210193
210193
|
Object.assign(options, { isCoursierPresent });
|
|
210194
210194
|
// in order to apply the pluginInspect, coursier should *not* be present and sbt-dependency-graph should be present
|
|
210195
210195
|
// we currently don't support the new notation of the sbt-dependency-graph which is 'addDependencyTreePlugin'
|
|
@@ -210320,7 +210320,7 @@ function pluginInspect(root, targetFile, options) {
|
|
|
210320
210320
|
try {
|
|
210321
210321
|
const targetFolderPath = path.dirname(path.resolve(root, targetFile));
|
|
210322
210322
|
const sbtArgs = buildArgs(options.args, false, true);
|
|
210323
|
-
const sbtVersion = yield version_1.getSbtVersion(root, targetFile);
|
|
210323
|
+
const sbtVersion = yield (0, version_1.getSbtVersion)(root, targetFile);
|
|
210324
210324
|
const sbtPluginPath = generateSbtPluginPath(sbtVersion);
|
|
210325
210325
|
const packageName = path.basename(root);
|
|
210326
210326
|
const packageVersion = '1.0.0';
|
|
@@ -210687,7 +210687,7 @@ function searchProjectFiles(root, targetFile, plugin) {
|
|
|
210687
210687
|
function searchGlobalFiles(root, targetFile, plugin) {
|
|
210688
210688
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
210689
210689
|
const homedir = os.homedir();
|
|
210690
|
-
const sbtVersion = yield version_1.getSbtVersion(root, targetFile);
|
|
210690
|
+
const sbtVersion = yield (0, version_1.getSbtVersion)(root, targetFile);
|
|
210691
210691
|
// https://www.scala-sbt.org/1.x/docs/Using-Plugins.html#Global+plugins
|
|
210692
210692
|
const pluginsPath = semver.lt(sbtVersion, '1.0.0') ?
|
|
210693
210693
|
path.join(homedir, '.sbt', '0.13', 'plugins') :
|
|
@@ -210714,7 +210714,10 @@ function sbtFiles(basePath) {
|
|
|
210714
210714
|
return [];
|
|
210715
210715
|
}
|
|
210716
210716
|
function searchWithFs(filename, word) {
|
|
210717
|
-
|
|
210717
|
+
let buffer = fs.readFileSync(filename, { encoding: 'utf8' });
|
|
210718
|
+
// remove single-line and multi-line comments
|
|
210719
|
+
const singleLineCommentPattern = /\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*$/gm;
|
|
210720
|
+
buffer = buffer.replace(singleLineCommentPattern, '');
|
|
210718
210721
|
return buffer.indexOf(word) > -1;
|
|
210719
210722
|
}
|
|
210720
210723
|
//# sourceMappingURL=plugin-search.js.map
|
|
@@ -210736,7 +210739,7 @@ const debugLogging = debugModule('snyk-sbt-plugin');
|
|
|
210736
210739
|
// Disabled by default, to set run the CLI as `PROC_TIMEOUT=100000 snyk ...`
|
|
210737
210740
|
const TIMEOUT = process.env.PROC_TIMEOUT || '0';
|
|
210738
210741
|
const PROC_TIMEOUT = parseInt(TIMEOUT, 10);
|
|
210739
|
-
|
|
210742
|
+
const execute = (command, args, options) => {
|
|
210740
210743
|
const spawnOptions = { shell: true };
|
|
210741
210744
|
if (options && options.cwd) {
|
|
210742
210745
|
spawnOptions.cwd = options.cwd;
|
|
@@ -210784,6 +210787,7 @@ exports.execute = (command, args, options) => {
|
|
|
210784
210787
|
});
|
|
210785
210788
|
});
|
|
210786
210789
|
};
|
|
210790
|
+
exports.execute = execute;
|
|
210787
210791
|
function kill(id, out) {
|
|
210788
210792
|
return () => {
|
|
210789
210793
|
out.stderr = out.stderr + 'Process timed out. To set longer timeout run with `PROC_TIMEOUT=value_in_ms`\n';
|