@yottameta/yotta-agent-hardening 0.2.2 → 0.2.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # 更新日志
2
2
 
3
+ ## v0.2.3 (2026-08-30)
4
+
5
+ 表述修正:统一为「MIT 开源发布、能力开放」的对外表述;移除内部讨论相关内容。
6
+
3
7
  ## v0.2.2 (2026-08-30)
4
8
 
5
9
  安全家族检测能力增强 + 措辞规范(与元信 / 元安 / 元审 v0.2.2 对齐):
@@ -16,7 +20,7 @@
16
20
 
17
21
  初始发布:
18
22
 
19
- - 定位:元安全 —— 防御向 AI 智能体自身安全加固技能(0 元免费开源,安全家族「纵深」线 M7)。
23
+ - 定位:元安全 —— 防御向 AI 智能体自身安全加固技能(安全家族「纵深」线 M7)。
20
24
  审视智能体自身运行环境(安装的 skills / MCP 服务器 / 工具描述 / 权限与数据读取面),按
21
25
  提示注入防护 / 工具调用边界 / 数据隔离 三域做配置面静态加固扫描;**只防御、不产出攻击 payload**。
22
26
  - 三域检测:域1 Prompt injection 防护(指令覆盖话术 / 角色伪冒 / 凭据采集与透传指令 / 编码隐藏指令,
package/SKILL.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: yotta-agent-hardening
3
- version: 0.2.2
3
+ version: 0.2.3
4
4
  description: 元安全 —— 给 AI 智能体 / Agent 技能自身做「体检 + 加固建议」:按 提示注入防护 / 工具调用边界 / 数据隔离 三域,对安装的 skills、MCP 服务器、工具描述、权限与数据读取面做配置面静态加固扫描,输出加固报告与可执行防御守则(零依赖 Python 3.8+,扫描只读、敏感读取检测默认开启、报告用「类」表述、每次扫描默认留痕)。触发:用户要求给智能体或技能环境做安全体检 / 加固、检查 MCP 服务器或技能是否可信、排查提示注入 / 越权 / 数据泄露风险、想了解装了一堆技能后的整体暴露面;或用户说 元安全 / 加固 / 安全体检 / 体检 / hardening / 扫一下我的技能 / 检查 MCP / 防御守则 / guardrails 等。边界(Do NOT trigger):不产出可复制注入串 / 攻击 payload;只扫描用户自有、有权检查的目录与配置,不扫描无权访问的环境;不做运行时拦截(那是元盾);不做单个技能装前审核(那是元审 / 元信);不替代人工安全审计与最终决策。
5
5
  license: MIT
6
6
  ---
@@ -102,11 +102,11 @@ python3 scripts/yotta_agent_hardening.py audit log --severity high --export audi
102
102
  不扫描无权访问的环境;不做运行时拦截(那是元盾);不做单个技能装前审核(那是元审 / 元信);
103
103
  不替代人工安全审计与最终决策。
104
104
 
105
- ## 免费开源:全部开放(0 元)
105
+ ## 开源与开放
106
106
 
107
- - 本技能当前 **0 元免费开源**,全部能力开放不缩水:三域扫描全功能(提示注入防护 / 工具调用边界 /
107
+ - 本技能以 MIT 开源发布,全部能力开放不缩水:三域扫描全功能(提示注入防护 / 工具调用边界 /
108
108
  数据隔离)+ 防御守则 + 报告模板 + 中文教程 + 扫描留痕。
109
- - 能力以开放为基调;若生态出现「可评测 + 可定价 + 真实购买」闭环,再另行立项讨论。
109
+ - 能力以开放为基调。
110
110
 
111
111
  ## 范围 / 授权 / 法律声明
112
112
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yottameta/yotta-agent-hardening",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "YuanSafe (元安全) — a defensive AI-agent hardening skill: static configuration-facing hardening scan of an agent's own runtime (installed skills, MCP servers, tool descriptions, permissions and data surfaces) across three domains — prompt-injection defense / tool-call boundaries / data isolation — producing a hardening report and enforceable defense guardrails, with zero-dependency Python 3.8+, read-only scanning, sensitive-read detection on by default, \"class\" phrasing in reports (no copy-paste injection strings) and an audit trail on every scan. Triggers: user asks for a security check / hardening of an agent or skill environment, whether MCP servers or skills are trustworthy, prompt-injection / over-privilege / data-leak risk investigation, or the overall exposure after installing many skills. Boundaries: no executable injection strings or attack payloads; scans only directories and configs the user owns or is authorized to inspect; no runtime interception (that is yotta-guardian); no per-skill pre-install review (that is yotta-vetter / yotta-verify); human review and final decisions are not replaced.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -1,6 +1,6 @@
1
1
  # 防御守则模板(guardrails template)
2
2
 
3
- > 本文件 = `rules` 命令的当前输出(生成工具:yotta-agent-hardening v0.2.2,格式版本 1)。
3
+ > 本文件 = `rules` 命令的当前输出(生成工具:yotta-agent-hardening v0.2.3,格式版本 1)。
4
4
  > 权威来源永远是 CLI:`python3 scripts/yotta_agent_hardening.py rules`,版本升级后以命令输出为准。
5
5
 
6
6
  ## 用途
@@ -16,7 +16,7 @@
16
16
 
17
17
  ```markdown
18
18
  # 智能体加固守则(元安全 · yotta-agent-hardening)
19
- > 生成工具:yotta-agent-hardening v0.2.2;格式版本 1;覆盖三域(提示注入防护 / 工具调用边界 / 数据隔离)。
19
+ > 生成工具:yotta-agent-hardening v0.2.3;格式版本 1;覆盖三域(提示注入防护 / 工具调用边界 / 数据隔离)。
20
20
  > 用法:放入智能体运行时目录(如 .yotta-hardening/GUARDRAILS.md),让智能体每次会话读取执行。
21
21
 
22
22
  ## 域 1:Prompt injection 防护
@@ -23,7 +23,7 @@
23
23
  {
24
24
  "tool": "yotta-agent-hardening",
25
25
  "cn_name": "元安全",
26
- "version": "0.2.2",
26
+ "version": "0.2.3",
27
27
  "target": "./agent-runtime",
28
28
  "time": "2026-08-29T08:10:33+08:00",
29
29
  "domains": ["pi", "tools", "isolation"],
@@ -19,7 +19,7 @@
19
19
  设计原则:
20
20
  - 纯 Python 3.8+ 标准库,零依赖;Windows / Linux / macOS 通用。
21
21
  - 扫描只读:不修改任何被测文件;只写留痕到配置目录(~/.yotta-hardening)与 --report 指定文件。
22
- - 行为锚点(docs/元安全-agent-hardening立项设计.md §四)写死为默认行为:
22
+ - 行为锚点写死为默认行为:
23
23
  ① 扫描只读;② 敏感读取检测默认开启、无「关闭」开关;③ 文档/报告不给可复制注入串(「类」表述,
24
24
  不输出命中原文);④ 每次扫描默认留痕。
25
25
  - 规则复用:危险行为模式 = 元安 audit_rules 同步副本(TOOL_PATTERN_RULES);提示注入 = 元信
@@ -61,7 +61,7 @@ _HERE = Path(__file__).resolve().parent
61
61
  sys.path.insert(0, str(_HERE))
62
62
  import hardening_rules as hr # noqa: E402
63
63
 
64
- VERSION = "0.2.2"
64
+ VERSION = "0.2.3"
65
65
  TOOL_NAME = "yotta-agent-hardening"
66
66
  CN_NAME = "元安全"
67
67