@node9/proxy 2.13.1 → 2.14.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/scan-ink.mjs CHANGED
@@ -812,12 +812,55 @@ var FS_READ_TOOLS = /* @__PURE__ */ new Set([
812
812
  "nl",
813
813
  "dd"
814
814
  ]);
815
+ var SCP_VALUE_FLAGS = ["i", "F", "o", "c", "S", "P", "J", "D", "W", "l"];
816
+ var RSYNC_SKIP = [
817
+ "e",
818
+ "--rsh",
819
+ "--exclude",
820
+ "--exclude-from",
821
+ "--include",
822
+ "--include-from",
823
+ "--files-from",
824
+ "f",
825
+ "--filter"
826
+ ];
827
+ var COPY_VERBS = {
828
+ cp: { source: "allButLast", targetDirFlag: true },
829
+ mv: { source: "allButLast", targetDirFlag: true },
830
+ install: { source: "allButLast", targetDirFlag: true },
831
+ ln: { source: "first", targetDirFlag: true },
832
+ scp: { source: "allButLast", skipFlags: SCP_VALUE_FLAGS },
833
+ rsync: { source: "allButLast", skipFlags: RSYNC_SKIP },
834
+ tar: {
835
+ source: "archive",
836
+ archive: "tar",
837
+ skipFlags: ["f", "X", "T", "--file", "--exclude", "--exclude-from", "--files-from"]
838
+ },
839
+ zip: { source: "archive", archive: "zip", skipFlags: ["x", "i", "--exclude", "--include"] },
840
+ ar: { source: "archive", archive: "ar" },
841
+ "7z": { source: "archive", archive: "7z", skipFlags: ["x", "--exclude"] },
842
+ gzip: { source: "all" },
843
+ bzip2: { source: "all" },
844
+ xz: { source: "all" },
845
+ "docker cp": { source: "allButLast" },
846
+ "kubectl cp": { source: "allButLast" },
847
+ "gsutil cp": { source: "allButLast" },
848
+ "gsutil rsync": { source: "allButLast" },
849
+ "rclone copy": { source: "allButLast" },
850
+ "rclone sync": { source: "allButLast" },
851
+ "aws s3 cp": { source: "allButLast" },
852
+ "aws s3 mv": { source: "allButLast" },
853
+ "aws s3 sync": { source: "allButLast" },
854
+ "gcloud storage cp": { source: "allButLast" },
855
+ "az storage blob upload": { source: "flagOperand", sourceFlags: ["f", "--file"] }
856
+ };
857
+ var COPY_VERB_HEADS = new Set(Object.keys(COPY_VERBS).map((k) => k.split(" ")[0]));
815
858
  var FS_OP_PRESCREEN_RE = new RegExp(
816
859
  // A quote is a separator too: `eval "cat X"` and `sh -c 'cat X'` put the
817
860
  // reader right after `"` / `'`, and without these two characters the
818
861
  // prescreen rejected every string-wrapped read before the parser ran.
819
862
  // Found 2026-09-11 by instrumenting the walk -- no CallExpr was ever visited.
820
- `(?:^|[\\s|;&("'\`\\n])(?:rm|${[...FS_READ_TOOLS].map((t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|")})\\b|(?<!<)<(?!<)`
863
+ `(?:^|[\\s|;&("'\`\\n/])(?:rm|${[...FS_READ_TOOLS, ...COPY_VERB_HEADS].map((t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|")})\\b|(?<!<)<(?!<)`
821
864
  );
822
865
  function deriveRedirOp(sample) {
823
866
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node9/proxy",
3
- "version": "2.13.1",
3
+ "version": "2.14.0",
4
4
  "description": "The Sudo Command for AI Agents. Execution Security for Claude Code, Codex, Gemini, Cursor, Opencode, Pi, and any MCP server.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",