Skip to content

ci: validate PR milestones using branch status issue - #7527

Merged
vvoland merged 1 commit into
docker:masterfrom
thaJeztah:update_milestone_ci
Nov 17, 2026
Merged

vvoland merged 1 commit into
docker:masterfrom
thaJeztah:update_milestone_ci

Conversation

@thaJeztah

@thaJeztah thaJeztah commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

ci: validate PR milestones using branch status issue - #7527⁠

  • 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

Summary

Release notes (optional)

A picture of a cute animal (not mandatory but encouraged)

- 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>
@thaJeztah thaJeztah added this to the 29.11.0 milestone Nov 17, 2026
@thaJeztah
thaJeztah marked this pull request as ready for review November 17, 2026 11:53
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟢 APPROVE

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟢 APPROVE

Dismissed security findings (review manually)

  • .github/workflows/validate-milestone.yml:81 — baseBranch embedded via addRaw() without HTML escaping (verifier mitigation: Git branch names cannot contain < or >, making XSS via this vector not exploitable in practice)

? context.payload.pull_request.head.sha
: context.payload.pull_request.base.ref;
const lines = (issue.body ?? '').split('\n').map(line => line.trimEnd());
const start = lines.indexOf('```json docker-versions') + 1;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] Opening-fence match requires exact line; leading whitespace causes a false "not found" failure

lines.indexOf('```json docker-versions') performs an exact string comparison. The .trimEnd() applied on the previous line strips only trailing whitespace, not leading spaces. If the opening code-fence in the branch-status issue body has any leading whitespace (e.g., indented inside a list or blockquote), indexOf returns -1, start becomes 0, and the guard on line 42 fires with:

Could not find a 'json docker-versions block' in issue #7526

This is not a silent failure — the error is surfaced — but it can be confusing to debug because the message implies the block is missing, not misindented. Consider using a leading-whitespace-tolerant match:

Suggested change
const start = lines.indexOf('```json docker-versions') + 1;
const lines = (issue.body ?? '').split('\n').map(line => line.trimEnd());
const start = lines.findIndex(l => l.trim() === '```json docker-versions') + 1;
Confidence Score
🟢 strong 100/100

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept it identical to the workflow in moby/moby. We can probably improve, although it's expected for the ticket to have a somewhat strict format.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point — keeping the workflows synchronized makes sense, especially since both issues currently use the strict format without leading whitespace. The suggestion would only add value if the format becomes more flexible in the future (e.g., nesting the block in a list), but that's not the case now.

Feel free to close this or keep it as a reference if the format ever needs to evolve across both repos.

: context.payload.pull_request.base.ref;
const lines = (issue.body ?? '').split('\n').map(line => line.trimEnd());
const start = lines.indexOf('```json docker-versions') + 1;
const end = lines.indexOf('```', start);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] Closing-fence search matches any standalone triple-backtick line within the JSON block

lines.indexOf('```', start) finds the first line (after trimEnd()) that is exactly three backticks, starting from the opening fence. If the JSON content between the fences ever contains a line that is only \``— for example if someone edits the issue body and adds a stray markdown fence — the JSON slice will be truncated at that line, causingJSON.parse` to throw with a confusing "Invalid json docker-versions block" error.

In practice valid JSON cannot naturally contain such a line (all strings must be quoted), so this is a theoretical fragility rather than an immediately exploitable bug. It is worth noting as a future robustness concern, especially since the issue body is a human-editable document.

Confidence Score
🟡 moderate 70/100

@thaJeztah
thaJeztah requested a review from vvoland November 17, 2026 12:08

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟢 APPROVE

Lower-confidence findings (not posted inline)

  • [low] .github/workflows/validate-milestone.yml:17 — github.event.pull_request.state == 'open' condition is always true for pull_request events (not verified; low severity)

@vvoland vvoland left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@vvoland
vvoland merged commit d6f5269 into docker:master Nov 17, 2026
117 of 119 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants