release/tag-triggered
Releases run from a tag-triggered workflow
| Severity | error |
| Tiers | 1 |
| Stacks | any |
| Scope | root |
| Kind | expr |
| Source | library v0.7.0 |
| Selected by | fleetlint-recommended@v0.7.0 |
Requirement
Releases are produced by CI from a version tag, never from a laptop: an Actions workflow on push: tags: or a GitLab job whose rules: match $CI_COMMIT_TAG (or only: tags).
Why
A release built locally has no provenance and cannot be reproduced.
Applies when
release.mechanisms.exists(m, m != "git-cliff")Check
tagged_workflows().size() > 0Fix
Add release.yml triggered on push.tags [‘v*’] that runs the release tool; fleetlint fix --apply writes the stack’s template (GoReleaser for Go and Rust, make dist plus syft and cosign otherwise) as a starting point.
Agent instruction: Add .github/workflows/release.yml (or .gitea/workflows/; on GitLab a release job with rules: [{if: $CI_COMMIT_TAG}]) with on: push: tags: ['v*'] running the existing release tool; keep permissions minimal. Adapt the template to the release tool already in the repository instead of replacing it.
fleetlint fix can apply this rule’s fix automatically (1 action(s)).
A finding of this rule points at .github/workflows/release.yml.
Sources
- https://slsa.dev/spec/v1.0/requirements (standard, Follow a consistent build process)
- https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions (spec, on.push.tags)
- https://docs.gitlab.com/ci/yaml/ (spec, rules:if)
- https://fleetlint.org/baseline/#releases
Generated by fleetlint docs from catalog v0.7.0.