Repository navigation
[29.x backport] ci: validate PR milestones using branch status issue - #7535
Conversation
- Read the next release version from a persistent GitHub issue - Replace VERSION file dependency with branch-specific version tracking - Keep milestone validation aligned with moby Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 28fd12d) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
docker-agent
left a comment
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
docker-agent
left a comment
There was a problem hiding this comment.
Assessment: 🟡 NEEDS ATTENTION
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
| issues: read |
There was a problem hiding this comment.
[medium/security] Milestone validation data sourced from mutable GitHub issue instead of immutable git content
This PR replaces reading the VERSION file from git (via repos.getContent, pinned to a specific commit SHA) with reading the body of issue #7526. That issue is mutable: any maintainer with issue-edit rights can alter the expected version mapping without leaving a commit-level audit trail.
Impact: The old approach tied the expected milestone to an immutable point in git history. The new approach means that whoever can edit issue #7526 controls what the CI considers the "correct" milestone for every branch. This could cause PRs to pass or fail milestone validation unexpectedly and silently.
Mitigating factors:
- Only maintainers with write access to
docker/clican edit issues, so the attack surface is limited to trusted collaborators. - The check is advisory (milestone labeling), not a security gate for code deployments or releases.
- The
github.repository == 'docker/cli'guard prevents the workflow from running on forks.
Recommendation: Document this trust assumption explicitly in a comment near BRANCH_STATUS_ISSUE. For example:
# TRUST: Issue body is controlled by maintainers; altering it
# changes what CI considers the expected milestone for each branch.
This makes the design decision clear to future readers and reduces surprise if the issue is ever edited unintentionally.
| Confidence | Score |
|---|---|
| 🟡 moderate | 65/100 |
Release notes (optional)
A picture of a cute animal (not mandatory but encouraged)