You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[WP12] CI/CD supply-chain & gating: unpinned actions, auto-merge without in-repo build gate, dead branch guard #197
此內容由 AI 產生(specification-mapper 全庫審查 2026-07-16.執行圖)。
Work package WP12 · findings: DEP-02, TEST-01, COR-02 · worst severity: medium · effort: S
From the 2026-07-16 whole-codebase review of branch jakarta (snapshot 7de4a33; modules mapper/ + starter/). Every finding below is CONFIRMED by independent adversarial verification. File:line coordinates are from the snapshot and may have drifted.
Findings
DEP-02 — Third-party actions pinned to mutable tags in a workflow wielding a repo-write token that auto-merges its own PRs (dependencies, medium)
File: .github/workflows/bump-spring.yml:42
Evidence: madhead/semver-utils@latest (and other third-party actions on mutable tags) run in a workflow that holds a repo-write App token and auto-merges the PRs it creates — a compromised tag is a supply-chain write path into the repo.
TEST-01 — Dependency-bump PRs auto-merge while the only in-repo PR-triggered check is commitlint (testing, medium)
File: .github/workflows/bump-spring.yml:91
Evidence: build/test gating for auto-merged bump PRs depends entirely on out-of-repo Jenkins branch protection.
COR-02 — Jenkins failure notification gated on BRANCH_NAME == 'main', never true on the active jakarta branch (correctness, medium)
File: Jenkinsfile:157
Failure scenario: build failures on the active line never notify anyone.
Plan
SHA-pin every third-party action in the workflows (full commit SHA with a version comment), including madhead/semver-utils (DEP-02).
Add an in-repo PR-triggered build gate: a GitHub Actions workflow running mvn verify on pull requests, so auto-merge has an in-repo status to require (TEST-01). Note for the maintainer: mark the new check required in branch protection (settings change is outside this PR's scope).
Fix the Jenkinsfile notification guard to the active primary branch (jakarta, or parameterize on the repository default branch) so failures alert again (COR-02).
Acceptance criteria
No third-party action remains on a mutable tag.
A bump PR gets an in-repo build/test status before merge.
A failing build on jakarta produces the notification.
Regression: workflows pass on a test PR; make test green.
Activity
shihyuho commentedon Jul 20, 2026
範圍決定:僅處理 COR-02
本工作包經評估後縮小範圍,三項發現的處置如下:
原 PR #206 已關閉,實作細節與驗證記錄保留在該 PR 供日後參考(若之後改變心意,SHA 對照表可直接取用)。
殘留風險(明知並接受):
bump-spring.yml持有 repo 寫入權、會自動 merge 自己開的 PR,其把關仍完全依賴 repo 外的 Jenkins 與 branch protection 設定。另記一項本包過程中發現、原審查未涵蓋的問題:
WyriHaximus/github-action-next-semvers@v1是停滯的 major alias,指向 2020 年的 commit,落後v1.2.1約 63 個 commit。與 SHA 釘選的取捨無關,值得單獨評估。待 #212 合併後即可關閉本議題。