socket 1.1.123 → 1.1.126
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 +21 -0
- package/README.md +8 -0
- package/bin/cli.js +33 -1
- package/dist/cli.js +476 -124
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +4 -4
- package/dist/constants.js.map +1 -1
- package/dist/tsconfig.dts.tsbuildinfo +1 -1
- package/dist/types/commands/ci/handle-ci.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-maven.d.mts +9 -0
- package/dist/types/commands/manifest/cmd-manifest-maven.d.mts.map +1 -0
- package/dist/types/commands/manifest/cmd-manifest-scala.d.mts.map +1 -1
- package/dist/types/commands/manifest/cmd-manifest.d.mts.map +1 -1
- package/dist/types/commands/manifest/coana-manifest-facts.d.mts +6 -6
- package/dist/types/commands/manifest/coana-manifest-facts.d.mts.map +1 -1
- package/dist/types/commands/manifest/convert-maven-to-facts.d.mts +15 -0
- package/dist/types/commands/manifest/convert-maven-to-facts.d.mts.map +1 -0
- package/dist/types/commands/manifest/detect-manifest-actions.d.mts +1 -0
- 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/manifest/parse-build-tool-opts.d.mts +9 -0
- package/dist/types/commands/manifest/parse-build-tool-opts.d.mts.map +1 -0
- package/dist/types/commands/manifest/setup-manifest-config.d.mts.map +1 -1
- package/dist/types/commands/scan/cmd-scan-create.d.mts.map +1 -1
- package/dist/types/commands/scan/cmd-scan-reach.d.mts.map +1 -1
- package/dist/types/commands/scan/finalize-tier1-scan.d.mts +5 -3
- package/dist/types/commands/scan/finalize-tier1-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/handle-create-new-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/perform-reachability-analysis.d.mts +1 -0
- package/dist/types/commands/scan/perform-reachability-analysis.d.mts.map +1 -1
- package/dist/types/commands/scan/reachability-flags.d.mts.map +1 -1
- package/dist/types/utils/socket-json.d.mts +9 -0
- package/dist/types/utils/socket-json.d.mts.map +1 -1
- package/dist/utils.js +2 -2
- package/dist/utils.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,27 @@ 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.126](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.126) - 2026-06-22
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
- Reachability analysis types are now referred to by descriptive names in command help, output, and docs: Full application reachability (formerly Tier 1), Precomputed reachability (formerly Tier 2), and Dependency reachability (formerly Tier 3).
|
|
11
|
+
- Updated the Coana CLI to v `15.5.7`.
|
|
12
|
+
|
|
13
|
+
## [1.1.125](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.125) - 2026-06-22
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- New `socket manifest maven` command generates a Socket facts file (`.socket.facts.json`) directly from a Maven `pom.xml` project. Like the Gradle and sbt generators, it auto-detects your project, plugs into `socket manifest auto` and the `socket manifest setup` configurator, and accepts `--maven-opts` to pass options through to Maven (e.g. `--maven-opts="-P release -s settings.xml"`), plus `--bin` to point at a wrapper such as `./mvnw`.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- Updated the Coana CLI to v `15.5.5`.
|
|
20
|
+
|
|
21
|
+
## [1.1.124](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.124) - 2026-06-19
|
|
22
|
+
|
|
23
|
+
- `socket scan create --reach` accepts a new `--reach-retain-facts-file` flag. By default the CLI deletes the `.socket.facts.json` reachability report from the scan directory after a successful scan; pass this flag to keep it (e.g. for inspection or debugging). **Important:** you must delete the retained `.socket.facts.json` before running a fresh full application reachability scan — a stale file left in place is picked up as a pre-generated input and silently overrides fresh analysis, so the new scan results will not be reliable.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
- Updated the Coana CLI to v `15.5.4`.
|
|
27
|
+
|
|
7
28
|
## [1.1.123](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.123) - 2026-06-18
|
|
8
29
|
|
|
9
30
|
### Added
|
package/README.md
CHANGED
|
@@ -60,6 +60,14 @@ All aliases support the flags and arguments of the commands they alias.
|
|
|
60
60
|
|
|
61
61
|
- `socket ci` - Alias for `socket scan create --report` (creates report and exits with error if unhealthy)
|
|
62
62
|
|
|
63
|
+
## Reachability analysis
|
|
64
|
+
|
|
65
|
+
Socket reachability analysis comes in three forms:
|
|
66
|
+
|
|
67
|
+
- **Full application reachability** (formerly Tier 1): Analyzes your application together with its dependencies to determine whether vulnerable code is actually invoked from your code through the full dependency graph — the highest-precision reachability analysis. Run it with `socket scan create --reach`.
|
|
68
|
+
- **Precomputed reachability** (formerly Tier 2): Determines whether vulnerable code in transitive dependencies is reachable through your direct dependencies, using precomputed static analysis of dependency chains (no access to your application code required). In the CLI this is the fallback used when full application reachability cannot complete (see the `--reach-continue-on-*` flags).
|
|
69
|
+
- **Dependency reachability** (formerly Tier 3): Package-level filtering that detects which dependencies are actually used, so CVEs in unused/dead dependencies can be filtered out.
|
|
70
|
+
|
|
63
71
|
## Flags
|
|
64
72
|
|
|
65
73
|
### Output flags
|
package/bin/cli.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
void (async () => {
|
|
5
5
|
const Module = require('node:module')
|
|
6
|
+
const os = require('node:os')
|
|
6
7
|
const path = require('node:path')
|
|
7
8
|
const rootPath = path.join(__dirname, '..')
|
|
8
9
|
Module.enableCompileCache?.(path.join(rootPath, '.cache'))
|
|
@@ -38,10 +39,41 @@ void (async () => {
|
|
|
38
39
|
},
|
|
39
40
|
)
|
|
40
41
|
|
|
42
|
+
// The child shares our process group and handles the signal itself; wait briefly for it
|
|
43
|
+
// to exit (so its final output isn't printed after the prompt returns) and mirror its
|
|
44
|
+
// exit below. SIGKILL and leave if it outlasts the grace, or on a second signal.
|
|
45
|
+
const SHUTDOWN_GRACE_MS = 3_000
|
|
46
|
+
const hardAbort = signalName => {
|
|
47
|
+
const child = spawnPromise.process
|
|
48
|
+
if (child.exitCode === null && child.signalCode === null) {
|
|
49
|
+
child.kill('SIGKILL')
|
|
50
|
+
}
|
|
51
|
+
// eslint-disable-next-line n/no-process-exit
|
|
52
|
+
process.exit(signalName === 'SIGTERM' ? 143 : 130)
|
|
53
|
+
}
|
|
54
|
+
let sawSignal = false
|
|
55
|
+
const onSignal = signalName => {
|
|
56
|
+
if (sawSignal) {
|
|
57
|
+
hardAbort(signalName)
|
|
58
|
+
return
|
|
59
|
+
}
|
|
60
|
+
sawSignal = true
|
|
61
|
+
setTimeout(() => hardAbort(signalName), SHUTDOWN_GRACE_MS).unref?.()
|
|
62
|
+
}
|
|
63
|
+
const onSigint = () => onSignal('SIGINT')
|
|
64
|
+
const onSigterm = () => onSignal('SIGTERM')
|
|
65
|
+
process.on('SIGINT', onSigint)
|
|
66
|
+
process.on('SIGTERM', onSigterm)
|
|
67
|
+
|
|
41
68
|
// See https://nodejs.org/api/child_process.html#event-exit.
|
|
42
69
|
spawnPromise.process.on('exit', (code, signalName) => {
|
|
43
70
|
if (signalName) {
|
|
44
|
-
|
|
71
|
+
// Mirror a signal death as the conventional 128 + signum exit code. Exit explicitly
|
|
72
|
+
// rather than re-raising the signal: with our handlers installed the re-raise would
|
|
73
|
+
// race `await spawnPromise` resolving and could leave the default exitCode of 1.
|
|
74
|
+
const signum = os.constants.signals[signalName] ?? 0
|
|
75
|
+
// eslint-disable-next-line n/no-process-exit
|
|
76
|
+
process.exit(128 + signum)
|
|
45
77
|
} else if (typeof code === 'number') {
|
|
46
78
|
// eslint-disable-next-line n/no-process-exit
|
|
47
79
|
process.exit(code)
|