@socketsecurity/cli-with-sentry 1.0.100 → 1.0.101
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
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) {
|
|
@@ -15533,5 +15523,5 @@ void (async () => {
|
|
|
15533
15523
|
await utils.captureException(e);
|
|
15534
15524
|
}
|
|
15535
15525
|
})();
|
|
15536
|
-
//# debugId=
|
|
15526
|
+
//# debugId=a4903131-9deb-4ec0-b986-17c43c335d82
|
|
15537
15527
|
//# sourceMappingURL=cli.js.map
|