@socketsecurity/cli-with-sentry 1.1.134 → 1.1.136
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/CHANGELOG.md +14 -0
- package/dist/cli.js +104 -29
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +4 -4
- package/dist/constants.js.map +1 -1
- package/dist/manifest-scripts/maven-extension/coana-maven-extension.jar +0 -0
- package/dist/manifest-scripts/socket-facts.init.gradle +38 -13
- package/dist/manifest-scripts/socket-facts.plugin.scala +30 -7
- package/dist/tsconfig.dts.tsbuildinfo +1 -1
- package/dist/types/commands/manifest/detect-manifest-actions.d.mts.map +1 -1
- package/dist/types/commands/manifest/run-manifest-facts.d.mts.map +1 -1
- package/dist/types/commands/manifest/scripts/records.d.mts +3 -1
- package/dist/types/commands/manifest/scripts/records.d.mts.map +1 -1
- package/dist/types/commands/manifest/scripts/resolution-report-gradle.d.mts.map +1 -1
- package/dist/types/commands/manifest/scripts/resolution-report-render.d.mts +3 -1
- package/dist/types/commands/manifest/scripts/resolution-report-render.d.mts.map +1 -1
- package/dist/types/commands/manifest/scripts/resolution-report.d.mts +6 -0
- package/dist/types/commands/manifest/scripts/resolution-report.d.mts.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
6
6
|
|
|
7
|
+
## [1.1.136](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.136) - 2026-07-02
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
- `socket manifest gradle --facts` now reports Gradle configurations it can't resolve instead of silently skipping them, failing the run unless you pass `--ignore-unresolved` so an incomplete scan can't slip by. Benign variant-selection ambiguity stays a one-line notice.
|
|
11
|
+
- Config filters (`--include-configs` / `--exclude-configs`) for `socket manifest gradle`, `kotlin`, `scala`, and `maven` are now case-sensitive, as documented, and support `[...]` character classes — e.g. `*[Tt]est*` matches both `testCompileClasspath` and `androidTestCompileClasspath`.
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- `socket manifest auto` and `socket scan create --auto-manifest` now detect a Gradle project by its build files (`build.gradle`/`.kts` or `settings.gradle`/`.kts`) instead of requiring a `gradlew` wrapper, so wrapper-less projects — including settings-only multi-module roots — are no longer skipped.
|
|
15
|
+
|
|
16
|
+
## [1.1.135](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.135) - 2026-07-01
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- Updated the Coana CLI to v `15.6.7`.
|
|
20
|
+
|
|
7
21
|
## [1.1.134](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.134) - 2026-07-01
|
|
8
22
|
|
|
9
23
|
### Fixed
|
package/dist/cli.js
CHANGED
|
@@ -1953,7 +1953,9 @@ sockJson, cwd = process.cwd()) {
|
|
|
1953
1953
|
}
|
|
1954
1954
|
if (sockJson?.defaults?.manifest?.gradle?.disabled) {
|
|
1955
1955
|
require$$9.debugLog('notice', `[DEBUG] - gradle auto-detection is disabled in ${constants.SOCKET_JSON}`);
|
|
1956
|
-
} else if (fs$1.existsSync(path.join(cwd, '
|
|
1956
|
+
} else if (fs$1.existsSync(path.join(cwd, 'build.gradle')) || fs$1.existsSync(path.join(cwd, 'build.gradle.kts')) || fs$1.existsSync(path.join(cwd, 'settings.gradle')) || fs$1.existsSync(path.join(cwd, 'settings.gradle.kts'))) {
|
|
1957
|
+
// Detect by build descriptor, not the `gradlew` wrapper (a project can build via
|
|
1958
|
+
// `gradle` on PATH). `settings.gradle(.kts)` covers Kotlin-DSL roots with no root build script.
|
|
1957
1959
|
require$$9.debugLog('notice', '[DEBUG] - Detected a gradle build file');
|
|
1958
1960
|
output.gradle = true;
|
|
1959
1961
|
output.count += 1;
|
|
@@ -4284,8 +4286,9 @@ function classifyGradleFailure(detail) {
|
|
|
4284
4286
|
if (t.includes('conflict on capability')) {
|
|
4285
4287
|
return 'capability-conflict';
|
|
4286
4288
|
}
|
|
4287
|
-
// Zero compatible variants — the opposite of ambiguity below.
|
|
4288
|
-
|
|
4289
|
+
// Zero compatible variants — the opposite of ambiguity below. Gradle phrases
|
|
4290
|
+
// this several ways depending on version and whether attributes were supplied.
|
|
4291
|
+
if (t.includes('no matching variant') || t.includes('no variants of') || t.includes('unable to find a matching variant') || t.includes('no compatible variant')) {
|
|
4289
4292
|
return 'no-matching-variant';
|
|
4290
4293
|
}
|
|
4291
4294
|
if (t.includes('cannot choose between')) {
|
|
@@ -4459,6 +4462,8 @@ function firstLine(s) {
|
|
|
4459
4462
|
// classifier/type, so relating a failed and a succeeded dep is unsound.
|
|
4460
4463
|
function renderResolutionReport(failures, scannedConfigs, dialect, opts = {}) {
|
|
4461
4464
|
const name = dialect.label;
|
|
4465
|
+
const unscannable = opts.unscannable ?? [];
|
|
4466
|
+
const unscannableConfigs = new Set(unscannable.map(u => u.config));
|
|
4462
4467
|
const specOf = new Map(dialect.categories.map(c => [c.key, c]));
|
|
4463
4468
|
const isBlocking = cat => specOf.get(cat)?.blocking ?? true;
|
|
4464
4469
|
|
|
@@ -4485,16 +4490,31 @@ function renderResolutionReport(failures, scannedConfigs, dialect, opts = {}) {
|
|
|
4485
4490
|
}
|
|
4486
4491
|
}
|
|
4487
4492
|
const allInfos = [...byKey.values()];
|
|
4488
|
-
|
|
4493
|
+
|
|
4494
|
+
// A whole-config throw is classified by the same cause rules as a per-dep
|
|
4495
|
+
// failure: ambiguity stays lenient, every other cause is fail-closed.
|
|
4496
|
+
const unscannableInfos = unscannable.map(u => {
|
|
4497
|
+
const category = dialect.classify(u.detail);
|
|
4498
|
+
return {
|
|
4499
|
+
...u,
|
|
4500
|
+
category,
|
|
4501
|
+
blocking: isBlocking(category)
|
|
4502
|
+
};
|
|
4503
|
+
});
|
|
4504
|
+
const blockingUnscannable = unscannableInfos.filter(u => u.blocking);
|
|
4505
|
+
const nonBlockingUnscannable = unscannableInfos.filter(u => !u.blocking);
|
|
4506
|
+
const perDepBlockingConfigs = new Set();
|
|
4489
4507
|
for (const info of allInfos) {
|
|
4490
4508
|
if (isBlocking(info.category)) {
|
|
4491
4509
|
for (const c of info.configs) {
|
|
4492
|
-
|
|
4510
|
+
perDepBlockingConfigs.add(c);
|
|
4493
4511
|
}
|
|
4494
4512
|
}
|
|
4495
4513
|
}
|
|
4514
|
+
const blockingConfigs = new Set([...perDepBlockingConfigs, ...blockingUnscannable.map(u => u.config)]);
|
|
4496
4515
|
const blockingFailed = [...blockingConfigs].sort();
|
|
4497
|
-
|
|
4516
|
+
// An un-scannable config was attempted but resolved nothing, so it didn't succeed.
|
|
4517
|
+
const succeeded = scannedConfigs.filter(c => !blockingConfigs.has(c) && !unscannableConfigs.has(c)).sort();
|
|
4498
4518
|
const groups = dialect.categories.map(spec => ({
|
|
4499
4519
|
spec,
|
|
4500
4520
|
infos: dedupCoords(allInfos.filter(i => i.category === spec.key).map(i => i.coord)).map(c => byKey.get(keyOf(c, spec.key)))
|
|
@@ -4502,24 +4522,41 @@ function renderResolutionReport(failures, scannedConfigs, dialect, opts = {}) {
|
|
|
4502
4522
|
const blockingGroups = groups.filter(g => g.spec.blocking);
|
|
4503
4523
|
const nonBlockingGroups = groups.filter(g => !g.spec.blocking);
|
|
4504
4524
|
const blockingCount = blockingGroups.reduce((n, g) => n + g.infos.length, 0);
|
|
4505
|
-
const hasBlockingFailures = blockingCount > 0;
|
|
4525
|
+
const hasBlockingFailures = blockingCount > 0 || blockingUnscannable.length > 0;
|
|
4506
4526
|
const willFail = hasBlockingFailures && !opts.ignoreUnresolved;
|
|
4507
4527
|
const out = [];
|
|
4508
4528
|
if (hasBlockingFailures) {
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
const
|
|
4518
|
-
|
|
4519
|
-
|
|
4529
|
+
if (blockingCount > 0) {
|
|
4530
|
+
out.push(opts.ignoreUnresolved ? `Ignored ${blockingCount} unresolved dependency(ies) in ${perDepBlockingConfigs.size} configuration(s):` : `Could not resolve ${blockingCount} dependency(ies) in ${perDepBlockingConfigs.size} configuration(s):`);
|
|
4531
|
+
for (const {
|
|
4532
|
+
infos,
|
|
4533
|
+
spec
|
|
4534
|
+
} of blockingGroups) {
|
|
4535
|
+
out.push('');
|
|
4536
|
+
out.push(spec.header ? spec.header(name) : '');
|
|
4537
|
+
for (const info of infos.slice(0, RESOLUTION_REPORT_ARTIFACT_LIMIT)) {
|
|
4538
|
+
const fl = firstLine(info.detail);
|
|
4539
|
+
const reasonSuffix = spec.showReason && fl ? ` [${fl}]` : '';
|
|
4540
|
+
out.push(` - ${info.coord}${reasonSuffix}`);
|
|
4541
|
+
}
|
|
4542
|
+
if (infos.length > RESOLUTION_REPORT_ARTIFACT_LIMIT) {
|
|
4543
|
+
out.push(` … and ${infos.length - RESOLUTION_REPORT_ARTIFACT_LIMIT} more`);
|
|
4544
|
+
}
|
|
4545
|
+
}
|
|
4546
|
+
}
|
|
4547
|
+
if (blockingUnscannable.length) {
|
|
4548
|
+
// Separate from the per-dep block above, but only if there is one — otherwise
|
|
4549
|
+
// the summary would lead with a blank line (a dangling ✗ under logger.fail).
|
|
4550
|
+
if (out.length) {
|
|
4551
|
+
out.push('');
|
|
4552
|
+
}
|
|
4553
|
+
out.push(opts.ignoreUnresolved ? `Ignored ${blockingUnscannable.length} configuration(s) that could not be scanned:` : `Could not scan ${blockingUnscannable.length} configuration(s) (reason from ${name}):`);
|
|
4554
|
+
for (const u of blockingUnscannable.slice(0, RESOLUTION_REPORT_CONFIG_LIMIT)) {
|
|
4555
|
+
const fl = firstLine(u.detail);
|
|
4556
|
+
out.push(` - ${u.config}${fl ? ` [${fl}]` : ''}`);
|
|
4520
4557
|
}
|
|
4521
|
-
if (
|
|
4522
|
-
out.push(` … and ${
|
|
4558
|
+
if (blockingUnscannable.length > RESOLUTION_REPORT_CONFIG_LIMIT) {
|
|
4559
|
+
out.push(` … and ${blockingUnscannable.length - RESOLUTION_REPORT_CONFIG_LIMIT} more`);
|
|
4523
4560
|
}
|
|
4524
4561
|
}
|
|
4525
4562
|
out.push('');
|
|
@@ -4551,6 +4588,12 @@ function renderResolutionReport(failures, scannedConfigs, dialect, opts = {}) {
|
|
|
4551
4588
|
const configCount = new Set(infos.flatMap(i => [...i.configs])).size;
|
|
4552
4589
|
notices.push(spec.notice(name, infos.length, configCount));
|
|
4553
4590
|
}
|
|
4591
|
+
// A config-level throw whose cause classifies as variant ambiguity is surfaced, not failed —
|
|
4592
|
+
// matching the deliberately-lenient per-dep variant-ambiguity policy.
|
|
4593
|
+
if (nonBlockingUnscannable.length) {
|
|
4594
|
+
const n = new Set(nonBlockingUnscannable.map(u => u.config)).size;
|
|
4595
|
+
notices.push(`Could not scan ${n} configuration(s) — re-run with --verbose for ${name}'s messages.`);
|
|
4596
|
+
}
|
|
4554
4597
|
const detailLines = [`${name}'s full message for each unresolved dependency:`];
|
|
4555
4598
|
for (const info of allInfos) {
|
|
4556
4599
|
detailLines.push('');
|
|
@@ -4559,6 +4602,17 @@ function renderResolutionReport(failures, scannedConfigs, dialect, opts = {}) {
|
|
|
4559
4602
|
detailLines.push(` ${line}`);
|
|
4560
4603
|
}
|
|
4561
4604
|
}
|
|
4605
|
+
if (unscannable.length) {
|
|
4606
|
+
detailLines.push('');
|
|
4607
|
+
detailLines.push(`${name} configurations that could not be scanned:`);
|
|
4608
|
+
for (const u of unscannable) {
|
|
4609
|
+
detailLines.push('');
|
|
4610
|
+
detailLines.push(` ${u.config}:`);
|
|
4611
|
+
for (const line of (u.detail || '(no message)').split('\n')) {
|
|
4612
|
+
detailLines.push(` ${line}`);
|
|
4613
|
+
}
|
|
4614
|
+
}
|
|
4615
|
+
}
|
|
4562
4616
|
return {
|
|
4563
4617
|
summary: out.join('\n'),
|
|
4564
4618
|
details: detailLines.join('\n'),
|
|
@@ -4937,9 +4991,19 @@ function buildReport(parsed) {
|
|
|
4937
4991
|
seen.add(key);
|
|
4938
4992
|
return true;
|
|
4939
4993
|
});
|
|
4994
|
+
const seenUnscannable = new Set();
|
|
4995
|
+
const unscannable = parsed.unscannable.filter(u => {
|
|
4996
|
+
const key = `${u.config}|${u.detail}`;
|
|
4997
|
+
if (seenUnscannable.has(key)) {
|
|
4998
|
+
return false;
|
|
4999
|
+
}
|
|
5000
|
+
seenUnscannable.add(key);
|
|
5001
|
+
return true;
|
|
5002
|
+
});
|
|
4940
5003
|
return {
|
|
4941
5004
|
failures,
|
|
4942
|
-
scannedConfigs: parsed.scannedConfigs
|
|
5005
|
+
scannedConfigs: parsed.scannedConfigs,
|
|
5006
|
+
unscannable
|
|
4943
5007
|
};
|
|
4944
5008
|
}
|
|
4945
5009
|
|
|
@@ -4985,6 +5049,7 @@ function resolveBuildToolBin(tool, projectDir, bin) {
|
|
|
4985
5049
|
// file rootId coordId path (--with-files only)
|
|
4986
5050
|
// scanned config
|
|
4987
5051
|
// failure coord detail config
|
|
5052
|
+
// unscannable config detail
|
|
4988
5053
|
//
|
|
4989
5054
|
// A `root` is one (subproject, configuration) resolution root; `coordId` is the
|
|
4990
5055
|
// coordinate key (`group:name:ext:classifier:version`, empty segments dropped),
|
|
@@ -5017,7 +5082,8 @@ function parseRecords(text) {
|
|
|
5017
5082
|
projects: new Map(),
|
|
5018
5083
|
roots: new Map(),
|
|
5019
5084
|
scannedConfigs: [],
|
|
5020
|
-
failures: []
|
|
5085
|
+
failures: [],
|
|
5086
|
+
unscannable: []
|
|
5021
5087
|
};
|
|
5022
5088
|
const scanned = new Set();
|
|
5023
5089
|
const root = id => {
|
|
@@ -5138,6 +5204,14 @@ function parseRecords(text) {
|
|
|
5138
5204
|
});
|
|
5139
5205
|
}
|
|
5140
5206
|
break;
|
|
5207
|
+
case 'unscannable':
|
|
5208
|
+
if (f[1]) {
|
|
5209
|
+
result.unscannable.push({
|
|
5210
|
+
config: f[1],
|
|
5211
|
+
detail: f[2] ?? ''
|
|
5212
|
+
});
|
|
5213
|
+
}
|
|
5214
|
+
break;
|
|
5141
5215
|
}
|
|
5142
5216
|
}
|
|
5143
5217
|
result.scannedConfigs = [...scanned].sort();
|
|
@@ -5448,7 +5522,8 @@ async function runManifestFacts({
|
|
|
5448
5522
|
stdout
|
|
5449
5523
|
} = result;
|
|
5450
5524
|
const rendered = renderResolutionErrorReport(report.failures, report.scannedConfigs, ecosystem, {
|
|
5451
|
-
ignoreUnresolved
|
|
5525
|
+
ignoreUnresolved,
|
|
5526
|
+
unscannable: report.unscannable
|
|
5452
5527
|
});
|
|
5453
5528
|
if (rendered.hasBlockingFailures) {
|
|
5454
5529
|
if (ignoreUnresolved) {
|
|
@@ -5475,7 +5550,7 @@ async function runManifestFacts({
|
|
|
5475
5550
|
// exception in the extension. The build tool's own exit is the only signal, so
|
|
5476
5551
|
// fail closed rather than silently dropping the ecosystem with an empty SBOM
|
|
5477
5552
|
// (the empty-facts branch below would otherwise just log "nothing to upload").
|
|
5478
|
-
if (code !== 0 && !facts.components.length && !facts.projects?.length && !report.failures.length) {
|
|
5553
|
+
if (code !== 0 && !facts.components.length && !facts.projects?.length && !report.failures.length && !report.unscannable.length) {
|
|
5479
5554
|
if (!verbose) {
|
|
5480
5555
|
const tail = tailBuildOutput(stdout, stderr);
|
|
5481
5556
|
if (tail) {
|
|
@@ -11502,7 +11577,7 @@ const config$c = {
|
|
|
11502
11577
|
},
|
|
11503
11578
|
includeConfigs: {
|
|
11504
11579
|
type: 'string',
|
|
11505
|
-
description: 'When generating facts: comma-separated glob patterns matched against Gradle configuration names (case-sensitive
|
|
11580
|
+
description: 'When generating facts: comma-separated glob patterns matched against Gradle configuration names (case-sensitive; `*`, `?`, and `[...]` wildcards). Only configurations matching at least one pattern are resolved. e.g. `*CompileClasspath,*RuntimeClasspath`. Default: every resolvable configuration'
|
|
11506
11581
|
},
|
|
11507
11582
|
excludeConfigs: {
|
|
11508
11583
|
type: 'string',
|
|
@@ -11748,7 +11823,7 @@ const config$b = {
|
|
|
11748
11823
|
},
|
|
11749
11824
|
includeConfigs: {
|
|
11750
11825
|
type: 'string',
|
|
11751
|
-
description: 'When generating facts: comma-separated glob patterns matched against Gradle configuration names (case-sensitive
|
|
11826
|
+
description: 'When generating facts: comma-separated glob patterns matched against Gradle configuration names (case-sensitive; `*`, `?`, and `[...]` wildcards). Only configurations matching at least one pattern are resolved. e.g. `*CompileClasspath,*RuntimeClasspath`. Default: every resolvable configuration'
|
|
11752
11827
|
},
|
|
11753
11828
|
excludeConfigs: {
|
|
11754
11829
|
type: 'string',
|
|
@@ -11979,7 +12054,7 @@ const config$a = {
|
|
|
11979
12054
|
},
|
|
11980
12055
|
includeConfigs: {
|
|
11981
12056
|
type: 'string',
|
|
11982
|
-
description: 'Comma-separated glob patterns matched against Maven dependency scopes (case-sensitive
|
|
12057
|
+
description: 'Comma-separated glob patterns matched against Maven dependency scopes (case-sensitive; `*`, `?`, and `[...]` wildcards). Only scopes matching at least one pattern are resolved. e.g. `compile,runtime`. Default: every scope'
|
|
11983
12058
|
},
|
|
11984
12059
|
excludeConfigs: {
|
|
11985
12060
|
type: 'string',
|
|
@@ -12171,7 +12246,7 @@ const config$9 = {
|
|
|
12171
12246
|
},
|
|
12172
12247
|
includeConfigs: {
|
|
12173
12248
|
type: 'string',
|
|
12174
|
-
description: 'When generating facts: comma-separated glob patterns matched against sbt configuration names (case-sensitive
|
|
12249
|
+
description: 'When generating facts: comma-separated glob patterns matched against sbt configuration names (case-sensitive; `*`, `?`, and `[...]` wildcards). Only configurations matching at least one pattern are resolved. e.g. `compile,test`. Default: compile,optional,provided,runtime,test'
|
|
12175
12250
|
},
|
|
12176
12251
|
excludeConfigs: {
|
|
12177
12252
|
type: 'string',
|
|
@@ -21840,5 +21915,5 @@ process.on('unhandledRejection', async (reason, promise) => {
|
|
|
21840
21915
|
// eslint-disable-next-line n/no-process-exit
|
|
21841
21916
|
process.exit(1);
|
|
21842
21917
|
});
|
|
21843
|
-
//# debugId=
|
|
21918
|
+
//# debugId=7e8416d5-be6a-4d93-954d-13ea1803d95e
|
|
21844
21919
|
//# sourceMappingURL=cli.js.map
|