@node9/proxy 2.51.0 → 2.53.0
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/dist/cli-main.js +2220 -1625
- package/dist/dashboard.mjs +599 -229
- package/dist/hook.js +814 -287
- package/dist/index.js +615 -216
- package/dist/index.mjs +615 -216
- package/dist/scan-ink.mjs +42 -2
- package/package.json +1 -1
package/dist/scan-ink.mjs
CHANGED
|
@@ -2314,7 +2314,7 @@ var CHECK_TEXT = {
|
|
|
2314
2314
|
advice: "Fixed at Review for now."
|
|
2315
2315
|
},
|
|
2316
2316
|
"commands.node9-disarm": {
|
|
2317
|
-
plain: "The agent
|
|
2317
|
+
plain: "The agent switches node9 off or weakens it: stops or kills the daemon, stops its service, uninstalls node9, changes files in ~/.node9, clears a session flag, trusts an address, pauses the gate, weakens a shield.",
|
|
2318
2318
|
example: "After reading a web page, the agent runs node9 session-exposure clear --all",
|
|
2319
2319
|
advice: "Keep Review: these are your commands to run. Block if the agent should never touch node9."
|
|
2320
2320
|
},
|
|
@@ -2602,7 +2602,7 @@ var PRODUCT_CHECKS = [
|
|
|
2602
2602
|
group: "commands",
|
|
2603
2603
|
owasp: "ASI10",
|
|
2604
2604
|
title: "node9 disarmed from the shell",
|
|
2605
|
-
catches: "a node9 command that clears a session flag, trusts a destination, pauses the gate or weakens a shield
|
|
2605
|
+
catches: "the agent stopping or killing the node9 daemon, stopping its service, uninstalling node9, changing files in ~/.node9, or running a node9 command that clears a session flag, trusts a destination, pauses the gate or weakens a shield",
|
|
2606
2606
|
values: ALL,
|
|
2607
2607
|
defaultValue: "review",
|
|
2608
2608
|
legacy: ["review-node9-disarm"]
|
|
@@ -3432,6 +3432,46 @@ var PHP = [
|
|
|
3432
3432
|
],
|
|
3433
3433
|
["permissions", /\b(?:chmod|chown|chgrp|lchown|lchgrp)\s*\(/]
|
|
3434
3434
|
];
|
|
3435
|
+
var READ_CALL = {
|
|
3436
|
+
python: String.raw`(?:\b(?:io|codecs)\.)?\bopen|\b(?:dotenv_values|load_dotenv|get_key|read_file|loadtxt|read_csv)`,
|
|
3437
|
+
node: String.raw`\b(?:readFileSync|readFile|createReadStream|readTextFile(?:Sync)?|readFileStr|openSync|file)`,
|
|
3438
|
+
perl: String.raw`\b(?:open|sysopen|read_file|slurp)`,
|
|
3439
|
+
ruby: String.raw`\b(?:File|IO)\.(?:read|binread|readlines|foreach|open)|\bDotenv\.(?:load|parse|overload)`,
|
|
3440
|
+
php: String.raw`\b(?:file_get_contents|fopen|file|readfile|parse_ini_file|highlight_file|show_source)`
|
|
3441
|
+
};
|
|
3442
|
+
var ARG = String.raw`(?:(?:(?:my|our|local)\s+)?[\w.$]+(?:\s*\(\s*\))?|'[^'\n]{0,8}'|"[^"\n]{0,8}")\s*,\s*`;
|
|
3443
|
+
var WRAP = String.raw`(?:(?:new\s+)?[\w.$]+\s*\(\s*(?:${ARG}){0,3}){0,3}`;
|
|
3444
|
+
var STR_PREFIX = String.raw`[rRbBuUfF]{0,2}`;
|
|
3445
|
+
var WRITE_MODE_LITERAL = String.raw`['"](?=[rbtU+]*w|(?![^'"]*\+)[rbtU]*[ax])[rwaxbtU+]{1,4}['"]`;
|
|
3446
|
+
var WRITE_MODE = String.raw`\s*,\s*(?:mode\s*=\s*)?${WRITE_MODE_LITERAL}`;
|
|
3447
|
+
var WRITE_MODE_AFTER = new RegExp(`^(?:\\s*\\)){0,3}${WRITE_MODE}`);
|
|
3448
|
+
var readCallBefore = (language) => new RegExp(
|
|
3449
|
+
String.raw`(?:${READ_CALL[language]})(?![\w$])\s*\(?\s*(?:${ARG}){0,3}${WRAP}${STR_PREFIX}$`
|
|
3450
|
+
);
|
|
3451
|
+
var READ_BEFORE = {
|
|
3452
|
+
python: readCallBefore("python"),
|
|
3453
|
+
node: readCallBefore("node"),
|
|
3454
|
+
perl: readCallBefore("perl"),
|
|
3455
|
+
ruby: readCallBefore("ruby"),
|
|
3456
|
+
php: readCallBefore("php")
|
|
3457
|
+
};
|
|
3458
|
+
var READ_AFTER = {
|
|
3459
|
+
python: new RegExp(
|
|
3460
|
+
String.raw`^\s*\)\s*\.\s*(?:read_text|read_bytes|open)\s*\((?!\s*(?:mode\s*=\s*)?${WRITE_MODE_LITERAL})`
|
|
3461
|
+
)
|
|
3462
|
+
};
|
|
3463
|
+
var ASSIGNED = new RegExp(String.raw`([$\w]+)\s*=\s*${WRAP}${STR_PREFIX}$`);
|
|
3464
|
+
var openedName = (language) => new RegExp(
|
|
3465
|
+
String.raw`(?:${READ_CALL[language]})(?![\w$])\s*\(?\s*(?:${ARG}){0,3}${WRAP}([$\w]+)(?!${WRITE_MODE})\s*[),]` + (language === "python" ? String.raw`|\bPath\s*\(\s*([$\w]+)\s*\)\s*\.\s*(?:read_text|read_bytes|open)\s*\(` : ""),
|
|
3466
|
+
"g"
|
|
3467
|
+
);
|
|
3468
|
+
var OPENED_NAME = {
|
|
3469
|
+
python: openedName("python"),
|
|
3470
|
+
node: openedName("node"),
|
|
3471
|
+
perl: openedName("perl"),
|
|
3472
|
+
ruby: openedName("ruby"),
|
|
3473
|
+
php: openedName("php")
|
|
3474
|
+
};
|
|
3435
3475
|
var sharedParser = lazy(() => getSyntax().NewParser());
|
|
3436
3476
|
var SHELL_INTERPRETERS = /* @__PURE__ */ new Set([
|
|
3437
3477
|
"bash",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node9/proxy",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.53.0",
|
|
4
4
|
"description": "Access control for AI agents. Set what Claude Code, Codex, Gemini, Cursor and any MCP server are allowed to do, review risky actions before they run, and keep every action on the record.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|