release/signing/java
Release artifacts are signed
Implements release/signing for java.
| Severity | error |
| Tiers | 1 |
| Stacks | java |
| Scope | root |
| Kind | outcome |
| Source | library v0.2.0 |
| Selected by | fleetlint-recommended@v0.2.0 |
Requirement
Artifacts for Maven Central are signed with PGP (Maven’s gpg or sign plugin, Gradle’s signing plugin with a publishing release), or JARs are signed with jarsigner in the release workflow; or a stack-neutral signature: cosign, GoReleaser, gpg.
Why
Checksums prove integrity; only a signature proves who built it.
Capability applies when
release.exists && tagged_workflows().size() > 0Fix
Maven: add maven-gpg-plugin (or sign-maven-plugin) to the release profile; Gradle: apply the signing plugin to the Maven publication. The key comes from CI secrets.
Agent instruction: Use the stack’s signing format when the stack has one. Otherwise add sigstore/cosign-installer and a signing step after the artifacts are built. Files: cosign sign-blob --yes --bundle checksums.txt.sigstore.json checksums.txt and upload the bundle. Container image: cosign sign --yes <image>@<digest> using the digest output of the build step, with id-token: write on the job.
See: https://fleetlint.org/baseline/#releases, https://fleetlint.org/stacks/#java, https://central.sonatype.org/publish/requirements/gpg/
Generated by fleetlint docs from catalog v0.2.0.