@node9/proxy 1.62.0 → 1.62.1

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 CHANGED
@@ -53772,6 +53772,38 @@ function collectTools(steps) {
53772
53772
  }
53773
53773
  return s;
53774
53774
  }
53775
+ function toolTokens(blob) {
53776
+ const out = [];
53777
+ let buf = "";
53778
+ let inParen = false;
53779
+ const flush = () => {
53780
+ const t = buf.replace(/[[\]"'`\r\n]/g, "").trim();
53781
+ if (t) out.push(t);
53782
+ buf = "";
53783
+ };
53784
+ for (const ch of blob) {
53785
+ if (ch === "(") inParen = true;
53786
+ else if (ch === ")") inParen = false;
53787
+ if (!inParen && (ch === "," || /\s/.test(ch))) {
53788
+ flush();
53789
+ continue;
53790
+ }
53791
+ buf += ch;
53792
+ }
53793
+ flush();
53794
+ return out;
53795
+ }
53796
+ function matchedBroadTools(blob) {
53797
+ const seen = /* @__PURE__ */ new Set();
53798
+ const out = [];
53799
+ for (const tok of toolTokens(blob)) {
53800
+ if (!BROAD_TOOL_RE.test(`,${tok},`)) continue;
53801
+ if (seen.has(tok)) continue;
53802
+ seen.add(tok);
53803
+ out.push(tok.length > 40 ? tok.slice(0, 40) + "\u2026" : tok);
53804
+ }
53805
+ return out;
53806
+ }
53775
53807
  function untrustedHeadCheckout(steps) {
53776
53808
  for (const step of steps) {
53777
53809
  if (!step.uses || !/actions\/checkout/.test(step.uses)) continue;
@@ -53998,7 +54030,12 @@ function analyzeWorkflow(path71, content) {
53998
54030
  if (head === "root") signals.push("checks out the untrusted PR head into the workspace root");
53999
54031
  if (head === "subdir") signals.push("checks out the untrusted PR head into an isolated subdir");
54000
54032
  if (promptUntrusted) signals.push("feeds untrusted PR/issue text to the agent");
54001
- if (broadTools) signals.push("agent has broad/write-capable tools (Bash/Write/curl/git push)");
54033
+ if (broadTools) {
54034
+ const names = matchedBroadTools(toolsBlob);
54035
+ signals.push(
54036
+ names.length ? `agent has broad/write-capable tools: ${names.map((n) => `\`${n}\``).join(", ")}` : "agent has broad/write-capable tool grants"
54037
+ );
54038
+ }
54002
54039
  if (bypassActive) signals.push('allowed_non_write_users: "*" \u2014 any user can trigger the agent');
54003
54040
  if (elevated) signals.push("elevated permissions (contents/id-token: write)");
54004
54041
  if (pat) signals.push("a static PAT is exposed to the agent (recoverable via injection)");
package/dist/cli.mjs CHANGED
@@ -53765,6 +53765,38 @@ function collectTools(steps) {
53765
53765
  }
53766
53766
  return s;
53767
53767
  }
53768
+ function toolTokens(blob) {
53769
+ const out = [];
53770
+ let buf = "";
53771
+ let inParen = false;
53772
+ const flush = () => {
53773
+ const t = buf.replace(/[[\]"'`\r\n]/g, "").trim();
53774
+ if (t) out.push(t);
53775
+ buf = "";
53776
+ };
53777
+ for (const ch of blob) {
53778
+ if (ch === "(") inParen = true;
53779
+ else if (ch === ")") inParen = false;
53780
+ if (!inParen && (ch === "," || /\s/.test(ch))) {
53781
+ flush();
53782
+ continue;
53783
+ }
53784
+ buf += ch;
53785
+ }
53786
+ flush();
53787
+ return out;
53788
+ }
53789
+ function matchedBroadTools(blob) {
53790
+ const seen = /* @__PURE__ */ new Set();
53791
+ const out = [];
53792
+ for (const tok of toolTokens(blob)) {
53793
+ if (!BROAD_TOOL_RE.test(`,${tok},`)) continue;
53794
+ if (seen.has(tok)) continue;
53795
+ seen.add(tok);
53796
+ out.push(tok.length > 40 ? tok.slice(0, 40) + "\u2026" : tok);
53797
+ }
53798
+ return out;
53799
+ }
53768
53800
  function untrustedHeadCheckout(steps) {
53769
53801
  for (const step of steps) {
53770
53802
  if (!step.uses || !/actions\/checkout/.test(step.uses)) continue;
@@ -53991,7 +54023,12 @@ function analyzeWorkflow(path71, content) {
53991
54023
  if (head === "root") signals.push("checks out the untrusted PR head into the workspace root");
53992
54024
  if (head === "subdir") signals.push("checks out the untrusted PR head into an isolated subdir");
53993
54025
  if (promptUntrusted) signals.push("feeds untrusted PR/issue text to the agent");
53994
- if (broadTools) signals.push("agent has broad/write-capable tools (Bash/Write/curl/git push)");
54026
+ if (broadTools) {
54027
+ const names = matchedBroadTools(toolsBlob);
54028
+ signals.push(
54029
+ names.length ? `agent has broad/write-capable tools: ${names.map((n) => `\`${n}\``).join(", ")}` : "agent has broad/write-capable tool grants"
54030
+ );
54031
+ }
53995
54032
  if (bypassActive) signals.push('allowed_non_write_users: "*" \u2014 any user can trigger the agent');
53996
54033
  if (elevated) signals.push("elevated permissions (contents/id-token: write)");
53997
54034
  if (pat) signals.push("a static PAT is exposed to the agent (recoverable via injection)");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node9/proxy",
3
- "version": "1.62.0",
3
+ "version": "1.62.1",
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",