@exorcist-98/cli 0.3.4 → 0.3.6

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/README.md CHANGED
@@ -11,7 +11,7 @@ Needs Node 20 or newer.
11
11
  ## Scan a project
12
12
 
13
13
  ```sh
14
- npx -y @exorcist-98/cli@0.3.4 scan .
14
+ npx -y @exorcist-98/cli@0.3.6 scan .
15
15
  ```
16
16
 
17
17
  Every finding shows the file, line, the exact text, how serious it is and how
@@ -39,7 +39,7 @@ request.
39
39
  ## Map the haunted house
40
40
 
41
41
  ```sh
42
- npx -y @exorcist-98/cli@0.3.4 map .
42
+ npx -y @exorcist-98/cli@0.3.6 map .
43
43
  ```
44
44
 
45
45
  For every MCP config in the folder, lists which servers sit in the three rooms
@@ -52,8 +52,8 @@ data. The rules are in `definitions/capabilities.yaml`.
52
52
  ## Disinfect (exorcise)
53
53
 
54
54
  ```sh
55
- npx -y @exorcist-98/cli@0.3.4 exorcise . # dry run: prints a unified diff
56
- npx -y @exorcist-98/cli@0.3.4 exorcise . --write # apply, with a vault backup first
55
+ npx -y @exorcist-98/cli@0.3.6 exorcise . # dry run: prints a unified diff
56
+ npx -y @exorcist-98/cli@0.3.6 exorcise . --write # apply, with a vault backup first
57
57
  ```
58
58
 
59
59
  Only threats with one safe, mechanical fix are repaired: hidden characters
@@ -67,7 +67,7 @@ human"), and `exorcist vault restore <id>` puts every file back byte for byte.
67
67
  ## Protect your MCP servers
68
68
 
69
69
  ```sh
70
- npx -y @exorcist-98/cli@0.3.4 wrap .kiro/settings/mcp.json
70
+ npx -y @exorcist-98/cli@0.3.6 wrap .kiro/settings/mcp.json
71
71
  ```
72
72
 
73
73
  `wrap` puts every server in the file, local or remote, behind the Real-Time
@@ -79,9 +79,9 @@ instruct your agent. `unwrap` restores the file exactly. See
79
79
  ## Share approved tools with your team: exorcist.lock
80
80
 
81
81
  ```sh
82
- npx -y @exorcist-98/cli@0.3.4 lock # write exorcist.lock, then commit it
83
- npx -y @exorcist-98/cli@0.3.4 lock --check # exit 1 if any tool or program changed
84
- npx -y @exorcist-98/cli@0.3.4 lock --check --static # starts nothing: names, programs, URLs only
82
+ npx -y @exorcist-98/cli@0.3.6 lock # write exorcist.lock, then commit it
83
+ npx -y @exorcist-98/cli@0.3.6 lock --check # exit 1 if any tool or program changed
84
+ npx -y @exorcist-98/cli@0.3.6 lock --check --static # starts nothing: names, programs, URLs only
85
85
  ```
86
86
 
87
87
  `exorcist.lock` records the fingerprint of every tool your MCP servers list,
package/dist/index.mjs CHANGED
@@ -22906,21 +22906,25 @@ function envFamilyOwners(name) {
22906
22906
  return null;
22907
22907
  }
22908
22908
  var PATH_VAR = /(?:CONFIG|_FILES?|_DIR|_HOME|_PATH|_PLUGINS?|CACHEDIR|_CERT\w*|_CA\w*)$/;
22909
+ var PROGRAM_VAR = /(?:EDITOR|PAGER|BROWSER|_CMD|_COMMAND|_HELPER|_PROGRAM|_EXEC|_SHELL|_ARGS(?:_\w+)?)$/u;
22909
22910
  var ENDPOINT_VAR = /(?:_HOST|_URL|_ENDPOINT|_SERVER)$/;
