@kenhkl/agent-moss 0.17.39 → 0.17.40
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/rules/l1_rules.json +4 -4
- package/package.json +1 -1
package/dist/rules/l1_rules.json
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dangerous_commands": [
|
|
3
3
|
{
|
|
4
|
-
"pattern": "\\brm\\
|
|
4
|
+
"pattern": "\\brm[ \\t]+-[a-zA-Z]*r[a-zA-Z]*f[a-zA-Z]*(?:[ \\t]+(?:-[a-zA-Z]+|--[\\w=-]*))*[ \\t]+[\\\"']?/(?!\\w)",
|
|
5
5
|
"risk_level": "critical",
|
|
6
6
|
"risk_type": "script_execution",
|
|
7
7
|
"reason": "检测到递归强制删除根目录 (rm -rf /)"
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
|
-
"pattern": "\\brm\\
|
|
10
|
+
"pattern": "\\brm[ \\t]+-[a-zA-Z]*[rf][a-zA-Z]*(?:[ \\t]+(?:-[a-zA-Z]+|--[\\w=-]*))*[ \\t]+[\\\"']?/(?:etc|var(?!/tmp)|usr|boot|root|opt|srv|sys|proc|home(?:/|/[A-Za-z0-9_.-]+/?)?(?=[\\s;|&\\\"']|$))",
|
|
11
11
|
"risk_level": "critical",
|
|
12
12
|
"risk_type": "script_execution",
|
|
13
13
|
"reason": "检测到删除关键系统目录"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
|
-
"pattern": "\\brm\\
|
|
16
|
+
"pattern": "\\brm[ \\t]+-[a-zA-Z]*r[a-zA-Z]*(?:[ \\t]+(?:-[a-zA-Z]+|--[\\w=-]*))*[ \\t]+[\\\"']?/(?!tmp|var/tmp|run|dev/shm|mnt|media)(?:/|\\b)",
|
|
17
17
|
"risk_level": "medium",
|
|
18
18
|
"risk_type": "script_execution",
|
|
19
19
|
"reason": "检测到递归删除操作 (rm -r /...)"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
|
-
"pattern": "\\brm\\
|
|
22
|
+
"pattern": "\\brm[ \\t]+-[a-zA-Z]*f[a-zA-Z]*(?:[ \\t]+(?:-[a-zA-Z]+|--[\\w=-]*))*[ \\t]+[\\\"']?/(?!tmp/|var/tmp/|run/|dev/shm/)",
|
|
23
23
|
"risk_level": "medium",
|
|
24
24
|
"risk_type": "script_execution",
|
|
25
25
|
"reason": "检测到强制删除文件 (rm -f /...)"
|