Skip to content

data: annotate config-class Dockerfile entries (GHSA-W7J5-J98M-W679) …#53

Open
Im-Asher wants to merge 1 commit into
Tencent:mainfrom
Im-Asher:dev
Open

data: annotate config-class Dockerfile entries (GHSA-W7J5-J98M-W679) …#53
Im-Asher wants to merge 1 commit into
Tencent:mainfrom
Im-Asher:dev

Conversation

@Im-Asher

@Im-Asher Im-Asher commented Jul 15, 2026

Copy link
Copy Markdown

问题是什么?

VulnGym 用 entry_point / critical_operation / trace 表达漏洞路径,这套结构为污点流、调用链、权限绕过等"有输入传播链"的漏洞设计。而 GHSA-W7J5-J98M-W679 的 4 条 OpenClaw Dockerfile 样本属于配置状态漏洞(CWE-250 不必要特权)——进程以 root(uid=0)运行,无外部输入、无污点传播

当前标注虽然 file/line/code 能匹配源码,但存在以下不适配:

  1. entry_point 语义错位:标在 FROM 行,但 desc 沿用污点类话术("漏洞源头/起点"),暗示"运行时可达入口"——而配置类漏洞根本没有运行时入口。
  2. critical_operation.desc 复述代码:如"以 root 运行",没有解释为什么这一行是漏洞关键节点
  3. verify=0 与人工备注矛盾:人工备注已确认是"纯配置文件、非污点类漏洞",但标注仍是自动标注未审计状态。
样本 原标注问题 状态入口(本方案锚定) 最小关键点
entry-00241 entry_point.desc 误用污点语义 FROM 引入默认 root 状态 CMD 以 root 启动
entry-00242 critical_operation.desc 复述代码 FROM 引入默认 root 状态 文件末尾 RUN pnpm install 固化未声明 USER 的镜像
entry-00243 critical_operation.desc 复述代码 FROM 引入默认 root 状态 ENTRYPOINT 以 root 启动
entry-00244 根因未点明(落在 FROM/ENTRYPOINT FROM 默认 root + sudoers 架空降权 ENTRYPOINT 以被架空的 app 身份运行

解决方案是什么?

  1. 制定配置类标注原则(写入 config_vuln_annotation.md

    • entry_point = 配置基线锚点(配置生效起点),非运行时入口;
    • critical_operation = 漏洞兑现点(特权被具体兑现/利用处);
    • trace = 配置声明 → 生效的传播链(传播"特权状态"而非"污点")。
  2. 最小改动修复 4 条:仅重写 entry_point.desccritical_operation.desc,把"复述代码"改为"解释根因"(如 entry-00244 说明 USER app 仅为形式降权,sudoersNOPASSWD:ALL 使其与 root 等价);并将 verify01(本次修复即人工审计)。file/line/codetrace 逐字保留,保证仍能在 commit 中匹配。

  3. 锚点选择:对前三个缺 USER 的样本,以真实 FROM 作为默认状态锚点,不构造不存在的错误行;对 entry-00244,保留 FROM 锚点并在 desc 中点明 sudoers NOPASSWD:ALL 架空 USER app 降权,根因节点保留在 trace(L18 sudoers、L20 USER app)。

  4. 交付三件套

    • entries.fixed.jsonl:完整 408 行修复版(仅 4 条 3 个语义字段变化);
    • config_vuln_annotation.md:配置类/非污点类漏洞标注规范;
    • changes.csv:字段级变更对比。
  5. 零破坏性:未引入任何 SCHEMA.md 变更;已提交 e962014


怎么证明有效?

验证层级 验证内容 结果
源码逐字核对 对照 OpenClaw 漏洞 commit c56fb7fcurl 拉取 4 个 Dockerfile 按行号核对 entry_pointcritical_operationfile/line/code(含 entry-00244 的 trace L18 NOPASSWD:ALL、L20 USER app 4/4 条 entry_pointcritical_operation 全部匹配
修复证据核对 检查上游安全修复提交 84281abd 对三个缺失 USER 文件的修改 3/3 均新增 USER appuserinstall-sh-e2ee2e/Dockerfilee2e/Dockerfile.qr-import);install-sh-nonroot 未被改动,印证 entry-00244 根因在 sudoers 而非缺 USER
数据集校验 JSONL 合法性、SCHEMA.md 基础约束、行数与审核统计 408 entries / 184 reports;line≥1、无被禁内部字段、verify∈{0,1}
修改范围检查 与原始 data/entries.jsonl 逐 entry、逐字段比较 仅 4 条目标 entry 的 entry_point.desccritical_operation.descverify 三字段变化;file/line/codetrace 逐字不变
格式检查 Python 编译与 git diff --check 全部通过(git diff --check 无输出)

…and add annotation spec

Fix entry-00241..00244 (OpenClaw E2E/test Dockerfiles running as root, CWE-250) by rewriting entry_point/critical_operation desc to explain the config root cause, and set verify=1 after manual audit.

Add config_vuln_annotation.md with labeling principles for config-class / non-taint vulnerabilities, and changes.csv recording field-level changes. No SCHEMA.md changes; file/line/code and trace preserved verbatim.
@Im-Asher

Copy link
Copy Markdown
Author

#8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant