@kenhkl/agent-moss 0.12.6 → 0.12.7
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 +644 -18
- package/dist/cli.js.map +1 -1
- package/dist/engine/coordinator.d.ts +3 -1
- package/dist/engine/coordinator.js +603 -2
- package/dist/engine/coordinator.js.map +1 -1
- package/dist/rules/l1_rules.json +21 -0
- package/dist/server.js +612 -17
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
- package/dist/skills/brain_script_execution_php_r_system.md +0 -17
- package/dist/skills/brain_script_execution_python_c_import.md +0 -17
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# brain_script_execution_php_r_system
|
|
2
|
-
|
|
3
|
-
## 来源
|
|
4
|
-
Brain 自动提取(LLM 分析沉淀)
|
|
5
|
-
|
|
6
|
-
## 场景
|
|
7
|
-
当 Agent 执行以下类型操作时触发:
|
|
8
|
-
- 风险类型: script_execution
|
|
9
|
-
- 操作特征: php -r "system('rm -rf ~');"
|
|
10
|
-
|
|
11
|
-
## 判断依据
|
|
12
|
-
动作执行 `rm -rf ~`,递归强制删除用户主目录,属于不可逆的破坏性操作,直接命中 script_execution_guard 和 intent_deviation_guard 的 Critical 级规则。执行理由为“删除测试目录”,但操作范围远超删除单个测试目录,实际会删除整个用户主目录,与最小权限原则严重不符。即使原始用户 Prompt 未提供,该动作本身具有 critical 级风险,必须拒绝。
|
|
13
|
-
|
|
14
|
-
## 处理建议
|
|
15
|
-
- 优先检查操作的上下文和意图
|
|
16
|
-
- 结合 action_history 判断是否存在恶意链
|
|
17
|
-
- 必要时 Deny 并记录原因
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# brain_script_execution_python_c_import
|
|
2
|
-
|
|
3
|
-
## 来源
|
|
4
|
-
Brain 自动提取(LLM 分析沉淀)
|
|
5
|
-
|
|
6
|
-
## 场景
|
|
7
|
-
当 Agent 执行以下类型操作时触发:
|
|
8
|
-
- 风险类型: script_execution
|
|
9
|
-
- 操作特征: python3 -c "import os; os.system('rm -rf ~')"
|
|
10
|
-
|
|
11
|
-
## 判断依据
|
|
12
|
-
动作执行 rm -rf ~,递归强制删除用户主目录,属于不可逆的破坏性操作,直接触发 script_execution_guard 和 intent_deviation_guard 的 Critical 级规则。执行理由“删除测试目录”与删除整个主目录范围严重不符,且无任何合理场景可授权此类操作。
|
|
13
|
-
|
|
14
|
-
## 处理建议
|
|
15
|
-
- 优先检查操作的上下文和意图
|
|
16
|
-
- 结合 action_history 判断是否存在恶意链
|
|
17
|
-
- 必要时 Deny 并记录原因
|