Repository navigation
feat(control): tag patterns must be protected (tagMustBeProtected, ISSUE-510) - #581
Merged
Merged
Conversation
Exypte
requested review from
Totara-thib,
coconux3 and
thomasboni
as code owners
October 30, 2026 09:34
Merged
3 tasks done
thomasboni
pushed a commit
to getplumber/getplumber.io
that referenced
this pull request
Nov 9, 2026
New cross-provider control from getplumber/plumber#581: issue page with GitLab and GitHub fixes, control id, and its controls configuration section.
Contributor
|
@Exypte there are several comments to resolve before review |
Contributor
|
@Exypte lgtm but squash your commit in one signed commit |
…SUE-510) Add a cross-provider control (CTRL-510 / ISSUE-510) that flags release tag patterns anyone with push access can move, delete or create. It checks the patterns in namePatterns (default v*) plus the tag patterns GitHub workflows trigger on (on.push.tags). A pattern is checked only when an existing tag matches it or a workflow triggers on it. On GitHub, protection comes from active tag rulesets with the update, deletion and creation rules, judged across all rulesets. On GitLab it comes from a protected tag covering the pattern; creation counts as restricted unless a create level lets in Developers or below. requireCreationRestricted: false drops the creation requirement. A finding is critical when a workflow releases from tags, high otherwise. GitHub needs Metadata: read, GitLab read_api. Without access the control reports "not evaluated". GitLab platform mode reports lane_not_served until the snapshot serves tags. Fixes #398 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Exypte
force-pushed
the
feature/398-tag-protection-check
branch
from
November 24, 2026 09:36
5a3ca28 to
63f5036
Compare
Contributor
Author
@thomasboni Done. The branch is now one signed commit, 63f5036 (Verified). The diff is the same as before. |
thomasboni
approved these changes
Nov 26, 2026
plumber-release Bot
pushed a commit
that referenced
this pull request
Nov 30, 2026
## [0.7.24](v0.7.23...v0.7.24) (2026-11-30) ### ✨ Features * **control:** tag patterns must be protected (tagMustBeProtected, ISSUE-510) ([#581](#581)) ([e2b13ab](e2b13ab)), closes [#398](#398) * **github:** send fewer GitHub requests and read GitHub through GraphQL ([#649](#649)) ([53c5406](53c5406)), closes [#618](#618) [#637](#637) [#618](#618) ### 🐛 Bug Fixes * **github:** match trusted owner lists without regard to case ([#629](#629)) ([4160592](4160592)), closes [#623](#623) ### 🔧 Chores * code owners only on the action lockfile, owned by the cli team ([#656](#656)) ([80c4d31](80c4d31)) ### 📚 Documentation * explain the release process ([#601](#601)) ([67557b9](67557b9)) * **readme:** add InvokeAI and Clash Nyanpasu to the adopters row ([#613](#613)) ([798fd9f](798fd9f)), closes [invoke-ai/InvokeAI#9944](invoke-ai/InvokeAI#9944) [#10109](https://github.com/getplumber/plumber/issues/10109) [libnyanpasu/clash-nyanpasu#6286](libnyanpasu/clash-nyanpasu#6286) [#6323](https://github.com/getplumber/plumber/issues/6323) [#6324](https://github.com/getplumber/plumber/issues/6324) ### 👷 CI/CD * keep the corpus under -race, lint through golangci-lint-action, harden the scan gate ([f7960e6](f7960e6)) * run the corpus without the race detector, cache golangci-lint, scan the image only when it changed ([d69f9ac](d69f9ac)) * trust golangci-lint-action in the Plumber action allowlist ([3d71094](3d71094))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
feat
What this PR does / why we need it:
Plumber checks branch protection but not tags. Anyone with push access can create, move or delete a release tag, and tags drive release workflows and action pins (the tj-actions attack moved existing tags). This adds a cross-provider control,
tagMustBeProtected(CTRL-510 / ISSUE-510, gate role).namePatterns(defaultv*), plus the patterns GitHub workflows trigger on (on.push.tags, read with GitHub's filter syntax, where+and?are quantifiers). A pattern is only checked while it is in use: an existing tag matches it, or a workflow triggers on it. So a repository that never tags stays quiet.requireCreationRestricted: falseto drop the creation requirement).update,deletionandcreationrules. Each protection is judged across all rulesets, because GitHub layers them.on: release, GitLabonly: tagsor a positive$CI_COMMIT_TAGrule), and high otherwise.permissions: {}grants (checked in a real workflow run). Rulesets need a public repo or GitHub Pro+, and GHES 3.11+.read_api.plumber init, both default configs, the legacy JSON block, the catalog, the issue docs, and theaction.yml/ README token text are updated.Which issue(s) this PR is related to:
Fixes #398
Special notes for your reviewer:
lane_not_served(throughcontrolsWithNoPlatformLane), which keeps the no-extended-rights contract. A platform follow-up issue will serve the lane.tagsTruncated, which can hide a finding but never invent one.[…]patterns ("Invalid target patterns"), while workflow filters accept them.make lintreports 7 govetreflect.Ptrwarnings in files this PR does not touch (configuration/schema.go,control/catalog.go).Does this PR introduce a user-facing change?
How was this tested?
Unit tests:
make build,go test ./...and gofmt are clean; lint as noted above.plumber analyzewith the local binary:GitHub, Exypte/tag-protection-lab (public lab repo):
v1.0.0, no rulesetrelease-*!entries ignoredon: releasev*criticalrequireCreationRestricted: false~ALLcreation rulesetv[0-9]+.[0-9]+.[0-9]+,v*rulesetv*ruleset disabledGitHub, Exypte/garbage (private, Free plan): not evaluated (rulesets API 403).
GitLab, thibaultcondemine/garbage:
v1.0.0$CI_COMMIT_TAGrelease job$CI_COMMIT_TAG_MESSAGEonlyv*protected for Maintainersv*protected for Developersv2/hotfixA real GitHub Actions run confirmed that
GITHUB_TOKENlists tag rulesets and tags both withcontents: readand withpermissions: {}.AI usage disclosure:
YES. Implemented with Claude Code (design, code, tests and e2e runs), reviewed by the author, who is responsible for the submitted changes (CONTRIBUTING.md, AI_POLICY.md).
🤖 Generated with Claude Code