@socketsecurity/cli-with-sentry 1.0.91 → 1.0.92
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 +6 -7
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +3 -3
- package/dist/constants.js.map +1 -1
- package/dist/utils.js +9 -5
- package/dist/utils.js.map +1 -1
- package/external/@coana-tech/cli/cli.mjs +8 -3
- package/external/@coana-tech/cli/coana-repos/goana/bin/goana-darwin-amd64.gz +0 -0
- package/external/@coana-tech/cli/coana-repos/goana/bin/goana-darwin-arm64.gz +0 -0
- package/external/@coana-tech/cli/coana-repos/goana/bin/goana-linux-amd64.gz +0 -0
- package/external/@coana-tech/cli/coana-repos/goana/bin/goana-linux-arm64.gz +0 -0
- package/external/@coana-tech/cli/reachability-analyzers-cli.mjs +42 -30
- package/package.json +2 -2
|
@@ -210065,7 +210065,7 @@ function inferWorkspaceFromManifestPath(ecosystem, manifestPath, properPythonPro
|
|
|
210065
210065
|
case "NPM": {
|
|
210066
210066
|
const base = basename7(manifestPath);
|
|
210067
210067
|
const dir = dirname8(manifestPath);
|
|
210068
|
-
return base === "package.json" ? dir
|
|
210068
|
+
return base === "package.json" ? dir || "." : void 0;
|
|
210069
210069
|
}
|
|
210070
210070
|
case "MAVEN": {
|
|
210071
210071
|
return ".";
|
|
@@ -210096,6 +210096,11 @@ function inferWorkspaceFromManifestPath(ecosystem, manifestPath, properPythonPro
|
|
|
210096
210096
|
case "RUST": {
|
|
210097
210097
|
return dirname8(manifestPath) || ".";
|
|
210098
210098
|
}
|
|
210099
|
+
case "GO": {
|
|
210100
|
+
const base = basename7(manifestPath);
|
|
210101
|
+
const dir = dirname8(manifestPath);
|
|
210102
|
+
return base === "go.mod" ? dir || "." : void 0;
|
|
210103
|
+
}
|
|
210099
210104
|
default: {
|
|
210100
210105
|
return ".";
|
|
210101
210106
|
}
|
|
@@ -225392,7 +225397,7 @@ async function onlineScan(dependencyTree, apiKey, timeout) {
|
|
|
225392
225397
|
}
|
|
225393
225398
|
|
|
225394
225399
|
// dist/version.js
|
|
225395
|
-
var version2 = "14.11.
|
|
225400
|
+
var version2 = "14.11.14";
|
|
225396
225401
|
|
|
225397
225402
|
// dist/cli-core.js
|
|
225398
225403
|
var { mapValues, omit, partition, pick } = import_lodash15.default;
|
|
@@ -225572,7 +225577,7 @@ var CliCore = class {
|
|
|
225572
225577
|
otherModulesCommunicator,
|
|
225573
225578
|
this.rootWorkingDirectory,
|
|
225574
225579
|
ecosystem,
|
|
225575
|
-
["NPM", "PIP"].includes(ecosystem) && isEcosystemToAnalyze
|
|
225580
|
+
["NPM", "PIP", "GO"].includes(ecosystem) && isEcosystemToAnalyze
|
|
225576
225581
|
)).flat());
|
|
225577
225582
|
this.sendProgress("RUN_ON_SUBPROJECT", false, this.rootWorkingDirectory);
|
|
225578
225583
|
}
|
|
@@ -9234,7 +9234,7 @@ var require_pipeline = __commonJS({
|
|
|
9234
9234
|
if (typeof streams[streams.length - 1] !== "function") return noop4;
|
|
9235
9235
|
return streams.pop();
|
|
9236
9236
|
}
|
|
9237
|
-
function
|
|
9237
|
+
function pipeline2() {
|
|
9238
9238
|
for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
9239
9239
|
streams[_key] = arguments[_key];
|
|
9240
9240
|
}
|
|
@@ -9257,7 +9257,7 @@ var require_pipeline = __commonJS({
|
|
|
9257
9257
|
});
|
|
9258
9258
|
return streams.reduce(pipe);
|
|
9259
9259
|
}
|
|
9260
|
-
module.exports =
|
|
9260
|
+
module.exports = pipeline2;
|
|
9261
9261
|
}
|
|
9262
9262
|
});
|
|
9263
9263
|
|
|
@@ -11444,7 +11444,7 @@ var require_file = __commonJS({
|
|
|
11444
11444
|
var fs12 = __require("fs");
|
|
11445
11445
|
var path9 = __require("path");
|
|
11446
11446
|
var asyncSeries = require_series();
|
|
11447
|
-
var
|
|
11447
|
+
var zlib3 = __require("zlib");
|
|
11448
11448
|
var { MESSAGE } = require_triple_beam();
|
|
11449
11449
|
var { Stream: Stream2, PassThrough } = require_readable();
|
|
11450
11450
|
var TransportStream = require_winston_transport();
|
|
@@ -12013,7 +12013,7 @@ var require_file = __commonJS({
|
|
|
12013
12013
|
if (err) {
|
|
12014
12014
|
return callback();
|
|
12015
12015
|
}
|
|
12016
|
-
var gzip =
|
|
12016
|
+
var gzip = zlib3.createGzip();
|
|
12017
12017
|
var inp = fs12.createReadStream(src);
|
|
12018
12018
|
var out = fs12.createWriteStream(dest);
|
|
12019
12019
|
out.on("finish", () => {
|
|
@@ -43748,7 +43748,7 @@ var require_client = __commonJS({
|
|
|
43748
43748
|
var assert9 = __require("assert");
|
|
43749
43749
|
var net = __require("net");
|
|
43750
43750
|
var http2 = __require("http");
|
|
43751
|
-
var { pipeline } = __require("stream");
|
|
43751
|
+
var { pipeline: pipeline2 } = __require("stream");
|
|
43752
43752
|
var util6 = require_util2();
|
|
43753
43753
|
var timers = require_timers();
|
|
43754
43754
|
var Request2 = require_request();
|
|
@@ -45166,7 +45166,7 @@ upgrade: ${upgrade}\r
|
|
|
45166
45166
|
let onPipeData = function(chunk2) {
|
|
45167
45167
|
request.onBodySent(chunk2);
|
|
45168
45168
|
};
|
|
45169
|
-
const pipe =
|
|
45169
|
+
const pipe = pipeline2(
|
|
45170
45170
|
body,
|
|
45171
45171
|
h2stream,
|
|
45172
45172
|
(err) => {
|
|
@@ -46926,7 +46926,7 @@ var require_api_pipeline = __commonJS({
|
|
|
46926
46926
|
util6.destroy(ret, err);
|
|
46927
46927
|
}
|
|
46928
46928
|
};
|
|
46929
|
-
function
|
|
46929
|
+
function pipeline2(opts, handler) {
|
|
46930
46930
|
try {
|
|
46931
46931
|
const pipelineHandler = new PipelineHandler(opts, handler);
|
|
46932
46932
|
this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler);
|
|
@@ -46935,7 +46935,7 @@ var require_api_pipeline = __commonJS({
|
|
|
46935
46935
|
return new PassThrough().destroy(err);
|
|
46936
46936
|
}
|
|
46937
46937
|
}
|
|
46938
|
-
module.exports =
|
|
46938
|
+
module.exports = pipeline2;
|
|
46939
46939
|
}
|
|
46940
46940
|
});
|
|
46941
46941
|
|
|
@@ -49832,7 +49832,7 @@ var require_fetch = __commonJS({
|
|
|
49832
49832
|
} = require_response();
|
|
49833
49833
|
var { Headers } = require_headers();
|
|
49834
49834
|
var { Request: Request2, makeRequest } = require_request2();
|
|
49835
|
-
var
|
|
49835
|
+
var zlib3 = __require("zlib");
|
|
49836
49836
|
var {
|
|
49837
49837
|
bytesMatch,
|
|
49838
49838
|
makePolicyContainer,
|
|
@@ -49876,7 +49876,7 @@ var require_fetch = __commonJS({
|
|
|
49876
49876
|
} = require_constants3();
|
|
49877
49877
|
var { kHeadersList } = require_symbols();
|
|
49878
49878
|
var EE3 = __require("events");
|
|
49879
|
-
var { Readable: Readable2, pipeline } = __require("stream");
|
|
49879
|
+
var { Readable: Readable2, pipeline: pipeline2 } = __require("stream");
|
|
49880
49880
|
var { addAbortListener, isErrored, isReadable: isReadable2, nodeMajor, nodeMinor } = require_util2();
|
|
49881
49881
|
var { dataURLProcessor, serializeAMimeType } = require_dataURL();
|
|
49882
49882
|
var { TransformStream } = __require("stream/web");
|
|
@@ -50773,18 +50773,18 @@ var require_fetch = __commonJS({
|
|
|
50773
50773
|
if (request.method !== "HEAD" && request.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) {
|
|
50774
50774
|
for (const coding of codings) {
|
|
50775
50775
|
if (coding === "x-gzip" || coding === "gzip") {
|
|
50776
|
-
decoders.push(
|
|
50776
|
+
decoders.push(zlib3.createGunzip({
|
|
50777
50777
|
// Be less strict when decoding compressed responses, since sometimes
|
|
50778
50778
|
// servers send slightly invalid responses that are still accepted
|
|
50779
50779
|
// by common browsers.
|
|
50780
50780
|
// Always using Z_SYNC_FLUSH is what cURL does.
|
|
50781
|
-
flush:
|
|
50782
|
-
finishFlush:
|
|
50781
|
+
flush: zlib3.constants.Z_SYNC_FLUSH,
|
|
50782
|
+
finishFlush: zlib3.constants.Z_SYNC_FLUSH
|
|
50783
50783
|
}));
|
|
50784
50784
|
} else if (coding === "deflate") {
|
|
50785
|
-
decoders.push(
|
|
50785
|
+
decoders.push(zlib3.createInflate());
|
|
50786
50786
|
} else if (coding === "br") {
|
|
50787
|
-
decoders.push(
|
|
50787
|
+
decoders.push(zlib3.createBrotliDecompress());
|
|
50788
50788
|
} else {
|
|
50789
50789
|
decoders.length = 0;
|
|
50790
50790
|
break;
|
|
@@ -50795,7 +50795,7 @@ var require_fetch = __commonJS({
|
|
|
50795
50795
|
status,
|
|
50796
50796
|
statusText,
|
|
50797
50797
|
headersList: headers[kHeadersList],
|
|
50798
|
-
body: decoders.length ?
|
|
50798
|
+
body: decoders.length ? pipeline2(this.body, ...decoders, () => {
|
|
50799
50799
|
}) : this.body.on("error", () => {
|
|
50800
50800
|
})
|
|
50801
50801
|
});
|
|
@@ -59413,7 +59413,7 @@ var require_upload_gzip = __commonJS({
|
|
|
59413
59413
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59414
59414
|
exports.createGZipFileInBuffer = exports.createGZipFileOnDisk = void 0;
|
|
59415
59415
|
var fs12 = __importStar(__require("fs"));
|
|
59416
|
-
var
|
|
59416
|
+
var zlib3 = __importStar(__require("zlib"));
|
|
59417
59417
|
var util_1 = __require("util");
|
|
59418
59418
|
var stat3 = (0, util_1.promisify)(fs12.stat);
|
|
59419
59419
|
var gzipExemptFileExtensions = [
|
|
@@ -59449,7 +59449,7 @@ var require_upload_gzip = __commonJS({
|
|
|
59449
59449
|
}
|
|
59450
59450
|
return new Promise((resolve17, reject) => {
|
|
59451
59451
|
const inputStream = fs12.createReadStream(originalFilePath);
|
|
59452
|
-
const gzip =
|
|
59452
|
+
const gzip = zlib3.createGzip();
|
|
59453
59453
|
const outputStream = fs12.createWriteStream(tempFilePath);
|
|
59454
59454
|
inputStream.pipe(gzip).pipe(outputStream);
|
|
59455
59455
|
outputStream.on("finish", () => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -59469,7 +59469,7 @@ var require_upload_gzip = __commonJS({
|
|
|
59469
59469
|
return new Promise((resolve17) => __awaiter(this, void 0, void 0, function* () {
|
|
59470
59470
|
var _a2, e_1, _b, _c;
|
|
59471
59471
|
const inputStream = fs12.createReadStream(originalFilePath);
|
|
59472
|
-
const gzip =
|
|
59472
|
+
const gzip = zlib3.createGzip();
|
|
59473
59473
|
inputStream.pipe(gzip);
|
|
59474
59474
|
const chunks = [];
|
|
59475
59475
|
try {
|
|
@@ -60071,7 +60071,7 @@ var require_download_http_client = __commonJS({
|
|
|
60071
60071
|
exports.DownloadHttpClient = void 0;
|
|
60072
60072
|
var fs12 = __importStar(__require("fs"));
|
|
60073
60073
|
var core = __importStar(require_core());
|
|
60074
|
-
var
|
|
60074
|
+
var zlib3 = __importStar(__require("zlib"));
|
|
60075
60075
|
var utils_1 = require_utils3();
|
|
60076
60076
|
var url_1 = __require("url");
|
|
60077
60077
|
var status_reporter_1 = require_status_reporter();
|
|
@@ -60249,7 +60249,7 @@ var require_download_http_client = __commonJS({
|
|
|
60249
60249
|
return __awaiter(this, void 0, void 0, function* () {
|
|
60250
60250
|
yield new Promise((resolve17, reject) => {
|
|
60251
60251
|
if (isGzip) {
|
|
60252
|
-
const gunzip =
|
|
60252
|
+
const gunzip = zlib3.createGunzip();
|
|
60253
60253
|
response.message.on("error", (error) => {
|
|
60254
60254
|
core.info(`An error occurred while attempting to read the response stream`);
|
|
60255
60255
|
gunzip.close();
|
|
@@ -66504,14 +66504,14 @@ var require_headers2 = __commonJS({
|
|
|
66504
66504
|
var require_deflater = __commonJS({
|
|
66505
66505
|
"../../node_modules/.pnpm/adm-zip@0.5.16/node_modules/adm-zip/methods/deflater.js"(exports, module) {
|
|
66506
66506
|
module.exports = function(inbuf) {
|
|
66507
|
-
var
|
|
66507
|
+
var zlib3 = __require("zlib");
|
|
66508
66508
|
var opts = { chunkSize: (parseInt(inbuf.length / 1024) + 1) * 1024 };
|
|
66509
66509
|
return {
|
|
66510
66510
|
deflate: function() {
|
|
66511
|
-
return
|
|
66511
|
+
return zlib3.deflateRawSync(inbuf, opts);
|
|
66512
66512
|
},
|
|
66513
66513
|
deflateAsync: function(callback) {
|
|
66514
|
-
var tmp =
|
|
66514
|
+
var tmp = zlib3.createDeflateRaw(opts), parts = [], total = 0;
|
|
66515
66515
|
tmp.on("data", function(data2) {
|
|
66516
66516
|
parts.push(data2);
|
|
66517
66517
|
total += data2.length;
|
|
@@ -66538,14 +66538,14 @@ var require_inflater = __commonJS({
|
|
|
66538
66538
|
"../../node_modules/.pnpm/adm-zip@0.5.16/node_modules/adm-zip/methods/inflater.js"(exports, module) {
|
|
66539
66539
|
var version3 = +(process.versions ? process.versions.node : "").split(".")[0] || 0;
|
|
66540
66540
|
module.exports = function(inbuf, expectedLength) {
|
|
66541
|
-
var
|
|
66541
|
+
var zlib3 = __require("zlib");
|
|
66542
66542
|
const option = version3 >= 15 && expectedLength > 0 ? { maxOutputLength: expectedLength } : {};
|
|
66543
66543
|
return {
|
|
66544
66544
|
inflate: function() {
|
|
66545
|
-
return
|
|
66545
|
+
return zlib3.inflateRawSync(inbuf, option);
|
|
66546
66546
|
},
|
|
66547
66547
|
inflateAsync: function(callback) {
|
|
66548
|
-
var tmp =
|
|
66548
|
+
var tmp = zlib3.createInflateRaw(option), parts = [], total = 0;
|
|
66549
66549
|
tmp.on("data", function(data2) {
|
|
66550
66550
|
parts.push(data2);
|
|
66551
66551
|
total += data2.length;
|
|
@@ -94983,9 +94983,11 @@ function transformSourceLocations(fileMappings, detectedOccurrences) {
|
|
|
94983
94983
|
// dist/whole-program-code-aware-vulnerability-scanner/go/go-code-aware-vulnerability-scanner.js
|
|
94984
94984
|
var import_lodash11 = __toESM(require_lodash(), 1);
|
|
94985
94985
|
import assert4 from "assert";
|
|
94986
|
-
import { existsSync as existsSync9 } from "fs";
|
|
94986
|
+
import { existsSync as existsSync9, createReadStream, createWriteStream as createWriteStream2 } from "fs";
|
|
94987
94987
|
import { readFile as readFile7, rm as rm4, cp as cp4 } from "fs/promises";
|
|
94988
|
+
import zlib2 from "zlib";
|
|
94988
94989
|
import { join as join13, resolve as resolve10, sep } from "path";
|
|
94990
|
+
import { pipeline } from "stream/promises";
|
|
94989
94991
|
var { uniq: uniq5 } = import_lodash11.default;
|
|
94990
94992
|
var GoCodeAwareVulnerabilityScanner = class {
|
|
94991
94993
|
projectDir;
|
|
@@ -94995,6 +94997,11 @@ var GoCodeAwareVulnerabilityScanner = class {
|
|
|
94995
94997
|
this.projectDir = projectDir;
|
|
94996
94998
|
this.options = options;
|
|
94997
94999
|
}
|
|
95000
|
+
get compressedGoanaBinaryName() {
|
|
95001
|
+
const { platform: platform6, arch } = process;
|
|
95002
|
+
const rarch = arch === "arm" ? "arm64" : arch === "x64" ? "amd64" : arch;
|
|
95003
|
+
return `goana-${platform6}-${rarch}.gz`;
|
|
95004
|
+
}
|
|
94998
95005
|
async runAnalysis(vulns, heuristic, _analyzesAllVulns) {
|
|
94999
95006
|
logger.info("Started instantiating Go code-aware analysis");
|
|
95000
95007
|
if (!existsSync9(join13(this.projectDir, "go.mod")))
|
|
@@ -95004,14 +95011,19 @@ var GoCodeAwareVulnerabilityScanner = class {
|
|
|
95004
95011
|
const vulnsOutputFile = join13(tmpDir, "vulns.json");
|
|
95005
95012
|
const diagnosticsOutputFile = join13(tmpDir, "diagnostics.json");
|
|
95006
95013
|
try {
|
|
95014
|
+
const binaryName = this.compressedGoanaBinaryName;
|
|
95015
|
+
const binaryPath = join13(COANA_REPOS_PATH(), "goana/bin", binaryName);
|
|
95016
|
+
if (!await exists(binaryPath))
|
|
95017
|
+
throw new Error(`goana binary '${binaryName}' not found`);
|
|
95018
|
+
await pipeline(createReadStream(binaryPath), zlib2.createGunzip(), createWriteStream2(join13(tmpDir, "goana"), { mode: 493 }));
|
|
95007
95019
|
const vulnAccPaths = uniq5(vulns.flatMap((v) => v.vulnerabilityAccessPaths));
|
|
95008
|
-
const { error, stderr } = await execNeverFail(cmdt`${
|
|
95020
|
+
const { error, stderr } = await execNeverFail(cmdt`${join13(tmpDir, "goana")}
|
|
95009
95021
|
-output-vulnerabilities ${vulnsOutputFile}
|
|
95010
95022
|
-output-diagnostics ${diagnosticsOutputFile}
|
|
95011
95023
|
-topk=4 ${heuristic.includeTests && "-tests"}
|
|
95012
95024
|
${this.projectDir} ${vulnAccPaths}`, void 0, {
|
|
95013
95025
|
timeout: timeoutInSeconds ? timeoutInSeconds * 1e3 : void 0,
|
|
95014
|
-
env: memoryLimitInMB ? { ...process.env, GOMEMLIMIT: `${memoryLimitInMB}
|
|
95026
|
+
env: memoryLimitInMB ? { ...process.env, GOMEMLIMIT: `${memoryLimitInMB}MiB` } : void 0
|
|
95015
95027
|
});
|
|
95016
95028
|
if (error) {
|
|
95017
95029
|
logger.error("Error running Go code-aware analysis", error);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@socketsecurity/cli-with-sentry",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.92",
|
|
4
4
|
"description": "CLI for Socket.dev, includes Sentry error handling, otherwise identical to the regular `socket` package",
|
|
5
5
|
"homepage": "https://github.com/SocketDev/socket-cli",
|
|
6
6
|
"license": "MIT",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@babel/preset-typescript": "7.27.1",
|
|
86
86
|
"@babel/runtime": "7.28.3",
|
|
87
87
|
"@biomejs/biome": "2.2.0",
|
|
88
|
-
"@coana-tech/cli": "14.11.
|
|
88
|
+
"@coana-tech/cli": "14.11.14",
|
|
89
89
|
"@cyclonedx/cdxgen": "11.6.0",
|
|
90
90
|
"@dotenvx/dotenvx": "1.48.4",
|
|
91
91
|
"@eslint/compat": "1.3.2",
|