@socketsecurity/cli-with-sentry 1.0.10 → 1.0.12
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 +182 -179
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +3 -3
- package/dist/constants.js.map +1 -1
- package/dist/shadow-npm-bin.js +3 -4
- package/dist/shadow-npm-bin.js.map +1 -1
- package/dist/types/commands/fix/git.d.mts.map +1 -1
- package/dist/types/commands/fix/open-pr.d.mts.map +1 -1
- package/dist/types/commands/json/output-cmd-json.d.mts.map +1 -1
- package/dist/types/commands/manifest/cmd-manifest-gradle.d.mts.map +1 -1
- package/dist/types/commands/manifest/cmd-manifest-kotlin.d.mts.map +1 -1
- package/dist/types/commands/manifest/cmd-manifest-scala.d.mts.map +1 -1
- package/dist/types/commands/manifest/detect-manifest-actions.d.mts +1 -1
- package/dist/types/commands/manifest/detect-manifest-actions.d.mts.map +1 -1
- package/dist/types/commands/manifest/generate_auto_manifest.d.mts.map +1 -1
- package/dist/types/commands/optimize/ls-by-agent.d.mts.map +1 -1
- package/dist/types/commands/scan/suggest_branch_slug.d.mts.map +1 -1
- package/dist/types/commands/wrapper/remove-socket-wrapper.d.mts +1 -1
- package/dist/types/commands/wrapper/remove-socket-wrapper.d.mts.map +1 -1
- package/dist/types/shadow/npm/bin.d.mts.map +1 -1
- package/dist/types/utils/coana.d.mts.map +1 -1
- package/dist/types/utils/fs.d.mts +11 -1
- package/dist/types/utils/fs.d.mts.map +1 -1
- package/dist/types/utils/glob.d.mts.map +1 -1
- package/dist/types/utils/package-environment.d.mts.map +1 -1
- package/dist/types/utils/path-resolve.d.mts.map +1 -1
- package/dist/types/utils/socketjson.d.mts +1 -1
- package/dist/types/utils/socketjson.d.mts.map +1 -1
- package/dist/utils.js +34 -30
- package/dist/utils.js.map +1 -1
- package/dist/vendor.js +9 -9
- package/external/@coana-tech/cli/cli.mjs +16 -5
- package/external/@socketsecurity/registry/lib/spawn.js +47 -24
- package/package.json +6 -6
package/dist/vendor.js
CHANGED
|
@@ -35572,7 +35572,7 @@ var isInteractiveExports = /*@__PURE__*/ requireIsInteractive();
|
|
|
35572
35572
|
var dist$e = {};
|
|
35573
35573
|
|
|
35574
35574
|
var name$2 = "@socketsecurity/sdk";
|
|
35575
|
-
var version$5 = "1.4.
|
|
35575
|
+
var version$5 = "1.4.51";
|
|
35576
35576
|
var license = "MIT";
|
|
35577
35577
|
var description = "SDK for the Socket API client";
|
|
35578
35578
|
var author = {
|
|
@@ -35655,27 +35655,27 @@ var scripts = {
|
|
|
35655
35655
|
"update:deps": "npx --yes npm-check-updates"
|
|
35656
35656
|
};
|
|
35657
35657
|
var dependencies = {
|
|
35658
|
-
"@socketsecurity/registry": "1.0.
|
|
35658
|
+
"@socketsecurity/registry": "1.0.217"
|
|
35659
35659
|
};
|
|
35660
35660
|
var devDependencies = {
|
|
35661
|
-
"@biomejs/biome": "2.0.
|
|
35661
|
+
"@biomejs/biome": "2.0.6",
|
|
35662
35662
|
"@dotenvx/dotenvx": "1.45.1",
|
|
35663
35663
|
"@eslint/compat": "1.3.1",
|
|
35664
|
-
"@eslint/js": "9.
|
|
35665
|
-
"@types/node": "24.0.
|
|
35664
|
+
"@eslint/js": "9.30.0",
|
|
35665
|
+
"@types/node": "24.0.7",
|
|
35666
35666
|
"@typescript-eslint/parser": "8.35.0",
|
|
35667
35667
|
"@vitest/coverage-v8": "3.2.4",
|
|
35668
35668
|
"del-cli": "6.0.0",
|
|
35669
|
-
eslint: "9.
|
|
35669
|
+
eslint: "9.30.0",
|
|
35670
35670
|
"eslint-import-resolver-typescript": "4.4.4",
|
|
35671
|
-
"eslint-plugin-import-x": "4.16.
|
|
35671
|
+
"eslint-plugin-import-x": "4.16.1",
|
|
35672
35672
|
"eslint-plugin-jsdoc": "51.2.3",
|
|
35673
35673
|
"eslint-plugin-n": "17.20.0",
|
|
35674
35674
|
"eslint-plugin-sort-destructure-keys": "2.0.0",
|
|
35675
35675
|
"eslint-plugin-unicorn": "56.0.1",
|
|
35676
35676
|
globals: "16.2.0",
|
|
35677
35677
|
husky: "9.1.7",
|
|
35678
|
-
knip: "5.61.
|
|
35678
|
+
knip: "5.61.3",
|
|
35679
35679
|
"lint-staged": "16.1.2",
|
|
35680
35680
|
nock: "14.0.5",
|
|
35681
35681
|
"npm-run-all2": "8.0.4",
|
|
@@ -172598,5 +172598,5 @@ exports.terminalLinkExports = terminalLinkExports;
|
|
|
172598
172598
|
exports.updater = updater$1;
|
|
172599
172599
|
exports.yargsParser = yargsParser;
|
|
172600
172600
|
exports.yoctocolorsCjsExports = yoctocolorsCjsExports;
|
|
172601
|
-
//# debugId=
|
|
172601
|
+
//# debugId=d7210c67-fab3-4cc3-8e6c-db0dd8a99646
|
|
172602
172602
|
//# sourceMappingURL=vendor.js.map
|
|
@@ -221973,7 +221973,7 @@ async function onlineScan(dependencyTree, apiKey, timeout) {
|
|
|
221973
221973
|
}
|
|
221974
221974
|
|
|
221975
221975
|
// dist/version.js
|
|
221976
|
-
var version2 = "14.9.
|
|
221976
|
+
var version2 = "14.9.34";
|
|
221977
221977
|
|
|
221978
221978
|
// ../../node_modules/.pnpm/axios@1.9.0/node_modules/axios/lib/helpers/bind.js
|
|
221979
221979
|
function bind2(fn2, thisArg) {
|
|
@@ -226497,9 +226497,21 @@ async function computeFixesAndUpgradePurls(path2, options) {
|
|
|
226497
226497
|
...vulnerableArtifactIdsPerVulnerability.get(ghsa)?.values() ?? []
|
|
226498
226498
|
]);
|
|
226499
226499
|
const computedFix = await useSocketComputeFixEndpoint(artifacts, vulnerableArtifactIdsForGhsas);
|
|
226500
|
-
if (computedFix.type !== "
|
|
226500
|
+
if (computedFix.type !== "success") {
|
|
226501
226501
|
throw new Error(`No fix found for the given vulnerabilities`);
|
|
226502
226502
|
}
|
|
226503
|
+
if (computedFix.failedArtifacts) {
|
|
226504
|
+
const ghsasFailedToFix = options.applyFixesTo.filter((ghsa) => {
|
|
226505
|
+
const artifactIds = vulnerableArtifactIdsPerVulnerability.get(ghsa);
|
|
226506
|
+
if (!artifactIds)
|
|
226507
|
+
return false;
|
|
226508
|
+
return Array.from(artifactIds).some((vuln) => computedFix.failedArtifacts?.includes(vuln));
|
|
226509
|
+
});
|
|
226510
|
+
logger.info("Failed to compute fixes for the following vulnerabilities:");
|
|
226511
|
+
for (const ghsa of ghsasFailedToFix) {
|
|
226512
|
+
logger.info(` - ${ghsa} (${Array.from(vulnerableArtifactIdsPerVulnerability.get(ghsa)).map((id) => simplePurl(artifacts[id].type, artifacts[id].namespace ?? null, artifacts[id].name, artifacts[id].version ?? null)).join(", ")})`);
|
|
226513
|
+
}
|
|
226514
|
+
}
|
|
226503
226515
|
if (options.dryRun) {
|
|
226504
226516
|
logger.info("Fixes found:");
|
|
226505
226517
|
for (const fix of computedFix.fixes) {
|
|
@@ -226608,9 +226620,8 @@ async function useSocketComputeFixEndpoint(artifacts, vulnerableArtifactIdsForGh
|
|
|
226608
226620
|
} catch (error) {
|
|
226609
226621
|
logger.error("Request to compute fixes failed:", error);
|
|
226610
226622
|
return {
|
|
226611
|
-
type: "error
|
|
226612
|
-
message: "Error during computation"
|
|
226613
|
-
fixes: []
|
|
226623
|
+
type: "error",
|
|
226624
|
+
message: "Error during computation"
|
|
226614
226625
|
};
|
|
226615
226626
|
}
|
|
226616
226627
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
+
const { stripAnsi } = /*@__PURE__*/ require('./strings')
|
|
4
|
+
|
|
5
|
+
const { keys: ObjectKeys } = Object
|
|
6
|
+
|
|
3
7
|
let _child_process
|
|
4
8
|
/*@__NO_SIDE_EFFECTS__*/
|
|
5
9
|
function getChildProcess() {
|
|
@@ -20,35 +24,48 @@ function getSpawn() {
|
|
|
20
24
|
return _spawn
|
|
21
25
|
}
|
|
22
26
|
|
|
27
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
28
|
+
function isStdioType(stdio, type) {
|
|
29
|
+
return (
|
|
30
|
+
stdio === type ||
|
|
31
|
+
(!stdio && type === 'pipe') ||
|
|
32
|
+
(Array.isArray(stdio) &&
|
|
33
|
+
stdio.length > 2 &&
|
|
34
|
+
stdio[0] === type &&
|
|
35
|
+
stdio[1] === type &&
|
|
36
|
+
stdio[2] === type)
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
41
|
+
function stripAnsiFromSpawnResult(result) {
|
|
42
|
+
const { stderr, stdout } = result
|
|
43
|
+
if (typeof stdout === 'string') {
|
|
44
|
+
result.stdout = stripAnsi(stdout)
|
|
45
|
+
}
|
|
46
|
+
if (typeof stderr === 'string') {
|
|
47
|
+
result.stderr = stripAnsi(stderr)
|
|
48
|
+
}
|
|
49
|
+
return result
|
|
50
|
+
}
|
|
51
|
+
|
|
23
52
|
/*@__NO_SIDE_EFFECTS__*/
|
|
24
53
|
function spawn(cmd, args, options, extra) {
|
|
25
54
|
const {
|
|
26
55
|
spinner = /*@__PURE__*/ require('./constants/spinner'),
|
|
56
|
+
stripAnsi: shouldStripAnsi = true,
|
|
27
57
|
...spawnOptions
|
|
28
58
|
} = { __proto__: null, ...options }
|
|
29
59
|
const spawn = getSpawn()
|
|
30
60
|
const isSpinning = !!spinner?.isSpinning
|
|
31
|
-
const { env, stdio } = spawnOptions
|
|
61
|
+
const { env, stdio, stdioString = true } = spawnOptions
|
|
32
62
|
// The stdio option can be a string or an array.
|
|
33
63
|
// https://nodejs.org/api/child_process.html#optionsstdio
|
|
34
|
-
const
|
|
35
|
-
stdio
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
stdio[1] === 'ignore' &&
|
|
40
|
-
stdio[2] === 'ignore')
|
|
41
|
-
const isStdioPiped =
|
|
42
|
-
stdio === undefined ||
|
|
43
|
-
stdio === 'pipe' ||
|
|
44
|
-
(Array.isArray(stdio) &&
|
|
45
|
-
stdio.length > 2 &&
|
|
46
|
-
stdio[0] === 'pipe' &&
|
|
47
|
-
stdio[1] === 'pipe' &&
|
|
48
|
-
stdio[2] === 'pipe')
|
|
49
|
-
const shouldPauseSpinner = !isStdioIgnored && !isStdioPiped
|
|
50
|
-
if (shouldPauseSpinner) {
|
|
51
|
-
spinner?.stop()
|
|
64
|
+
const shouldStopSpinner =
|
|
65
|
+
isSpinning && !isStdioType(stdio, 'ignore') && !isStdioType(stdio, 'pipe')
|
|
66
|
+
const shouldRestartSpinner = shouldStopSpinner
|
|
67
|
+
if (shouldStopSpinner) {
|
|
68
|
+
spinner.stop()
|
|
52
69
|
}
|
|
53
70
|
let spawnPromise = spawn(
|
|
54
71
|
cmd,
|
|
@@ -69,13 +86,19 @@ function spawn(cmd, args, options, extra) {
|
|
|
69
86
|
},
|
|
70
87
|
extra
|
|
71
88
|
)
|
|
72
|
-
|
|
73
|
-
|
|
89
|
+
const oldSpawnPromise = spawnPromise
|
|
90
|
+
if (shouldStripAnsi && stdioString) {
|
|
91
|
+
spawnPromise = spawnPromise.then(stripAnsiFromSpawnResult).catch(error => {
|
|
92
|
+
throw stripAnsiFromSpawnResult(error)
|
|
93
|
+
})
|
|
94
|
+
}
|
|
95
|
+
if (shouldRestartSpinner) {
|
|
74
96
|
spawnPromise = spawnPromise.finally(() => {
|
|
75
|
-
spinner
|
|
97
|
+
spinner.start()
|
|
76
98
|
})
|
|
77
|
-
|
|
78
|
-
|
|
99
|
+
}
|
|
100
|
+
for (const key of ObjectKeys(oldSpawnPromise)) {
|
|
101
|
+
spawnPromise[key] = oldSpawnPromise[key]
|
|
79
102
|
}
|
|
80
103
|
return spawnPromise
|
|
81
104
|
}
|
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.12",
|
|
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.27.6",
|
|
87
87
|
"@biomejs/biome": "2.0.6",
|
|
88
|
-
"@coana-tech/cli": "14.9.
|
|
88
|
+
"@coana-tech/cli": "14.9.34",
|
|
89
89
|
"@cyclonedx/cdxgen": "11.4.1",
|
|
90
90
|
"@dotenvx/dotenvx": "1.45.1",
|
|
91
91
|
"@eslint/compat": "1.3.1",
|
|
@@ -112,8 +112,8 @@
|
|
|
112
112
|
"@socketregistry/is-interactive": "1.0.6",
|
|
113
113
|
"@socketregistry/packageurl-js": "1.0.8",
|
|
114
114
|
"@socketsecurity/config": "3.0.1",
|
|
115
|
-
"@socketsecurity/registry": "1.0.
|
|
116
|
-
"@socketsecurity/sdk": "1.4.
|
|
115
|
+
"@socketsecurity/registry": "1.0.220",
|
|
116
|
+
"@socketsecurity/sdk": "1.4.51",
|
|
117
117
|
"@types/blessed": "0.1.25",
|
|
118
118
|
"@types/cmd-shim": "5.0.2",
|
|
119
119
|
"@types/js-yaml": "4.0.9",
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"@types/which": "3.0.4",
|
|
128
128
|
"@types/yargs-parser": "21.0.3",
|
|
129
129
|
"@typescript-eslint/parser": "8.35.0",
|
|
130
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
130
|
+
"@typescript/native-preview": "7.0.0-dev.20250630.1",
|
|
131
131
|
"@vitest/coverage-v8": "3.2.4",
|
|
132
132
|
"blessed": "0.1.81",
|
|
133
133
|
"blessed-contrib": "4.11.0",
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
"npm-package-arg": "12.0.2",
|
|
159
159
|
"npm-run-all2": "8.0.4",
|
|
160
160
|
"open": "10.1.2",
|
|
161
|
-
"oxlint": "1.
|
|
161
|
+
"oxlint": "1.4.0",
|
|
162
162
|
"pony-cause": "2.1.11",
|
|
163
163
|
"registry-auth-token": "5.1.0",
|
|
164
164
|
"registry-url": "7.2.0",
|