Skip to content

baseline-compare.py:metric/language 欄位未跳脫即印 CI stdout(CR+ANSI log-spoofing) #117

Description

@kiki830621

Problem

scripts/lib/baseline-compare.py(L48/L53)把 baseline 的欄位未跳脫印到 CI stdout。#112 verify 的 Devil's Advocate live 重現:metric 欄位驗證於任何地方皆無,可從一份普通已 commit 的 baseline(無 TOCTOU 窗口)洩漏 CR + ANSI 到 CI log:

metric = "cer^[[32m
FAKE ALL-PASS"

→ 在 CI console 偽造綠色「全過」字樣(log-spoofing)。

DA 同時澄清 scope:golden / tolerance 欄位有 float() guard → fail-loud 不可注入;language 在此路徑也未跳脫但威脅較低(已被 #112 於 worklist 端擋,此處是另一 render 路徑)。核心新發現是 metric(committed baseline、無 TOCTOU)。

Type

bug

Expected

baseline-compare.py 對印到 stdout 的 baseline 欄位(至少 metriclanguage)做 charset 驗證或 repr()/escape,避免 CR/ANSI 控制序列進 CI log。

Impact

LOW——log-spoofing(偽造 CI 綠字),非 breach、非 path/RCE。獨立於 #112 的 worklist 端修復(不同檔案 baseline-compare.py、不同 render 路徑)。

Source: surfaced during /idd-verify #112 (PR #114) — Devil's Advocate,overturned security lens H2(b) 的「language-specific + TOCTOU-gated」framing,證明 metric 從 committed baseline 即可洩漏、無 TOCTOU。

Current Status

  • Phase: closed
  • Complexity: Simple
  • Last update: 2026-08-02

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions