- Issues
- ISSUE-510
CI/CD provider
Tags are not protected
Control:CTRL-510Tag must be protected
📋 What is this?
The project uses tags, but anyone allowed to push a tag can move, delete or create one. By default every tag must be covered by a protected tag *; when the control lists namePatterns, each listed pattern must be covered instead.
⚠️ Impact
Tags are what release pipelines run on and what consumers pin to. A moved tag ships unreviewed code under a version name consumers already trust: the tj-actions/changed-files compromise re-pointed existing version tags to a malicious commit.
🔧 How to fix
Protect all tags with a protected tag * in the project settings, and leave tag creation to Maintainers or a narrower set.
- 1
Open Settings > Repository > Protected tags and click Add new.
- 2
In Tag, enter
*to cover every tag.If the control lists
namePatterns, protect each listed pattern instead, for examplev*. A protected tag already blocks updates and deletions by itself. - 3
Set Allowed to create to Maintainers, or a narrower set.
No one, or named users, groups or deploy keys also count as restricted. Developers + Maintainers does not: any developer could then forge a release tag.
- 4
Click Protect and re-run Plumber to confirm the finding clears.
# .gitlab-ci.yml: ❌ the tag pipeline publishes, but no protected tag covers all tagspublish: rules: - if: $CI_COMMIT_TAG script: - ./publish.sh💡 Tips
- The finding is critical when a job runs on tag pipelines (
only: [tags], or arules:entry on$CI_COMMIT_TAG), high otherwise. - By default the control raises one finding, for the tag pattern
*. A protected tag on a narrower pattern such asv*does not cover all tags. - To check specific patterns instead, set
namePatterns, for example[v*]. Each pattern then gets its own finding. - Nothing is checked until the project has a tag or a job runs on tag pipelines, so a project that never tags stays quiet.
- Plumber needs a token with
read_apito list protected tags and tags. Without it the control reports "not evaluated" and raises no finding. - Protected tags are available on every GitLab plan. Restricting creation to named users or groups needs GitLab Premium.
⚙️ Configure this control
With the CLI alone: set it in your configuration file. Every field and default is in the controls configuration reference, CTRL-510.
Tags are not protected
Control:CTRL-510Tag must be protected
📋 What is this?
The repository uses tags, but anyone with push access can move, delete or create one. By default every tag must be covered by active tag rulesets that target all tags; when the control lists namePatterns, each listed pattern must be covered instead.
⚠️ Impact
Tags are what release workflows run on and what consumers pin to. A moved tag ships unreviewed code under a version name consumers already trust: the tj-actions/changed-files compromise re-pointed existing version tags to a malicious commit.
🔧 How to fix
In the repository settings, cover all tags with an active tag ruleset that restricts creations, updates and deletions.
- 1
Open Settings > Rules > Rulesets and click New ruleset > New tag ruleset.
- 2
Name the ruleset and set Enforcement status to Active.
A ruleset in Evaluate mode only reports and blocks nothing, so Plumber does not count it.
- 3
Under Target tags, click Add target > Include all tags.
Leave out exclude patterns: a ruleset that excludes some tags does not cover all of them. If the control lists
namePatterns, target each listed pattern instead, for examplev*. - 4
Enable Restrict creations, Restrict updates and Restrict deletions.
- 5
Add your release automation to the Bypass list.
For example a GitHub App or the repository admin role, so releases can still create tags.
- 6
Click Create and re-run Plumber to confirm the finding clears.
# .github/workflows/release.yml: ❌ runs on v* tags, but no tag ruleset covers all tagson: push: tags: ["v*"]jobs: publish: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v6 - run: ./publish.sh💡 Tips
- The finding is critical when a workflow runs on a tag push (
on.push.tags,on.push.tags-ignore, oron: release), high otherwise. - By default the control raises one finding, for the tag pattern
~ALL(GitHub's name for all tags). A ruleset onv*or*does not cover all tags. - To check specific patterns instead, set
namePatterns, for example[v*]. Each pattern then gets its own finding. - Workflow
on.push.tagspatterns never add a pattern to check: they only make the finding critical. - Nothing is checked until the repository has a tag or a workflow runs on tags, so a repository that never tags stays quiet.
- The three rules may come from different rulesets, the repository's own or inherited from the organization.
- Listing rulesets and tags needs only
Metadata: Read, which everyGITHUB_TOKENcarries. Without access, or where rulesets are unavailable, the control reports "not evaluated" and raises no finding.
⚙️ Configure this control
With the CLI alone: set it in your configuration file. Every field and default is in the controls configuration reference, CTRL-510.