Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat(governance): holdout 隔离断言 + 泄漏诱饵巡检(W1-C4 #167,ADR-0056) #176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
feat(governance): holdout 隔离断言 + 泄漏诱饵巡检(W1-C4 #167,ADR-0056) #176
Changes from all commits
afd83a2befafd13ffe48fFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4. Unauth github api call
🐞 Bug☼ ReliabilityAgent Prompt
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation toolsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
匿名 API 调用会被 60 次/小时限流阻断演习。
第 41 行未带凭据请求
api.github.com。GitHub Actions 出口 IP 为共享地址,匿名配额易耗尽。set -euo pipefail与curl -sSf组合下,一旦 403 限流,整条演习链路直接失败,且错误信息只是 curl 退出码。holdout 为公开仓,用
github.token即可读取。🔒️ 建议修复
env: MARKER_ENTRY: ${{ inputs.marker_entry }} + GH_TOKEN: ${{ github.token }} run: | set -euo pipefail - SHA=$(curl -sSf "https://api.github.com/repos/Cloudbird-Software/holdout/commits?path=canary/registry.yaml&per_page=1" \ - | python3 -c 'import json,sys; print(json.load(sys.stdin)[0]["sha"])') + SHA=$(gh api "repos/Cloudbird-Software/holdout/commits?path=canary/registry.yaml&per_page=1" --jq '.[0].sha') + if [[ -z "$SHA" || "$SHA" == "null" ]]; then + echo "::error::holdout canary/registry.yaml commit sha 拉取失败"; exit 2 + fi📝 Committable suggestion
🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3. Unsafe $github_env write
🐞 Bug⛨ SecurityAgent Prompt
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation toolsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win
写入
$GITHUB_ENV前请校验 marker 为单行。第 62-63 行把 registry 字段原样写成
KEY=VALUE。若 marker 含换行,后续内容会被解析成额外环境变量。registry 由 owner 维护,当前风险有限,但本步骤是演习的固定入口,加一行断言成本很低。🛡️ 建议加固
依据 path instructions:「非受控输入禁止
${{ }}直接内插 shell,必须经 env 中转」——同一防注入原则适用于跨步骤 env 传递。📝 Committable suggestion
🤖 Prompt for AI Agents
Source: Path instructions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift
正控节律与扫描窗口不匹配,NO-CONTROL 红灯会成为常态(major)。
sweep 每周一运行,窗口默认 7 天。演习工作流的注释把 drill 定义为 owner 月度职责。没有 drill 的周次,窗口内必然检不到任何 drill marker,verdict 落入 NO-CONTROL 并
exit 1。结果是每月约 3 次必然红灯,真实的检测通道故障将被淹没在常态告警中,与「正控必须在场」的意图相反。请让两者对齐。可选方案:
Also applies to: 201-204
🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
since_days为小数时int()会抛异常。workflow_dispatch的type: number输入以字符串传入。若 owner 填7.5,第 78 行int(os.environ["SINCE_DAYS"])抛ValueError,整轮 sweep 以 traceback 失败,且无可读的错误说明。🐛 建议修复
🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2. Silent log-scan gaps
🐞 Bug≡ CorrectnessAgent Prompt
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation toolsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 Performance & Scalability | 🟠 Major | 🏗️ Heavy lift
日志全量下载解压在 20 分钟超时下难以完成(major)。
当前每个 active 仓最多取 50 个 run,逐 run 下载完整日志 zip,用
b"".join(z.read(n) for n in z.namelist())一次性拼进内存,再对每个 marker 做子串查找。按 REPOS.yaml 现有 active 仓规模,单轮上限接近数百次 zip 下载,加上 0.15s 间隔与解压开销,容易触发第 36 行的 20 分钟超时。超时的表现是整轮失败,而不是覆盖不足告警。同时
fetch_logs_blob把所有异常吞成None,下载被限流时会静默减少覆盖面,最终以 NO-CONTROL 呈现,无法区分「限流」与「通道坏了」。建议逐条目流式匹配并在命中后短路,同时记录下载失败计数并纳入 verdict。
♻️ 建议改造方向
🤖 Prompt for AI Agents
Uh oh!
There was an error while loading. Please reload this page.