release/signed-tags
Release tags are signed
| Severity | warning |
| Tiers | 1 |
| Stacks | any |
| Scope | root |
| Kind | expr |
| Source | library v0.5.0 |
| Selected by | fleetlint-recommended@v0.5.0 |
Requirement
The newest params.recent version tags (semantic versions, with the component prefixes release/semver-tags accepts) are annotated tags with a PGP, SSH or X.509 signature (git tag -s). Tags created through a forge’s release page are lightweight and fail; create the tag locally and push it, then publish the release from it.
Why
A signed tag ties the released commit to a maintainer’s key; the release pipeline then builds from something that can be verified, not just from a name.
Applies when
repo.has_git && tags().exists(t, t.matches("^(([A-Za-z0-9_.-]+/)*v?|(@[A-Za-z0-9_.-]+/)?[A-Za-z0-9_.-]+@v?|[A-Za-z0-9_.]+(-[A-Za-z0-9_.]+)*-v?)[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z.-]+)?(\\+[0-9A-Za-z.-]+)?$"))Check
For each item in:
tags().filter(t, t.matches("^(([A-Za-z0-9_.-]+/)*v?|(@[A-Za-z0-9_.-]+/)?[A-Za-z0-9_.-]+@v?|[A-Za-z0-9_.]+(-[A-Za-z0-9_.]+)*-v?)[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z.-]+)?(\\+[0-9A-Za-z.-]+)?$")).slice(0,
tags().filter(t, t.matches("^(([A-Za-z0-9_.-]+/)*v?|(@[A-Za-z0-9_.-]+/)?[A-Za-z0-9_.-]+@v?|[A-Za-z0-9_.]+(-[A-Za-z0-9_.]+)*-v?)[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z.-]+)?(\\+[0-9A-Za-z.-]+)?$")).size() < int(params.recent)
? tags().filter(t, t.matches("^(([A-Za-z0-9_.-]+/)*v?|(@[A-Za-z0-9_.-]+/)?[A-Za-z0-9_.-]+@v?|[A-Za-z0-9_.]+(-[A-Za-z0-9_.]+)*-v?)[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z.-]+)?(\\+[0-9A-Za-z.-]+)?$")).size() : int(params.recent))tag_signed(item)Parameters
recent:3
Fix
Set git config tag.gpgsign true (and gpg.format ssh with your SSH key) so every tag is signed; recreate unsigned release tags only if nothing depends on them.
Agent instruction: Tell the user which tags are unsigned and how to configure tag.gpgsign; do not delete or move tags.
Sources
- https://git-scm.com/docs/git-tag (spec)
- https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-tags (guidance)
- https://fleetlint.org/baseline/#releases
Generated by fleetlint docs from catalog v0.5.0.