@coana-tech/cli 14.9.19 → 14.9.20

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.
Files changed (2) hide show
  1. package/cli.mjs +31 -58
  2. package/package.json +1 -1
package/cli.mjs CHANGED
@@ -212320,7 +212320,7 @@ async function onlineScan(dependencyTree, apiKey, timeout) {
212320
212320
  }
212321
212321
 
212322
212322
  // dist/version.js
212323
- var version2 = "14.9.19";
212323
+ var version2 = "14.9.20";
212324
212324
 
212325
212325
  // ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/bind.js
212326
212326
  function bind2(fn2, thisArg) {
@@ -215677,22 +215677,26 @@ async function scanForVulnerabilitiesSocketMode(dependencyTree) {
215677
215677
  let simplePurlForComponent = simplePurl(c3.purl_type, c3.namespace, c3.name, c3.version);
215678
215678
  if (!(simplePurlForComponent in purlStringsToIdentifier))
215679
215679
  simplePurlForComponent = simplePurl(c3.purl_type, c3.namespace, c3.name, null);
215680
- const dependencyIdentifier = purlStringsToIdentifier[simplePurlForComponent];
215681
- dependencyIdentifiersNotFound.delete(dependencyIdentifier);
215682
- const dependencyTreeNode = dependencyTree.transitiveDependencies[dependencyIdentifier];
215683
- if (!dependencyTreeNode)
215684
- throw new Error(`Dependency tree does not contain dependency ${simplePurlForComponent}`);
215685
- dependencyTreeNode.purl = c3.purl;
215686
- for (const vulnerability of c3.vulnerabilities) {
215687
- vulnerabilities.push({
215688
- url: vulnerability.ghsaId,
215689
- range: vulnerability.range,
215690
- name: dependencyTreeNode.packageName,
215691
- dependency: dependencyTreeNode.packageName,
215692
- vulnChainDetails: computeVulnChainDetails(dependencyTree, dependencyIdentifier, parentsMap),
215693
- vulnerabilityAccessPaths: vulnerability.reachabilityData?.pattern,
215694
- ecosystem: dependencyTree.ecosystem
215695
- });
215680
+ const dependencyIdentifiers = purlStringsToIdentifier[simplePurlForComponent];
215681
+ for (const dependencyIdentifier of dependencyIdentifiers) {
215682
+ dependencyIdentifiersNotFound.delete(dependencyIdentifier);
215683
+ const dependencyTreeNode = dependencyTree.transitiveDependencies[dependencyIdentifier];
215684
+ if (!dependencyTreeNode)
215685
+ throw new Error(`Dependency tree does not contain dependency ${simplePurlForComponent}`);
215686
+ dependencyTreeNode.purl = c3.purl;
215687
+ for (const vulnerability of c3.vulnerabilities) {
215688
+ vulnerabilities.push({
215689
+ url: vulnerability.ghsaId,
215690
+ purl: c3.purl,
215691
+ purlType: c3.purl_type,
215692
+ range: vulnerability.range,
215693
+ name: dependencyTreeNode.packageName,
215694
+ dependency: dependencyTreeNode.packageName,
215695
+ vulnChainDetails: computeVulnChainDetails(dependencyTree, dependencyIdentifier, parentsMap),
215696
+ vulnerabilityAccessPaths: vulnerability.reachabilityData?.pattern,
215697
+ ecosystem: dependencyTree.ecosystem
215698
+ });
215699
+ }
215696
215700
  }
215697
215701
  }
215698
215702
  for (const dependencyIdentifier of dependencyIdentifiersNotFound) {
@@ -215707,7 +215711,9 @@ function getPurlStrings(dependencyTree) {
215707
215711
  const { namespace: namespace2, name } = getNamespaceAndName(dependencyTree.ecosystem, node.packageName);
215708
215712
  const version3 = node.version;
215709
215713
  const purl = simplePurl(type, namespace2, name, version3);
215710
- res[purl] = depId;
215714
+ if (!res[purl])
215715
+ res[purl] = /* @__PURE__ */ new Set();
215716
+ res[purl].add(depId);
215711
215717
  }
215712
215718
  return res;
215713
215719
  }
@@ -215753,19 +215759,19 @@ function transformToVulnChainNode(dependencyTree) {
215753
215759
  function getPurlType(ecosystem) {
215754
215760
  switch (ecosystem) {
215755
215761
  case "NPM":
215756
- return PURL_Type.NPM;
215762
+ return "npm" /* NPM */;
215757
215763
  case "MAVEN":
215758
- return PURL_Type.MAVEN;
215764
+ return "maven" /* MAVEN */;
215759
215765
  case "PIP":
215760
- return PURL_Type.PYPI;
215766
+ return "pypi" /* PYPI */;
215761
215767
  case "NUGET":
215762
- return PURL_Type.NUGET;
215768
+ return "nuget" /* NUGET */;
215763
215769
  case "GO":
215764
- return PURL_Type.GOLANG;
215770
+ return "golang" /* GOLANG */;
215765
215771
  case "RUST":
215766
- return PURL_Type.CARGO;
215772
+ return "cargo" /* CARGO */;
215767
215773
  case "RUBYGEMS":
215768
- return PURL_Type.GEM;
215774
+ return "gem" /* GEM */;
215769
215775
  default:
215770
215776
  throw new Error(`Unsupported ecosystem: ${ecosystem}`);
215771
215777
  }
@@ -215794,39 +215800,6 @@ function getNamespaceAndName(ecosystem, packageName) {
215794
215800
  }
215795
215801
  return { namespace: namespace2, name };
215796
215802
  }
215797
- var PURL_Type;
215798
- (function(PURL_Type2) {
215799
- PURL_Type2["ALPM"] = "alpm";
215800
- PURL_Type2["APK"] = "apk";
215801
- PURL_Type2["BITBUCKET"] = "bitbucket";
215802
- PURL_Type2["COCOAPODS"] = "cocoapods";
215803
- PURL_Type2["CARGO"] = "cargo";
215804
- PURL_Type2["COMPOSER"] = "composer";
215805
- PURL_Type2["CONAN"] = "conan";
215806
- PURL_Type2["CONDA"] = "conda";
215807
- PURL_Type2["CRAN"] = "cran";
215808
- PURL_Type2["DEB"] = "deb";
215809
- PURL_Type2["DOCKER"] = "docker";
215810
- PURL_Type2["GEM"] = "gem";
215811
- PURL_Type2["GENERIC"] = "generic";
215812
- PURL_Type2["GITHUB"] = "github";
215813
- PURL_Type2["GOLANG"] = "golang";
215814
- PURL_Type2["HACKAGE"] = "hackage";
215815
- PURL_Type2["HEX"] = "hex";
215816
- PURL_Type2["HUGGINGFACE"] = "huggingface";
215817
- PURL_Type2["MAVEN"] = "maven";
215818
- PURL_Type2["MLFLOW"] = "mlflow";
215819
- PURL_Type2["NPM"] = "npm";
215820
- PURL_Type2["NUGET"] = "nuget";
215821
- PURL_Type2["QPKG"] = "qpkg";
215822
- PURL_Type2["OCI"] = "oci";
215823
- PURL_Type2["PUB"] = "pub";
215824
- PURL_Type2["PYPI"] = "pypi";
215825
- PURL_Type2["RPM"] = "rpm";
215826
- PURL_Type2["SWID"] = "swid";
215827
- PURL_Type2["SWIFT"] = "swift";
215828
- PURL_Type2["UNKNOWN"] = "unknown";
215829
- })(PURL_Type || (PURL_Type = {}));
215830
215803
 
215831
215804
  // dist/cli-core.js
215832
215805
  var { omit, partition, pick } = import_lodash15.default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coana-tech/cli",
3
- "version": "14.9.19",
3
+ "version": "14.9.20",
4
4
  "description": "Coana CLI",
5
5
  "type": "module",
6
6
  "bin": {