@node9/proxy 1.58.3 → 1.58.4
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 +10 -2
- package/dist/cli.mjs +10 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -53196,8 +53196,8 @@ function promptTakesUntrusted(steps) {
|
|
|
53196
53196
|
}
|
|
53197
53197
|
function hasActorGate(wf, raw) {
|
|
53198
53198
|
const on = wf.on ?? raw["on"] ?? raw[true];
|
|
53199
|
-
const
|
|
53200
|
-
const labeled =
|
|
53199
|
+
const prTypes = (t) => t && Array.isArray(t.types) ? t.types.map(String) : [];
|
|
53200
|
+
const labeled = prTypes(on?.["pull_request_target"]).includes("labeled") || prTypes(on?.["pull_request"]).includes("labeled");
|
|
53201
53201
|
const ifs = [
|
|
53202
53202
|
wf.jobs ? Object.values(wf.jobs).map((j) => j.if) : [],
|
|
53203
53203
|
allSteps(wf).map((s) => s.step.if)
|
|
@@ -53266,6 +53266,9 @@ function analyzeWorkflow(path70, content) {
|
|
|
53266
53266
|
const triggers = triggerKeys(wf, raw);
|
|
53267
53267
|
const secretExposed = triggers.some((t) => /pull_request_target|workflow_run/i.test(t));
|
|
53268
53268
|
const forkInput = triggers.some((t) => /issue|pull_request|workflow_call/i.test(t));
|
|
53269
|
+
const privileged = triggers.some(
|
|
53270
|
+
(t) => /pull_request_target|pull_request_review|workflow_run|workflow_call|issue|discussion/i.test(t)
|
|
53271
|
+
);
|
|
53269
53272
|
const nonWrite = str(agentSteps.map((s) => s.with?.["allowed_non_write_users"]).find(Boolean));
|
|
53270
53273
|
const nonWriteStar = nonWrite === "*";
|
|
53271
53274
|
const nonWriteList = !!nonWrite && nonWrite !== "*";
|
|
@@ -53303,6 +53306,7 @@ function analyzeWorkflow(path70, content) {
|
|
|
53303
53306
|
const githubWriteTool = GH_WRITE_TOOL_RE.test(toolsBlob);
|
|
53304
53307
|
const canDamage = exfilOrRce || (hasGithubWritePerm(wf, agentJobs) || pat) && githubWriteTool;
|
|
53305
53308
|
if (!canDamage && severity && SEVERITY_RANK2[severity] > SEVERITY_RANK2.medium) severity = "medium";
|
|
53309
|
+
if (untrustedTrigger && !privileged && severity && severity !== "advisory") severity = "advisory";
|
|
53306
53310
|
if (!severity) severity = "advisory";
|
|
53307
53311
|
const signals = [];
|
|
53308
53312
|
if (secretExposed)
|
|
@@ -53310,6 +53314,10 @@ function analyzeWorkflow(path70, content) {
|
|
|
53310
53314
|
`runs with base-repo secrets (${triggers.filter((t) => /target|workflow_run/i.test(t)).join(", ")})`
|
|
53311
53315
|
);
|
|
53312
53316
|
else if (forkInput) signals.push(`triggered by untrusted input (${triggers.join(", ")})`);
|
|
53317
|
+
if (untrustedTrigger && !privileged)
|
|
53318
|
+
signals.push(
|
|
53319
|
+
"triggered by `pull_request` \u2014 fork PRs run with a read-only token (lower risk than pull_request_target)"
|
|
53320
|
+
);
|
|
53313
53321
|
if (head === "root") signals.push("checks out the untrusted PR head into the workspace root");
|
|
53314
53322
|
if (head === "subdir") signals.push("checks out the untrusted PR head into an isolated subdir");
|
|
53315
53323
|
if (promptUntrusted) signals.push("feeds untrusted PR/issue text to the agent");
|
package/dist/cli.mjs
CHANGED
|
@@ -53189,8 +53189,8 @@ function promptTakesUntrusted(steps) {
|
|
|
53189
53189
|
}
|
|
53190
53190
|
function hasActorGate(wf, raw) {
|
|
53191
53191
|
const on = wf.on ?? raw["on"] ?? raw[true];
|
|
53192
|
-
const
|
|
53193
|
-
const labeled =
|
|
53192
|
+
const prTypes = (t) => t && Array.isArray(t.types) ? t.types.map(String) : [];
|
|
53193
|
+
const labeled = prTypes(on?.["pull_request_target"]).includes("labeled") || prTypes(on?.["pull_request"]).includes("labeled");
|
|
53194
53194
|
const ifs = [
|
|
53195
53195
|
wf.jobs ? Object.values(wf.jobs).map((j) => j.if) : [],
|
|
53196
53196
|
allSteps(wf).map((s) => s.step.if)
|
|
@@ -53259,6 +53259,9 @@ function analyzeWorkflow(path70, content) {
|
|
|
53259
53259
|
const triggers = triggerKeys(wf, raw);
|
|
53260
53260
|
const secretExposed = triggers.some((t) => /pull_request_target|workflow_run/i.test(t));
|
|
53261
53261
|
const forkInput = triggers.some((t) => /issue|pull_request|workflow_call/i.test(t));
|
|
53262
|
+
const privileged = triggers.some(
|
|
53263
|
+
(t) => /pull_request_target|pull_request_review|workflow_run|workflow_call|issue|discussion/i.test(t)
|
|
53264
|
+
);
|
|
53262
53265
|
const nonWrite = str(agentSteps.map((s) => s.with?.["allowed_non_write_users"]).find(Boolean));
|
|
53263
53266
|
const nonWriteStar = nonWrite === "*";
|
|
53264
53267
|
const nonWriteList = !!nonWrite && nonWrite !== "*";
|
|
@@ -53296,6 +53299,7 @@ function analyzeWorkflow(path70, content) {
|
|
|
53296
53299
|
const githubWriteTool = GH_WRITE_TOOL_RE.test(toolsBlob);
|
|
53297
53300
|
const canDamage = exfilOrRce || (hasGithubWritePerm(wf, agentJobs) || pat) && githubWriteTool;
|
|
53298
53301
|
if (!canDamage && severity && SEVERITY_RANK2[severity] > SEVERITY_RANK2.medium) severity = "medium";
|
|
53302
|
+
if (untrustedTrigger && !privileged && severity && severity !== "advisory") severity = "advisory";
|
|
53299
53303
|
if (!severity) severity = "advisory";
|
|
53300
53304
|
const signals = [];
|
|
53301
53305
|
if (secretExposed)
|
|
@@ -53303,6 +53307,10 @@ function analyzeWorkflow(path70, content) {
|
|
|
53303
53307
|
`runs with base-repo secrets (${triggers.filter((t) => /target|workflow_run/i.test(t)).join(", ")})`
|
|
53304
53308
|
);
|
|
53305
53309
|
else if (forkInput) signals.push(`triggered by untrusted input (${triggers.join(", ")})`);
|
|
53310
|
+
if (untrustedTrigger && !privileged)
|
|
53311
|
+
signals.push(
|
|
53312
|
+
"triggered by `pull_request` \u2014 fork PRs run with a read-only token (lower risk than pull_request_target)"
|
|
53313
|
+
);
|
|
53306
53314
|
if (head === "root") signals.push("checks out the untrusted PR head into the workspace root");
|
|
53307
53315
|
if (head === "subdir") signals.push("checks out the untrusted PR head into an isolated subdir");
|
|
53308
53316
|
if (promptUntrusted) signals.push("feeds untrusted PR/issue text to the agent");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node9/proxy",
|
|
3
|
-
"version": "1.58.
|
|
3
|
+
"version": "1.58.4",
|
|
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",
|