Repository navigation
Closed
Labels
epic:ci-hardeningHardened images, scans, compliance evidence, and the gaps a regulated CI team needs closed
Description
release.signing should offer signing modes besides keyless public Sigstore, and signing should work on every forge chant release workflow renders.
Epic: #5452. Related: #5447 (FIPS research).
What exists, checked at chant 3bf0df0
- Under
supply-chain, theoci,forgeandpypitargets are signed keylessly with cosign plus SLSA provenance, using the pinned cosign inTOOL_PINS. npm uses its own--provenance. signingIdentity(lifecycle/publish-signing.ts) knows only two environments. One is GitHub Actions withid-token: write; the other is GitLab CI with aSIGSTORE_ID_TOKENwhose audience issigstore. Anywhere else it refuses.- The certificate authority and transparency log are the public Sigstore instance. There is no option for a key, a KMS key, or a private Fulcio and Rekor.
- Forgejo is a forge the release workflow renders for, but it has no identity here. A runner that sets
GITHUB_ACTIONSwould be taken for GitHub, with GitHub's issuer.
A regulated team often cannot write its release identities to the public log, and may need a key held in its own KMS or HSM. Some need FIPS-validated crypto (#5447).
What it should be
release.signing takes one of these:
keyless, the default, as today. Optionally it names a private Fulcio and Rekor URL and the trust root to verify against.kms: "<uri>": cosign's KMS references (awskms://,gcpkms://,azurekms://,hashivault://), with the credentials named by environment variable and passed only to the signing step.key: a key file or a secret in an environment variable, for workstations and air-gapped runners.
On top of that:
chant release verifychecks against whichever mode signed, with the trust root it names.- Forgejo gets an identity when its runner provides an OIDC token. Otherwise the pipeline needs
kmsorkey, and the renderer says so instead of rendering a step that fails. - The chant-native git forge (
chant ci serve --forge git, land branches, the ref gate) has no CI OIDC token either.chant release workflowrenders for github, gitlab and forgejo only (RELEASE_WORKFLOW_FORGES), so a release on the git forge runschant release publishfrom a host. There,kmsorkeyis the only way to sign, andchant release doctorsays so whensupply-chainis on and no mode can sign. - The
GITHUB_ACTIONScheck confirms the issuer, so a Forgejo runner is not taken for GitHub. - Provenance without a CI OIDC token. Today
detectProvenance(lifecycle/release-publish.ts) returnsoidc: falseoutside GitHub Actions and GitLab CI, and undersupply-chainthe rendered--require-provenancerefuses the whole publish (publish-provenance-missing). Sokmsandkeyalone do not unlock Forgejo, aci servehost or the git forge. Inkmsandkeymodes,--require-provenanceis met by the release's signed SLSA statement, and the refusal names what is missing in each mode. npm, which records provenance only from a CI OIDC token, publishes without npm provenance and the release's own statement is the provenance, as the publish already says for a workstation (publish-attachments.ts). - Builder identity per environment.
slsaProvenanceStatement(lifecycle/publish-signing.ts) writes GitHub's build type and builder id for any environment that is not GitLab, so a Forgejo runner or a host would get a statement naming GitHub with an empty repository. Each environment gets its own build type and builder id: GitHub, GitLab, Forgejo (its server and workflow), and aci servehost (the runner key's fingerprint).
Done when
- A release signs and verifies in each mode against fakes: a local key, a KMS stand-in (a cosign
hashivault://or local KMS plugin), and a local Rekor and Fulcio for the private-instance mode. Runs on real forges, a real KMS or public Sigstore need a person's grant. - With
supply-chainon andkmsorkey, a publish with no CI OIDC token is not refused, and its SLSA statement names the environment's builder, not GitHub. - The same holds for a train's release workflow (
release-train-workflow.ts,chant workspace train publish), which behold releases with. Today it receives onlyreleaseSetupStepsand theidTokensslot (release-workflow.ts, the train context), so job steps added here must reach it too. - The rendered pipeline passes the KMS credentials only to the signing step.
- The release workflow page and the security features reference list the modes.
Pull requests, in order
- 1. Builder identity per environment in the SLSA statement, and the
GITHUB_ACTIONSissuer check. - 2.
keymode, with--require-provenancemet by the signed statement. - 3.
kmsmode, with credentials passed only to the signing step. - 4. Private Fulcio and Rekor for
keyless, with the trust root inrelease verify. - 5. Forgejo: an identity when its runner has an OIDC token, else the renderer requires
kmsorkey, and the train.
Metadata
Metadata
Assignees
Labels
epic:ci-hardeningHardened images, scans, compliance evidence, and the gaps a regulated CI team needs closed
Activity
lex00 commentedon Nov 22, 2026
Decision: the shape of
release.signingrelease.signingstaystrue,falseor an object. The object picks its mode by which key it carries, so a config written for the keyless mode today keeps working unchanged:The config check refuses
kmswithkey,fulcio,identityorissuerbesidekmsorkey,envwithoutkms,passwordEnvwithoutkey,keywithoutpublicKey,rekor: falsein the keyless mode, andfulcioor arekorURL withouttrustRoot. Defaultenvper scheme:awskmsAWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_REGION;azurekmsAZURE_TENANT_ID, AZURE_CLIENT_ID and AZURE_CLIENT_SECRET;hashivaultVAULT_ADDR and VAULT_TOKEN;gcpkmsnone, so it names its own.What the publish does in each mode
fulcioandrekorit runs cosign against them with the trust root, andrelease verify --sigstorechecks against that trust root.kmsandkeysign the same bundles (cosign signature and SLSA provenance on an image, a bundle beside each forge asset, PEP 740 on PyPI) with--key. The record names the key (the public key file, else the KMS reference) instead of an issuer and identity, andrelease verify --sigstorechecks with--key, and with--insecure-ignore-tlogonly whenrekor: false.--require-provenanceis met by an OIDC token, as today, or by a release whose SLSA statement this run signs: keyless with an identity, orkmsorkeywith the key and its credentials present. The refusal names what is missing in the mode configured: the OIDC token, a KMS credential variable, the key file or variable, or its password. npm publishes without--provenancewhen the run has no CI OIDC token, and the release's own statement is its provenance, as on a workstation.Builder identity
slsaProvenanceStatementnames the environment it ran in, each with its own build type and builder id: GitHub Actions, GitLab CI, Forgejo Actions (the server and the workflow ref), achant ci servehost (the runner key's fingerprint, which the serve passes inCHANT_RELEASE_RUNNER_KEY_FINGERPRINT), and a workstation. A job is GitHub only when nothing marks it as Forgejo or Gitea (FORGEJO_ACTIONS,GITEA_ACTIONS, or aGITHUB_API_URLending in/api/v1, which runners before v7 leave as the only sign). The issuer then follows the server:https://token.actions.githubusercontent.comon github.com,https://token.actions.<host>on a ghe.com host, and<server>/_services/tokenon GitHub Enterprise Server.The rendered pipeline
Signing runs inside
chant release publish(andchant workspace train publish), so that step is the signing step. On GitHub and Forgejo, the KMS credentials,env://key and password reach that step's ownenv:from the repository's secrets, and no other step or job gets them. The doctor in a dispatched cut does not hold them, so it reports them as unknown there, the way it already treats the publish job's OIDC token. GitLab has no per-line variables, and a project's CI/CD variables reach every job, so the GitLab file names none of them and the workflow page says to keep them protected and scoped to the release's environment.Forgejo: keyless renders only with a
fulciothat trusts the instance's issuer (<server>/api/actions), since public Fulcio issues no certificates for a Forgejo token. The publish job then getsenable-openid-connect: true. Without afulcio, a Forgejo workflow that signs keylessly is refused at render, with the fix to setkmsorkey. The train workflow gets the same publish-step credentials and the same Forgejo rule through the context the single-member file uses.chant release doctoron a host with no CI OIDC token (the chant git forge, aci servehost) fails the signing check in the keyless mode with the fix to setkmsorkey.Corrections to the issue
kmsorkeyunless one is run.GITHUB_*variables, soFORGEJO_ACTIONSalone does not tell them from GitHub;GITHUB_API_URLdoes.Tests
They run against fakes only: a fake cosign that records its arguments, a local key file, a KMS stand-in (a
hashivault://reference with stand-in credentials read by the fake cosign), and fake Fulcio and Rekor URLs with a trust root file. A local Rekor and Fulcio, and a running Vault, are left to the person-granted runs in stage 6.