You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- M2: cache the npm-install fallback's resolved script path per version for the
process lifetime (mirrors the Node CLI's installedCoanaScriptPathsByVersion), so a
repeated fallback installs once instead of re-installing + leaking a temp dir each call.
- M3: surface a clear error when `node` is missing in the fallback (instead of an opaque
FileNotFoundError after a costly npm install), and add `node` to the up-front prereq check.
- M1: correct the overstated 'npx --force disables the cache' wording in docstrings, docs,
and CHANGELOG. The code already matches the Node CLI exactly (npx --yes --force); --force
does not force a re-download of an already-cached pinned version, so the docs now describe
what the flags actually do rather than claiming a cache bypass.
Adds tests for per-version caching, node-missing, and real _resolve_coana_bin /
_build_coana_node_cmd parsing.
Copy file name to clipboardExpand all lines: docs/cli-reference.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -264,6 +264,7 @@ If you don't want to provide the Socket API Token every time then you can use th
264
264
The Python CLI verifies the following **up front** (before invoking the analysis engine) and exits with code **3** if any are unmet:
265
265
- `npm` - Required (verified up front; ships alongside `npx`)
266
266
- `npx` - Required to fetch (on first use) and run `@coana-tech/cli` (the analysis engine)
267
+
- `node` - Required to run the engine (used directly by the `npm install` fallback)
267
268
- `uv` - Required by the analysis engine
268
269
- An **Enterprise** Socket organization plan (any `enterprise*` plan, including Enterprise trials)
269
270
@@ -313,7 +314,7 @@ Sample config files:
313
314
314
315
For CI-specific examples and guidance, see [`ci-cd.md`](ci-cd.md).
315
316
316
-
The CLI runs a pinned `@coana-tech/cli` version via `npx --yes --force`; it does **not** auto-update the engine or install it globally. `--force` disables the npx cache (matching the Socket Node CLI) so a corrupt or partial cache entry can't wedge a run. If the `npx` launcher is unavailable or fails before the engine starts, the CLI falls back to `npm install`-ing the pinned version into a temp directory and running it via `node`. Pass `--reach-version latest` to opt into the newest published version. Use `--reach` to enable reachability analysis during a full scan, or add `--only-facts-file` (with `--reach`) to submit only the reachability facts file (`.socket.facts.json`) when creating the full scan.
317
+
The CLI runs a pinned `@coana-tech/cli` version via `npx --yes --force` (the same flags the Socket Node CLI passes for coana); it does **not** auto-update the engine or install it globally. `--yes` skips npx's interactive install prompt so non-interactive/CI runs don't hang. If the `npx` launcher is unavailable or fails before the engine starts, the CLI falls back to `npm install`-ing the pinned version into a temp directory and running it via `node`. Pass `--reach-version latest` to opt into the newest published version. Use `--reach` to enable reachability analysis during a full scan, or add `--only-facts-file` (with `--reach`) to submit only the reachability facts file (`.socket.facts.json`) when creating the full scan.
317
318
318
319
The launcher fallback can be tuned via environment variables:
319
320
- `SOCKET_CLI_COANA_FORCE_NPM_INSTALL` — skip `npx` entirely and always use the `npm install` + `node` path (useful where `npx` is known-broken).
0 commit comments