Skip to content

fix(governance): read the owner from protected variables - #3

Merged
Pigbibi merged 1 commit into
mainfrom
chore/owner-from-vars
Nov 7, 2026
Merged

Pigbibi merged 1 commit into
mainfrom
chore/owner-from-vars

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

改动内容

  • 所有者身份不再写入 policy.json。main.cjs 从 GOVERNANCE_OWNER_ID / GOVERNANCE_OWNER_LOGIN 读取,模板传入组织或仓库变量 RISK_GATE_OWNER_ID / RISK_GATE_OWNER;变量缺失或只配置一半时检查失败,不会静默降级。
  • owner 在策略校验中变为可选字段;出现时仍校验形状。labelEvidence 在没有 owner 时不接受 owner-approved。
  • 默认策略与 schema 同步:owner 仍是合法字段,但不在 required 中。
  • 测试夹具注入合成 owner;新增 owner 可选、额外字段、空登录名用例;新增 test-main.cjs 覆盖变量覆盖与失败关闭。

验证

  • node --test 六个套件:159 通过
  • test_secret_scan.py:40 通过(真实 Gitleaks 8.30.1)
  • actionlint:模板与测试工作流无告警

@Pigbibi
Pigbibi merged commit 5a51a0c into main Nov 7, 2026
2 checks passed
@Pigbibi
Pigbibi deleted the chore/owner-from-vars branch November 7, 2026 12:11
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