@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.
- package/cli.mjs +31 -58
- 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.
|
|
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
|
|
215681
|
-
|
|
215682
|
-
|
|
215683
|
-
|
|
215684
|
-
|
|
215685
|
-
|
|
215686
|
-
|
|
215687
|
-
vulnerabilities
|
|
215688
|
-
|
|
215689
|
-
|
|
215690
|
-
|
|
215691
|
-
|
|
215692
|
-
|
|
215693
|
-
|
|
215694
|
-
|
|
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]
|
|
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
|
|
215762
|
+
return "npm" /* NPM */;
|
|
215757
215763
|
case "MAVEN":
|
|
215758
|
-
return
|
|
215764
|
+
return "maven" /* MAVEN */;
|
|
215759
215765
|
case "PIP":
|
|
215760
|
-
return
|
|
215766
|
+
return "pypi" /* PYPI */;
|
|
215761
215767
|
case "NUGET":
|
|
215762
|
-
return
|
|
215768
|
+
return "nuget" /* NUGET */;
|
|
215763
215769
|
case "GO":
|
|
215764
|
-
return
|
|
215770
|
+
return "golang" /* GOLANG */;
|
|
215765
215771
|
case "RUST":
|
|
215766
|
-
return
|
|
215772
|
+
return "cargo" /* CARGO */;
|
|
215767
215773
|
case "RUBYGEMS":
|
|
215768
|
-
return
|
|
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;
|