ci(security): 接线 gosec 负向自测并新增 check-secrets 负向自测 - #1738
Conversation
|
Warning Review limit reached
Next review available in: 3 minutes Limit details: You’ve used all 1 included review currently available under your plan. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- validate job 补 Self-test gosec gate 与 Self-test secret guard 两步 - 新增 check-secrets.Tests.sh:7 用例覆盖 placeholder/URL 放行与 AKIA/ghp_/sk-/private key 拒收 - verify-ci-gates.py 断言两步存在,防止未来漂移 Co-authored-by: Cursor <cursor@vectorcontrol.tech>
7a1f44a to
f9f0ebf
Compare
背景
verify-gosec-gates.Tests.sh(gosec fail-closed 负向自测)存在但未接进 CI,与已接线的verify-vulnerability-gates.Tests.sh不对称。check-secrets.sh是 AGENTS.md §9 secret 禁令的最后一道机器门禁,却零负向自测覆盖。一次 regex 调整可让真实 secret 漏过而 CI 仍报绿。变更
.github/workflows/checks.ymlvalidate job:补Self-test gosec gate(bash scripts/verify/tests/verify-gosec-gates.Tests.sh)与Self-test secret guard(bash scripts/verify/tests/check-secrets.Tests.sh)两步,与 vulnerability gates 自测对称。scripts/verify/tests/check-secrets.Tests.sh(新文件):7 用例覆盖 placeholder.env.example放行、*_URLendpoint 放行、empty worktree 退出 0、AKIA/ghp_/sk-/private key 拒收(非零退出)。使用 temp git repo + staged diff 驱动。scripts/verify/verify-ci-gates.py:断言 validate job 含Self-test gosec gate与Self-test secret guard两步名,防止未来漂移。证据
real_tested=false:本地 bash 自测全绿(gosec 6/6,check-secrets 7/7)。python scripts/verify/verify-ci-gates.py+python -B scripts/verify/tests/verify-ci-gates.Tests.py(8 tests OK)+git diff --check全绿。--no-verify推送;GitHub Secret Scanning 作为 backstop 仍生效。关联
审计 P1-1(gosec 自测未接线)+ P1-3(check-secrets 无负向自测)。