@kenhkl/agent-moss 0.17.14 → 0.17.15
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 +39 -6
- package/dist/engine/coordinator.js +39 -6
- package/dist/rules/inline_rules.json +18 -0
- package/dist/server.js +39 -6
- package/package.json +1 -1
- package/dist/rules/user_rules.json +0 -8
package/dist/cli.js
CHANGED
|
@@ -44,13 +44,17 @@ function isRoot() {
|
|
|
44
44
|
const getuid = process.getuid;
|
|
45
45
|
return typeof getuid === "function" && getuid() === 0;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function resolveExplicitOwnerHome() {
|
|
48
48
|
for (const name of [process.env.SUDO_USER, process.env.LOGNAME, process.env.USER]) {
|
|
49
49
|
if (name && name !== "root" && name !== "") {
|
|
50
50
|
const home = homeOf(name);
|
|
51
51
|
if (home) return home;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
function listOwnerHomes() {
|
|
57
|
+
const homes = [];
|
|
54
58
|
try {
|
|
55
59
|
const passwd = readFileSync("/etc/passwd", "utf-8");
|
|
56
60
|
for (const line of passwd.split("\n")) {
|
|
@@ -60,12 +64,18 @@ function resolveOwnerHome() {
|
|
|
60
64
|
const uid = parseInt(parts[2], 10);
|
|
61
65
|
const name = parts[0];
|
|
62
66
|
if (uid >= 1e3 && name && !name.startsWith("_")) {
|
|
63
|
-
|
|
67
|
+
homes.push(parts[5]);
|
|
64
68
|
}
|
|
65
69
|
}
|
|
66
70
|
} catch {
|
|
67
71
|
}
|
|
68
|
-
return
|
|
72
|
+
return homes;
|
|
73
|
+
}
|
|
74
|
+
function resolveOwnerHome() {
|
|
75
|
+
const explicit = resolveExplicitOwnerHome();
|
|
76
|
+
if (explicit) return explicit;
|
|
77
|
+
const owners = listOwnerHomes();
|
|
78
|
+
return owners.length > 0 ? owners[0] : null;
|
|
69
79
|
}
|
|
70
80
|
function homeOf(name) {
|
|
71
81
|
try {
|
|
@@ -1099,7 +1109,14 @@ function principalHash(principal) {
|
|
|
1099
1109
|
}
|
|
1100
1110
|
function homeDir() {
|
|
1101
1111
|
try {
|
|
1102
|
-
|
|
1112
|
+
const home = homedir2();
|
|
1113
|
+
if (process.getuid?.() === 0) {
|
|
1114
|
+
const explicit = resolveExplicitOwnerHome();
|
|
1115
|
+
if (explicit) return explicit;
|
|
1116
|
+
const owners = listOwnerHomes();
|
|
1117
|
+
if (owners.length === 1) return owners[0];
|
|
1118
|
+
}
|
|
1119
|
+
return home;
|
|
1103
1120
|
} catch {
|
|
1104
1121
|
return tmpdir();
|
|
1105
1122
|
}
|
|
@@ -1631,6 +1648,20 @@ function hasReadWriteKeyword(code) {
|
|
|
1631
1648
|
const lower = code.toLowerCase();
|
|
1632
1649
|
return READ_WRITE_KEYWORDS.some((kw) => lower.includes(kw));
|
|
1633
1650
|
}
|
|
1651
|
+
function hasInlineDangerEvidence(command) {
|
|
1652
|
+
const code = extractInlineCode(command);
|
|
1653
|
+
if (!code) return false;
|
|
1654
|
+
const lowered = code.toLowerCase();
|
|
1655
|
+
for (const sp of runtimeConfigBridge.current?.effectiveSensitivePaths() ?? []) {
|
|
1656
|
+
const p = (sp.path || "").toLowerCase();
|
|
1657
|
+
if (!p) continue;
|
|
1658
|
+
if (lowered.includes(p)) return true;
|
|
1659
|
+
const rel = p.startsWith("~/") ? p.slice(2) : p;
|
|
1660
|
+
if (rel !== p && lowered.includes(rel)) return true;
|
|
1661
|
+
}
|
|
1662
|
+
for (const re of DANGER_EVIDENCE_RES) if (re.test(code)) return true;
|
|
1663
|
+
return false;
|
|
1664
|
+
}
|
|
1634
1665
|
function analyzeInlineScript(command) {
|
|
1635
1666
|
const code = extractInlineCode(command);
|
|
1636
1667
|
if (!code) {
|
|
@@ -1677,13 +1708,14 @@ function analyzeInlineScript(command) {
|
|
|
1677
1708
|
riskType: "file_access"
|
|
1678
1709
|
};
|
|
1679
1710
|
}
|
|
1680
|
-
var INLINE_RULES, INLINE_CODE_RE, ECHO_STRING_RE, ECHO_SEG_RE, READ_WRITE_KEYWORDS, WRITE_EXEC_CHAIN_PATTERNS, _REDIRECT_PATHS, SHELL_RC_FRAGMENTS, SENSITIVE_PATH_FRAGMENTS, REDIRECT_TO_SENSITIVE_RE, DIR_TRAVERSAL_KEYWORDS;
|
|
1711
|
+
var INLINE_RULES, INLINE_CODE_RE, ECHO_STRING_RE, ECHO_SEG_RE, READ_WRITE_KEYWORDS, WRITE_EXEC_CHAIN_PATTERNS, _REDIRECT_PATHS, SHELL_RC_FRAGMENTS, SENSITIVE_PATH_FRAGMENTS, REDIRECT_TO_SENSITIVE_RE, DIR_TRAVERSAL_KEYWORDS, DANGER_EVIDENCE_RES;
|
|
1681
1712
|
var init_inline_analyzer = __esm({
|
|
1682
1713
|
"src/engine/inline-analyzer.ts"() {
|
|
1683
1714
|
"use strict";
|
|
1684
1715
|
init_esm_shims();
|
|
1685
1716
|
init_shell_split();
|
|
1686
1717
|
init_rules_loader();
|
|
1718
|
+
init_runtime_config_bridge();
|
|
1687
1719
|
INLINE_RULES = loadInline();
|
|
1688
1720
|
if (!INLINE_RULES || Object.keys(INLINE_RULES).length === 0) {
|
|
1689
1721
|
console.error(
|
|
@@ -1703,6 +1735,7 @@ var init_inline_analyzer = __esm({
|
|
|
1703
1735
|
];
|
|
1704
1736
|
REDIRECT_TO_SENSITIVE_RE = new RegExp(`>{1,2}\\s*(?:\\S*/)?(${SENSITIVE_PATH_FRAGMENTS.map((p) => p.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|")})(?:\\s|$)`, "i");
|
|
1705
1737
|
DIR_TRAVERSAL_KEYWORDS = INLINE_RULES.dir_traversal_keywords ?? [];
|
|
1738
|
+
DANGER_EVIDENCE_RES = (INLINE_RULES.danger_evidence_patterns?.patterns ?? []).map((p) => new RegExp(p, "i"));
|
|
1706
1739
|
}
|
|
1707
1740
|
});
|
|
1708
1741
|
|
|
@@ -11320,7 +11353,7 @@ async function runAnalysis(input) {
|
|
|
11320
11353
|
return effectiveResult;
|
|
11321
11354
|
}
|
|
11322
11355
|
} else {
|
|
11323
|
-
if (
|
|
11356
|
+
if (isLiteralTextCmd || isInlineScriptCmd && hasInlineDangerEvidence(input.aNext.actionDetail)) {
|
|
11324
11357
|
const inlineJudgment = analyzeInlineScript(input.aNext.actionDetail);
|
|
11325
11358
|
if (inlineJudgment.actionable && !inlineJudgment.allowed) {
|
|
11326
11359
|
return {
|
|
@@ -37,13 +37,17 @@ function isRoot() {
|
|
|
37
37
|
const getuid = process.getuid;
|
|
38
38
|
return typeof getuid === "function" && getuid() === 0;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function resolveExplicitOwnerHome() {
|
|
41
41
|
for (const name of [process.env.SUDO_USER, process.env.LOGNAME, process.env.USER]) {
|
|
42
42
|
if (name && name !== "root" && name !== "") {
|
|
43
43
|
const home = homeOf(name);
|
|
44
44
|
if (home) return home;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
function listOwnerHomes() {
|
|
50
|
+
const homes = [];
|
|
47
51
|
try {
|
|
48
52
|
const passwd = readFileSync("/etc/passwd", "utf-8");
|
|
49
53
|
for (const line of passwd.split("\n")) {
|
|
@@ -53,12 +57,18 @@ function resolveOwnerHome() {
|
|
|
53
57
|
const uid = parseInt(parts[2], 10);
|
|
54
58
|
const name = parts[0];
|
|
55
59
|
if (uid >= 1e3 && name && !name.startsWith("_")) {
|
|
56
|
-
|
|
60
|
+
homes.push(parts[5]);
|
|
57
61
|
}
|
|
58
62
|
}
|
|
59
63
|
} catch {
|
|
60
64
|
}
|
|
61
|
-
return
|
|
65
|
+
return homes;
|
|
66
|
+
}
|
|
67
|
+
function resolveOwnerHome() {
|
|
68
|
+
const explicit = resolveExplicitOwnerHome();
|
|
69
|
+
if (explicit) return explicit;
|
|
70
|
+
const owners = listOwnerHomes();
|
|
71
|
+
return owners.length > 0 ? owners[0] : null;
|
|
62
72
|
}
|
|
63
73
|
function homeOf(name) {
|
|
64
74
|
try {
|
|
@@ -808,6 +818,20 @@ function hasReadWriteKeyword(code) {
|
|
|
808
818
|
const lower = code.toLowerCase();
|
|
809
819
|
return READ_WRITE_KEYWORDS.some((kw) => lower.includes(kw));
|
|
810
820
|
}
|
|
821
|
+
function hasInlineDangerEvidence(command) {
|
|
822
|
+
const code = extractInlineCode(command);
|
|
823
|
+
if (!code) return false;
|
|
824
|
+
const lowered = code.toLowerCase();
|
|
825
|
+
for (const sp of runtimeConfigBridge.current?.effectiveSensitivePaths() ?? []) {
|
|
826
|
+
const p = (sp.path || "").toLowerCase();
|
|
827
|
+
if (!p) continue;
|
|
828
|
+
if (lowered.includes(p)) return true;
|
|
829
|
+
const rel = p.startsWith("~/") ? p.slice(2) : p;
|
|
830
|
+
if (rel !== p && lowered.includes(rel)) return true;
|
|
831
|
+
}
|
|
832
|
+
for (const re of DANGER_EVIDENCE_RES) if (re.test(code)) return true;
|
|
833
|
+
return false;
|
|
834
|
+
}
|
|
811
835
|
function analyzeInlineScript(command) {
|
|
812
836
|
const code = extractInlineCode(command);
|
|
813
837
|
if (!code) {
|
|
@@ -854,13 +878,14 @@ function analyzeInlineScript(command) {
|
|
|
854
878
|
riskType: "file_access"
|
|
855
879
|
};
|
|
856
880
|
}
|
|
857
|
-
var INLINE_RULES, INLINE_CODE_RE, ECHO_STRING_RE, ECHO_SEG_RE, READ_WRITE_KEYWORDS, WRITE_EXEC_CHAIN_PATTERNS, _REDIRECT_PATHS, SHELL_RC_FRAGMENTS, SENSITIVE_PATH_FRAGMENTS, REDIRECT_TO_SENSITIVE_RE, DIR_TRAVERSAL_KEYWORDS;
|
|
881
|
+
var INLINE_RULES, INLINE_CODE_RE, ECHO_STRING_RE, ECHO_SEG_RE, READ_WRITE_KEYWORDS, WRITE_EXEC_CHAIN_PATTERNS, _REDIRECT_PATHS, SHELL_RC_FRAGMENTS, SENSITIVE_PATH_FRAGMENTS, REDIRECT_TO_SENSITIVE_RE, DIR_TRAVERSAL_KEYWORDS, DANGER_EVIDENCE_RES;
|
|
858
882
|
var init_inline_analyzer = __esm({
|
|
859
883
|
"src/engine/inline-analyzer.ts"() {
|
|
860
884
|
"use strict";
|
|
861
885
|
init_esm_shims();
|
|
862
886
|
init_shell_split();
|
|
863
887
|
init_rules_loader();
|
|
888
|
+
init_runtime_config_bridge();
|
|
864
889
|
INLINE_RULES = loadInline();
|
|
865
890
|
if (!INLINE_RULES || Object.keys(INLINE_RULES).length === 0) {
|
|
866
891
|
console.error(
|
|
@@ -880,6 +905,7 @@ var init_inline_analyzer = __esm({
|
|
|
880
905
|
];
|
|
881
906
|
REDIRECT_TO_SENSITIVE_RE = new RegExp(`>{1,2}\\s*(?:\\S*/)?(${SENSITIVE_PATH_FRAGMENTS.map((p) => p.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|")})(?:\\s|$)`, "i");
|
|
882
907
|
DIR_TRAVERSAL_KEYWORDS = INLINE_RULES.dir_traversal_keywords ?? [];
|
|
908
|
+
DANGER_EVIDENCE_RES = (INLINE_RULES.danger_evidence_patterns?.patterns ?? []).map((p) => new RegExp(p, "i"));
|
|
883
909
|
}
|
|
884
910
|
});
|
|
885
911
|
|
|
@@ -4806,7 +4832,14 @@ function splitList(raw) {
|
|
|
4806
4832
|
}
|
|
4807
4833
|
function homeDir() {
|
|
4808
4834
|
try {
|
|
4809
|
-
|
|
4835
|
+
const home = homedir2();
|
|
4836
|
+
if (process.getuid?.() === 0) {
|
|
4837
|
+
const explicit = resolveExplicitOwnerHome();
|
|
4838
|
+
if (explicit) return explicit;
|
|
4839
|
+
const owners = listOwnerHomes();
|
|
4840
|
+
if (owners.length === 1) return owners[0];
|
|
4841
|
+
}
|
|
4842
|
+
return home;
|
|
4810
4843
|
} catch {
|
|
4811
4844
|
return tmpdir();
|
|
4812
4845
|
}
|
|
@@ -9494,7 +9527,7 @@ async function runAnalysis(input) {
|
|
|
9494
9527
|
return effectiveResult;
|
|
9495
9528
|
}
|
|
9496
9529
|
} else {
|
|
9497
|
-
if (
|
|
9530
|
+
if (isLiteralTextCmd || isInlineScriptCmd && hasInlineDangerEvidence(input.aNext.actionDetail)) {
|
|
9498
9531
|
const inlineJudgment = analyzeInlineScript(input.aNext.actionDetail);
|
|
9499
9532
|
if (inlineJudgment.actionable && !inlineJudgment.allowed) {
|
|
9500
9533
|
return {
|
|
@@ -98,6 +98,24 @@
|
|
|
98
98
|
"flags": "i"
|
|
99
99
|
}
|
|
100
100
|
],
|
|
101
|
+
"danger_evidence_patterns": {
|
|
102
|
+
"_comment": "内联脚本补位判定的准入闸(2026-11):代码里必须命中其中之一(或出现敏感路径),才值得进 inline 语义判定。动机:补位判定原先只要求「是内联脚本」,而 analyze_inline_script 的步骤 2 只看读写调用词(open( / system( ...),导致 Image.open('/tmp/x.png')、print(open('/tmp/x').read()) 这类正常脚本被 critical 误杀(0.15.4 起)。只放明确的破坏性动作,避免误伤正常文件处理脚本。",
|
|
103
|
+
"patterns": [
|
|
104
|
+
"\\brm\\s+-[a-zA-Z]*[rf][a-zA-Z]*\\s+\\S+",
|
|
105
|
+
"\\bmkfs(?:\\.\\w+)?\\b",
|
|
106
|
+
"\\bdd\\s+if=",
|
|
107
|
+
"\\bchmod\\s+[0-7]*[2367][0-7]{2}\\b",
|
|
108
|
+
"\\bchown\\s+root\\b",
|
|
109
|
+
"\\b(?:shutdown|reboot|halt|poweroff)\\b",
|
|
110
|
+
"\\buserdel\\b|\\bchpasswd\\b",
|
|
111
|
+
"\\bcrontab\\s+-",
|
|
112
|
+
"\\bcurl\\b[^|\\n]*\\|\\s*(?:bash|sh|zsh)\\b",
|
|
113
|
+
"\\bwget\\b[^|\\n]*\\|\\s*(?:bash|sh|zsh)\\b",
|
|
114
|
+
"/dev/(?:tcp|udp)/",
|
|
115
|
+
"authorized_keys",
|
|
116
|
+
"\\.ssh/id_(?:rsa|ed25519)"
|
|
117
|
+
]
|
|
118
|
+
},
|
|
101
119
|
"redirect_sensitive_paths": {
|
|
102
120
|
"_comment": "「重定向写到敏感路径」的路径清单。**两端口径本就不同,此处只做搬家、未统一**:Python 优先用 profile.sensitive_paths 动态编译(含 ~/.bashrc 等),python_fallback 仅在没有 profile 时兜底(生产不触发);TS 无 profile 注入,用 ts_static + shell_rc_fragments 静态拼。统一两端口径是独立事项,改动会直接改变判定,不要顺手做。",
|
|
103
121
|
"python_fallback": [
|
package/dist/server.js
CHANGED
|
@@ -43,13 +43,17 @@ function isRoot() {
|
|
|
43
43
|
const getuid = process.getuid;
|
|
44
44
|
return typeof getuid === "function" && getuid() === 0;
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function resolveExplicitOwnerHome() {
|
|
47
47
|
for (const name of [process.env.SUDO_USER, process.env.LOGNAME, process.env.USER]) {
|
|
48
48
|
if (name && name !== "root" && name !== "") {
|
|
49
49
|
const home = homeOf(name);
|
|
50
50
|
if (home) return home;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
function listOwnerHomes() {
|
|
56
|
+
const homes = [];
|
|
53
57
|
try {
|
|
54
58
|
const passwd = readFileSync("/etc/passwd", "utf-8");
|
|
55
59
|
for (const line of passwd.split("\n")) {
|
|
@@ -59,12 +63,18 @@ function resolveOwnerHome() {
|
|
|
59
63
|
const uid = parseInt(parts[2], 10);
|
|
60
64
|
const name = parts[0];
|
|
61
65
|
if (uid >= 1e3 && name && !name.startsWith("_")) {
|
|
62
|
-
|
|
66
|
+
homes.push(parts[5]);
|
|
63
67
|
}
|
|
64
68
|
}
|
|
65
69
|
} catch {
|
|
66
70
|
}
|
|
67
|
-
return
|
|
71
|
+
return homes;
|
|
72
|
+
}
|
|
73
|
+
function resolveOwnerHome() {
|
|
74
|
+
const explicit = resolveExplicitOwnerHome();
|
|
75
|
+
if (explicit) return explicit;
|
|
76
|
+
const owners = listOwnerHomes();
|
|
77
|
+
return owners.length > 0 ? owners[0] : null;
|
|
68
78
|
}
|
|
69
79
|
function homeOf(name) {
|
|
70
80
|
try {
|
|
@@ -945,7 +955,14 @@ function principalHash(principal) {
|
|
|
945
955
|
}
|
|
946
956
|
function homeDir() {
|
|
947
957
|
try {
|
|
948
|
-
|
|
958
|
+
const home = homedir2();
|
|
959
|
+
if (process.getuid?.() === 0) {
|
|
960
|
+
const explicit = resolveExplicitOwnerHome();
|
|
961
|
+
if (explicit) return explicit;
|
|
962
|
+
const owners = listOwnerHomes();
|
|
963
|
+
if (owners.length === 1) return owners[0];
|
|
964
|
+
}
|
|
965
|
+
return home;
|
|
949
966
|
} catch {
|
|
950
967
|
return tmpdir();
|
|
951
968
|
}
|
|
@@ -1339,6 +1356,20 @@ function hasReadWriteKeyword(code) {
|
|
|
1339
1356
|
const lower = code.toLowerCase();
|
|
1340
1357
|
return READ_WRITE_KEYWORDS.some((kw) => lower.includes(kw));
|
|
1341
1358
|
}
|
|
1359
|
+
function hasInlineDangerEvidence(command) {
|
|
1360
|
+
const code = extractInlineCode(command);
|
|
1361
|
+
if (!code) return false;
|
|
1362
|
+
const lowered = code.toLowerCase();
|
|
1363
|
+
for (const sp of runtimeConfigBridge.current?.effectiveSensitivePaths() ?? []) {
|
|
1364
|
+
const p = (sp.path || "").toLowerCase();
|
|
1365
|
+
if (!p) continue;
|
|
1366
|
+
if (lowered.includes(p)) return true;
|
|
1367
|
+
const rel = p.startsWith("~/") ? p.slice(2) : p;
|
|
1368
|
+
if (rel !== p && lowered.includes(rel)) return true;
|
|
1369
|
+
}
|
|
1370
|
+
for (const re of DANGER_EVIDENCE_RES) if (re.test(code)) return true;
|
|
1371
|
+
return false;
|
|
1372
|
+
}
|
|
1342
1373
|
function analyzeInlineScript(command) {
|
|
1343
1374
|
const code = extractInlineCode(command);
|
|
1344
1375
|
if (!code) {
|
|
@@ -1385,13 +1416,14 @@ function analyzeInlineScript(command) {
|
|
|
1385
1416
|
riskType: "file_access"
|
|
1386
1417
|
};
|
|
1387
1418
|
}
|
|
1388
|
-
var INLINE_RULES, INLINE_CODE_RE, ECHO_STRING_RE, ECHO_SEG_RE, READ_WRITE_KEYWORDS, WRITE_EXEC_CHAIN_PATTERNS, _REDIRECT_PATHS, SHELL_RC_FRAGMENTS, SENSITIVE_PATH_FRAGMENTS, REDIRECT_TO_SENSITIVE_RE, DIR_TRAVERSAL_KEYWORDS;
|
|
1419
|
+
var INLINE_RULES, INLINE_CODE_RE, ECHO_STRING_RE, ECHO_SEG_RE, READ_WRITE_KEYWORDS, WRITE_EXEC_CHAIN_PATTERNS, _REDIRECT_PATHS, SHELL_RC_FRAGMENTS, SENSITIVE_PATH_FRAGMENTS, REDIRECT_TO_SENSITIVE_RE, DIR_TRAVERSAL_KEYWORDS, DANGER_EVIDENCE_RES;
|
|
1389
1420
|
var init_inline_analyzer = __esm({
|
|
1390
1421
|
"src/engine/inline-analyzer.ts"() {
|
|
1391
1422
|
"use strict";
|
|
1392
1423
|
init_esm_shims();
|
|
1393
1424
|
init_shell_split();
|
|
1394
1425
|
init_rules_loader();
|
|
1426
|
+
init_runtime_config_bridge();
|
|
1395
1427
|
INLINE_RULES = loadInline();
|
|
1396
1428
|
if (!INLINE_RULES || Object.keys(INLINE_RULES).length === 0) {
|
|
1397
1429
|
console.error(
|
|
@@ -1411,6 +1443,7 @@ var init_inline_analyzer = __esm({
|
|
|
1411
1443
|
];
|
|
1412
1444
|
REDIRECT_TO_SENSITIVE_RE = new RegExp(`>{1,2}\\s*(?:\\S*/)?(${SENSITIVE_PATH_FRAGMENTS.map((p) => p.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|")})(?:\\s|$)`, "i");
|
|
1413
1445
|
DIR_TRAVERSAL_KEYWORDS = INLINE_RULES.dir_traversal_keywords ?? [];
|
|
1446
|
+
DANGER_EVIDENCE_RES = (INLINE_RULES.danger_evidence_patterns?.patterns ?? []).map((p) => new RegExp(p, "i"));
|
|
1414
1447
|
}
|
|
1415
1448
|
});
|
|
1416
1449
|
|
|
@@ -10763,7 +10796,7 @@ async function runAnalysis(input) {
|
|
|
10763
10796
|
return effectiveResult;
|
|
10764
10797
|
}
|
|
10765
10798
|
} else {
|
|
10766
|
-
if (
|
|
10799
|
+
if (isLiteralTextCmd || isInlineScriptCmd && hasInlineDangerEvidence(input.aNext.actionDetail)) {
|
|
10767
10800
|
const inlineJudgment = analyzeInlineScript(input.aNext.actionDetail);
|
|
10768
10801
|
if (inlineJudgment.actionable && !inlineJudgment.allowed) {
|
|
10769
10802
|
return {
|
package/package.json
CHANGED