snyk 1.1053.0 → 1.1055.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.
@@ -140362,7 +140362,12 @@ async function pullWithDockerBinary(docker, targetImage, saveLocation, username,
140362
140362
  err.stderr.includes("operating system is not supported")) {
140363
140363
  throw new Error(`Operating system is not supported`);
140364
140364
  }
140365
- if (err.stderr && err.stderr.includes("no matching manifest for")) {
140365
+ const unknownManifestConditions = [
140366
+ "no matching manifest for",
140367
+ "manifest unknown",
140368
+ ];
140369
+ if (err.stderr &&
140370
+ unknownManifestConditions.some((value) => err.stderr.includes(value))) {
140366
140371
  if (platform) {
140367
140372
  throw new Error(`The image does not exist for ${platform}`);
140368
140373
  }
@@ -142709,8 +142714,17 @@ function extractModuleInformation(binary) {
142709
142714
  if (!mod) {
142710
142715
  throw Error("binary contains empty module info");
142711
142716
  }
142712
- const [, mainModuleLine, ...versionsLines] = mod.split("\n");
142713
- const [, name] = mainModuleLine.split("\t");
142717
+ const [pathDirective, mainModuleLine, ...versionsLines] = mod.split("\n");
142718
+ const lineSplit = mainModuleLine.split("\t");
142719
+ let name = lineSplit[1];
142720
+ if (lineSplit[0] !== "mod") {
142721
+ // If the binary has no mod directive, it is a binary from the Go
142722
+ // distribution, like the "go" command, "vet", "gofmt" or others. In that
142723
+ // case, we use "go-distribution@" plus the path directive ("cmd/vet" for
142724
+ // example) as the name. Using the "@" ensures that customers cannot create
142725
+ // name-clashes with these as "@" is an invalid character in Go modules.
142726
+ name = "go-distribution@" + pathDirective.split("\t")[1];
142727
+ }
142714
142728
  const modules = [];
142715
142729
  versionsLines.forEach((versionLine) => {
142716
142730
  const [, name, ver] = versionLine.split("\t");