22910
22911
  function unlockedValueRisk(name, value, cwd, dynamic) {
22911
22912
  const runtime = dynamic || /[$`]/.test(value);
22912
22913
  const say = `${name} is set to a path inside the project, or to a value built at run time, and a tool config can name a program to run or a daemon to reach`;
22913
22914
  if (runtime) return say;
22914
- if (PATH_VAR.test(name) && anyInside(value, cwd)) return say;
22915
- for (const part of value.split(/[\s:,;=]+/u)) {
22916
- if (part !== "" && (/^[./~]/u.test(part) || part.includes("/")) && insideProject(part, cwd)) return say;
22917
- }
22918
22915
  if (ENDPOINT_VAR.test(name)) {
22919
22916
  const m = /^(?:unix|npipe|file):\/\/(.*)$/.exec(value);
22920
22917
  const target = m === null ? value : m[1];
22921
- if ((m !== null || /^[./~]/.test(target)) && insideProject(target, cwd)) return say;
22918
+ return (m !== null || /^[./~]/.test(target)) && insideProject(target, cwd) ? say : null;
22922
22919
  }
22923
- return null;
22920
+ let v = value.trim();
22921
+ if (v.startsWith("~")) v = expandTilde(v, cwd) ?? v;
22922
+ const one = `${name} takes one plain word here: an absolute path outside the project, or a name with no dot, slash or tilde (a value that could be a file in the project is refused)`;
22923
+ if (v === "") return null;
22924
+ if (/[\s:,;=]/u.test(v)) return one;
22925
+ if (isAbsolute4(v)) return insideProject(v, cwd) ? say : null;
22926
+ if (PATH_VAR.test(name) || PROGRAM_VAR.test(name)) return /^[A-Za-z0-9_-]+$/u.test(v) && !PATH_VAR.test(name) ? null : one;
22927
+ return /[./\\~]/u.test(v) ? one : null;
22924
22928
  }
22925
22929
  function envAssignRisk(name, value, cwd, dynamic = false, known, prog) {
22926
22930
  const owners = envFamilyOwners(name);
@@ -25777,7 +25781,7 @@ async function* scanRepo(root, options) {
25777
25781
  init_zod();
25778
25782
 
25779
25783
  // ../core/src/version.ts
25780
- var SCANNER_VERSION = "0.3.4";
25784
+ var SCANNER_VERSION = "0.3.6";
25781
25785
 
25782
25786
  // ../core/src/reporters/json-reporter.ts
25783
25787
  var ScanStatsSchema = external_exports.object({
@@ -38428,7 +38432,7 @@ unwrap Put the original file back byte for byte, if it was not edited since
38428
38432
 
38429
38433
  Options (wrap):
38430
38434
  --bin <command> Command that runs the shield (default: exorcist)
38431
- --bin-arg <arg> Argument before "shield" (repeatable), e.g. --bin npx --bin-arg -y --bin-arg @exorcist-98/cli@0.3.4
38435
+ --bin-arg <arg> Argument before "shield" (repeatable), e.g. --bin npx --bin-arg -y --bin-arg @exorcist-98/cli@0.3.6
38432
38436
  --dir <folder> State folder (default: ${DEFAULT_DIR})
38433
38437
  --dry-run Show the result without writing the file
38434
38438
  `;
@@ -40502,8 +40506,8 @@ function reviewerAgentForProject(mcpCommand) {
40502
40506
  }
40503
40507
 
40504
40508
  // src/commands/init.ts
40505
- var DEFAULT_BIN = "npx -y @exorcist-98/cli@0.3.4";
40506
- var DEFAULT_MCP_BIN = "npx -y @exorcist-98/mcp-server@0.3.4";
40509
+ var DEFAULT_BIN = "npx -y @exorcist-98/cli@0.3.6";
40510
+ var DEFAULT_MCP_BIN = "npx -y @exorcist-98/mcp-server@0.3.6";
40507
40511
  var MISSING_FROM_DEFAULT_BIN = /* @__PURE__ */ new Set();
40508
40512
  var INIT_HELP = `Usage: exorcist init [folder] [--kiro] [--shield] [--sandbox] [--no-agent] [--force]
40509
40513
  [--bin <command>] [--mcp-bin <command>]
@@ -40872,7 +40876,7 @@ ${INIT_HELP}`);
40872
40876
  "then reconnect MCP servers in the MCP panel so they start through the Shield."
40873
40877
  ];
40874
40878
  if (isDefaultBin) {
40875
- lines.push("Commands run through npx (@exorcist-98/cli@0.3.4). If Kiro cannot start a wrapped server or a hook cannot find npx,");
40879
+ lines.push("Commands run through npx (@exorcist-98/cli@0.3.6). If Kiro cannot start a wrapped server or a hook cannot find npx,");
40876
40880
  lines.push('rerun with --bin "<absolute path to node> <absolute path to the exorcist CLI>" and --force.');
40877
40881
  }
40878
40882
  io.out(lines.join("\n"));
@@ -48255,7 +48259,7 @@ var RawToolsPage = external_exports.object({ tools: external_exports.array(exter
48255
48259
  var firstLine2 = (err) => (err instanceof Error ? err.message : String(err)).split("\n")[0]?.slice(0, 300) ?? "unknown error";
48256
48260
  async function listTools(o) {
48257
48261
  const transport = new StdioClientTransport({ command: o.command, args: o.args, env: o.env, cwd: o.cwd, stderr: "ignore" });
48258
- const client = new Client({ name: "exorcist-lock", version: "0.3.4" }, { capabilities: {} });
48262
+ const client = new Client({ name: "exorcist-lock", version: "0.3.6" }, { capabilities: {} });
48259
48263
  let timer;
48260
48264
  const timedOut = new Promise((res) => {
48261
48265
  timer = setTimeout(() => res({ ok: false, error: `it did not list its tools within ${o.timeoutMs} ms.` }), o.timeoutMs);
@@ -49153,7 +49157,7 @@ ${VAULT_HELP}`);
49153
49157
  }
49154
49158
 
49155
49159
  // src/index.ts
49156
- var VERSION = "0.3.4";
49160
+ var VERSION = "0.3.6";
49157
49161
  var HELP = `Exorcist 98 ${VERSION}: antivirus for AI coding agents
49158
49162
 
49159
49163
  Usage: exorcist <command> [options]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exorcist-98/cli",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Exorcist 98: antivirus for AI coding agents. Scan repos, shield MCP servers, quarantine threats.",