Repository navigation
🔒 security(ci): require release tags to be merged into main - #234
Conversation
Add a Verify Tag Is on Main step that checks the tagged commit is an ancestor of origin/main before building/publishing, so a release can only happen after the corresponding PR has merged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Warning Review limit reachedNext included review available in 43 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
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 |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c2003ba481
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Problem
The release workflow triggers purely on a
v*.*.*tag push, with no check that the tagged commit was ever merged intomainvia a completed pull request. A tag pushed directly on a feature branch can trigger a full release and PowerShell Gallery publish while the corresponding PR is still open.This happened with
v2.2.0/ #233: the tag was pushed to the feature branch and the release/publish completed successfully before the PR was reviewed or merged.Fix
Add a
🔒 Verify Tag Is on Mainstep immediately after checkout that fails the job if the tagged commit is not an ancestor oforigin/main:actions/checkoutnow usesfetch-depth: 0so the full history (includingmain) is available for the ancestry check.Effect
main— i.e., after the corresponding PR has merged.workflow_dispatchmanual runs still work the same way and are also subject to this check if run against arefs/tags/*ref.Testing