snyk 1.800.0 → 1.801.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.
@@ -170890,12 +170890,9 @@ async function analyze(targetImage, dockerfileAnalysis, imageType, imagePath, gl
170890
170890
  exports.analyze = analyze;
170891
170891
  function getNestedJarsDesiredDepth(options) {
170892
170892
  const nestedJarsOption = options["nested-jars-depth"] || options["shaded-jars-depth"];
170893
- let nestedJarsDepth = 0;
170893
+ let nestedJarsDepth = 1;
170894
170894
  const depthNumber = Number(nestedJarsOption);
170895
- if (isNaN(depthNumber)) {
170896
- nestedJarsDepth = option_utils_1.isTrue(nestedJarsOption) ? 1 : 0;
170897
- }
170898
- else {
170895
+ if (!isNaN(depthNumber) && depthNumber > 1) {
170899
170896
  nestedJarsDepth = depthNumber;
170900
170897
  }
170901
170898
  return nestedJarsDepth;
@@ -173565,10 +173562,11 @@ async function scan(options) {
173565
173562
  !option_utils_1.isTrue(options["app-vulns"])) {
173566
173563
  throw new Error("To use --nested-jars-depth, you must also use --app-vulns");
173567
173564
  }
173568
- if (!option_utils_1.isNumber(nestedJarsDepth) &&
173565
+ if ((!option_utils_1.isNumber(nestedJarsDepth) &&
173569
173566
  !option_utils_1.isTrue(nestedJarsDepth) &&
173570
- typeof nestedJarsDepth !== "undefined") {
173571
- throw new Error("--nested-jars-depth accepts only numbers");
173567
+ typeof nestedJarsDepth !== "undefined") ||
173568
+ Number(nestedJarsDepth) < 1) {
173569
+ throw new Error("--nested-jars-depth accepts only numbers bigger or equal to 1");
173572
173570
  }
173573
173571
  const targetImage = appendLatestTagIfMissing(options.path);
173574
173572
  const dockerfilePath = options.file;