llm-cli-gateway 1.5.31 → 1.5.33

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 CHANGED
@@ -2,6 +2,19 @@
2
2
 
3
3
  All notable changes to the llm-cli-gateway project.
4
4
 
5
+ ## [1.5.33] - 2026-05-25
6
+
7
+ ### Security
8
+
9
+ - Stop using `better-sqlite3`'s dynamic `db.pragma(source)` helper in production code. SQLite setup now uses fixed literal `PRAGMA` statements through `db.exec(...)`, and the release security audit fails future production `.pragma()` calls.
10
+ - Document the bounded `better-sqlite3/lib/methods/pragma.js` scanner alert in README and `socket.yml`, including the local mitigation and release audit gate.
11
+
12
+ ## [1.5.32] - 2026-05-25
13
+
14
+ ### Changed
15
+
16
+ - Move GitHub Actions workflows to Node 24-backed action majors and run CI/release Node jobs on Node 24, removing GitHub's Node 20 action-runtime deprecation warning before the June 2026 cutoff.
17
+
5
18
  ## [1.5.31] - 2026-05-25
6
19
 
7
20
  ### Changed
package/README.md CHANGED
@@ -1018,6 +1018,7 @@ If you're vetting `llm-cli-gateway` through [Socket](https://socket.dev/npm/pack
1018
1018
  | **Network access** | `src/http-transport.ts` opens an HTTP MCP transport when started via `npm run start:http`. `src/endpoint-exposure.ts` issues a HEAD probe to verify configured public/tunnel URLs. | The transport binds to `127.0.0.1` by default and requires `LLM_GATEWAY_AUTH_TOKEN` to be set. The default stdio MCP entry point (`npm start`) opens no sockets. |
1019
1019
  | **Shell access** | `src/executor.ts` uses `child_process.spawn(cmd, args, …)` to invoke the underlying LLM CLIs. | `spawn` is called with an argument array and **never** `shell: true`, so there is no shell interpolation path for caller input. The command name is restricted to an allow-list of known CLI binaries (`claude`, `codex`, `gemini`, `grok`, `vibe`). |
1020
1020
  | **Uses eval** | None in our source. Transitive: `@modelcontextprotocol/sdk` → `ajv@8` uses `new Function(...)` in `ajv/dist/compile/index.js` to compile JSON Schema validators. | This is ajv's standard codegen path. Only known schemas (defined in our source and the MCP SDK) flow into it; no caller-supplied data ever reaches the compiled function body. |
1021
+ | **better-sqlite3 PRAGMA helper** | Transitive: `better-sqlite3/lib/methods/pragma.js` interpolates its caller-provided `source` into a `PRAGMA ${source}` statement. | We do not call `db.pragma()` from production source. Internal SQLite setup uses fixed literal `db.exec("PRAGMA ...")` statements, and `npm run security:audit` fails the release if production code reintroduces `.pragma()` calls. |
1021
1022
  | **Dependency ownership** | A handful of small transitive packages (e.g. `bindings` via `better-sqlite3`, `media-typer` via `@modelcontextprotocol/sdk`) trip Socket's "unstable ownership" or "obfuscated code" heuristics. | These are pinned, well-known micro-deps in the Node ecosystem with no known issues. We pin direct override versions of `content-type` and `type-is` in `package.json#overrides`. Our previous direct dependency on `toml@3.0.0` (also single-maintainer, last released 2020) was replaced with the actively-maintained `smol-toml` to reduce inherited risk. |
1022
1023
 
1023
1024
  See [`socket.yml`](./socket.yml) for the same context in machine-readable form.
@@ -76,8 +76,8 @@ export class FlightRecorder {
76
76
  mkdirSync(directory, { recursive: true });
77
77
  }
78
78
  this.db = new BetterSqlite3(dbPath);
79
- this.db.pragma("journal_mode = WAL");
80
- this.db.pragma("foreign_keys = ON");
79
+ this.db.exec("PRAGMA journal_mode = WAL");
80
+ this.db.exec("PRAGMA foreign_keys = ON");
81
81
  this.db.exec(`
82
82
  CREATE TABLE IF NOT EXISTS _migrations (
83
83
  version INTEGER PRIMARY KEY,
package/dist/job-store.js CHANGED
@@ -84,8 +84,8 @@ export class SqliteJobStore {
84
84
  mkdirSync(directory, { recursive: true });
85
85
  }
86
86
  this.db = new BetterSqlite3(dbPath);
87
- this.db.pragma("journal_mode = WAL");
88
- this.db.pragma("synchronous = NORMAL");
87
+ this.db.exec("PRAGMA journal_mode = WAL");
88
+ this.db.exec("PRAGMA synchronous = NORMAL");
89
89
  this.db.exec(`
90
90
  CREATE TABLE IF NOT EXISTS jobs (
91
91
  id TEXT PRIMARY KEY,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "llm-cli-gateway",
3
- "version": "1.5.31",
3
+ "version": "1.5.33",
4
4
  "mcpName": "io.github.verivus-oss/llm-cli-gateway",
5
5
  "description": "MCP server providing unified access to Claude Code, Codex, Gemini, Grok, and Mistral Vibe CLIs with session management, retry logic, async job orchestration, durable job results, and cross-LLM validation.",
6
6
  "license": "MIT",
package/socket.yml CHANGED
@@ -26,6 +26,13 @@ version: 2
26
26
  # which compiles JSON Schema validators using `new Function(...)`.
27
27
  # This is ajv's standard codegen path; no caller-supplied data flows
28
28
  # into the compiled function body.
29
+ #
30
+ # better-sqlite3 PRAGMA helper
31
+ # Socket may flag better-sqlite3/lib/methods/pragma.js because it
32
+ # constructs PRAGMA SQL from its caller-provided `source` string. The
33
+ # gateway does not call db.pragma() from production code; SQLite setup
34
+ # uses fixed literal db.exec("PRAGMA ...") statements, and the release
35
+ # security audit fails future production `.pragma()` calls.
29
36
 
30
37
  issueRules:
31
38
  # Defaults from Socket. Listed explicitly so future contributors see what