socket 1.0.100 → 1.0.102
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.js +31 -41
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +3 -3
- package/dist/constants.js.map +1 -1
- package/dist/tsconfig.dts.tsbuildinfo +1 -1
- package/dist/types/commands/fix/coana-fix.d.mts.map +1 -1
- package/dist/types/commands/fix/pull-request.d.mts.map +1 -1
- package/dist/utils.js +2 -2
- package/dist/utils.js.map +1 -1
- package/external/@coana-tech/cli/cli.mjs +68 -62
- package/external/@coana-tech/cli/reachability-analyzers-cli.mjs +75 -69
- package/external/@coana-tech/cli/repos/coana-tech/alucard/alucard.jar +0 -0
- package/external/@coana-tech/cli/repos/coana-tech/goana/bin/goana-darwin-amd64.gz +0 -0
- package/external/@coana-tech/cli/repos/coana-tech/goana/bin/goana-darwin-arm64.gz +0 -0
- package/external/@coana-tech/cli/repos/coana-tech/goana/bin/goana-linux-amd64.gz +0 -0
- package/external/@coana-tech/cli/repos/coana-tech/goana/bin/goana-linux-arm64.gz +0 -0
- package/external/@coana-tech/cli/repos/coana-tech/mambalade/dist/mambalade-0.3.11-py3-none-any.whl +0 -0
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -3379,47 +3379,37 @@ async function fetchGhsaDetails(ids) {
|
|
|
3379
3379
|
const octokitGraphql = getOctokitGraphql();
|
|
3380
3380
|
try {
|
|
3381
3381
|
const gqlCacheKey = `${ids.join('-')}-graphql-snapshot`;
|
|
3382
|
-
const
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
url
|
|
3394
|
-
}
|
|
3395
|
-
vulnerabilities(first: 10) {
|
|
3396
|
-
nodes {
|
|
3397
|
-
package {
|
|
3398
|
-
ecosystem
|
|
3399
|
-
name
|
|
3400
|
-
}
|
|
3401
|
-
vulnerableVersionRange
|
|
3402
|
-
}
|
|
3403
|
-
}
|
|
3382
|
+
const aliases = ids.map((id, index) => `advisory${index}: securityAdvisory(ghsaId: "${id}") {
|
|
3383
|
+
ghsaId
|
|
3384
|
+
summary
|
|
3385
|
+
severity
|
|
3386
|
+
publishedAt
|
|
3387
|
+
withdrawnAt
|
|
3388
|
+
vulnerabilities(first: 10) {
|
|
3389
|
+
nodes {
|
|
3390
|
+
package {
|
|
3391
|
+
ecosystem
|
|
3392
|
+
name
|
|
3404
3393
|
}
|
|
3394
|
+
vulnerableVersionRange
|
|
3405
3395
|
}
|
|
3406
|
-
}
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
for (
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
require$$8.debugFn('notice', `
|
|
3396
|
+
}
|
|
3397
|
+
}`).join('\n');
|
|
3398
|
+
const gqlResp = await cacheFetch(gqlCacheKey, () => octokitGraphql(`
|
|
3399
|
+
query {
|
|
3400
|
+
${aliases}
|
|
3401
|
+
}
|
|
3402
|
+
`));
|
|
3403
|
+
for (let i = 0, {
|
|
3404
|
+
length
|
|
3405
|
+
} = ids; i < length; i += 1) {
|
|
3406
|
+
const id = ids[i];
|
|
3407
|
+
const advisoryKey = `advisory${i}`;
|
|
3408
|
+
const advisory = gqlResp?.[advisoryKey];
|
|
3409
|
+
if (advisory && advisory.ghsaId) {
|
|
3410
|
+
results.set(id, advisory);
|
|
3411
|
+
} else {
|
|
3412
|
+
require$$8.debugFn('notice', `miss: no advisory found for ${id}`);
|
|
3423
3413
|
}
|
|
3424
3414
|
}
|
|
3425
3415
|
} catch (e) {
|
|
@@ -3940,8 +3930,8 @@ async function coanaFix(fixConfig) {
|
|
|
3940
3930
|
}
|
|
3941
3931
|
require$$8.debugFn('notice', `fetch: ${ids.length} GHSA details for ${arrays.joinAnd(ids)}`);
|
|
3942
3932
|
const ghsaDetails = await fetchGhsaDetails(ids);
|
|
3943
|
-
require$$8.debugFn('notice', `found: ${ghsaDetails.size} GHSA details`);
|
|
3944
3933
|
const scanBaseNames = new Set(scanFilepaths.map(p => path.basename(p)));
|
|
3934
|
+
require$$8.debugFn('notice', `found: ${ghsaDetails.size} GHSA details`);
|
|
3945
3935
|
let count = 0;
|
|
3946
3936
|
let overallFixed = false;
|
|
3947
3937
|
|
|
@@ -15533,5 +15523,5 @@ void (async () => {
|
|
|
15533
15523
|
await utils.captureException(e);
|
|
15534
15524
|
}
|
|
15535
15525
|
})();
|
|
15536
|
-
//# debugId=
|
|
15526
|
+
//# debugId=3c044a06-e0dd-4f21-8310-181cc22dc4c0
|
|
15537
15527
|
//# sourceMappingURL=cli.js.map
|