fullcourtdefense-cli 1.34.15 → 1.34.16
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/actionPolicyEngine.js +5 -0
- package/dist/version.json +1 -1
- package/package.json +1 -1
|
@@ -7332,6 +7332,11 @@ function classifyShellWords(masked, raw, lead) {
|
|
|
7332
7332
|
return "read";
|
|
7333
7333
|
}
|
|
7334
7334
|
if (lead === "git" && /\bgit\s+(reset\s+--hard|clean\s+-[a-z]*f[a-z]*)\b/.test(value)) return "write";
|
|
7335
|
+
if (lead === "git" && /^git\s+ls-remote(?=\s|$)/.test(value)) {
|
|
7336
|
+
const options = (raw.match(/"[^"\r\n]*"|'[^'\r\n]*'|[^\s]+/g) || []).map((token) => token.replace(/^["']|["']$/g, "")).filter((token) => token.startsWith("--")).map((token) => token.split("=", 1)[0]);
|
|
7337
|
+
if (options.some((option) => !/^--(?:quiet|heads|tags|refs|get-url|exit-code|symref|sort)$/i.test(option)) || /\bext::|[$`]/i.test(raw)) return "SHELL";
|
|
7338
|
+
return "read";
|
|
7339
|
+
}
|
|
7335
7340
|
if (lead === "git" && /\bgit\s+(?:status|diff|log|show|blame|clone|fetch|pull|ls-files|remote|branch(?!\s+-[dD])|describe|rev-parse|stash\s+(?:list|show)|tag$)\b/.test(value)) return "read";
|
|
7336
7341
|
if (lead === "gh" && /\bgh\s+(?:pr|issue|repo|run|release|workflow)\s+(?:view|list|status|checks|diff|download)\b/.test(value)) return "read";
|
|
7337
7342
|
if (lead === "gh" && /\bgh\s+auth\s+status\b/.test(value) && !/--show-token|\s-t\b/.test(value)) return "read";
|
package/dist/version.json
CHANGED