Release · v0.12.1

Audited, hardened, signed: what changed in keyfold after an independent security audit

· The keyfold maintainers

keyfold v0.12.1: Audited. Hardened. Signed. Cosign-signed Helm chart, SLSA provenance for every binary, SPDX SBOM, Apache-2.0.

keyfold keeps Kubernetes secrets in Git, encrypted to every cluster that needs them and to an offline recovery key. A controller in each cluster turns them back into Secrets. Because the whole point is that ciphertext can sit in a repository many people can read, the code that encrypts, decrypts, and keeps plaintext out of Git has to hold up to scrutiny from people who are not us.

So we asked for some. An independent reviewer audited keyfold v0.11.0 and reported their findings to us privately. Over three releases, v0.11.1, v0.12.0 and v0.12.1, every finding is now fixed. This post covers what changed, what it means for you, and what comes next.

What was fixed

The detailed report stays private, and we won't publish exploit steps. The fixes themselves are all public in the CHANGELOG. By area:

AreaWhat changed
Keyrings & key filesRemote keyrings must use HTTPS and can't be redirected to another host. Key paths that pass through a symlink are refused. Private-key material is rejected wherever only a public key belongs.
gpg handlingOutput size and decrypt time are capped. Revoked, expired and invalid keys are never offered as recipients. Fingerprints are compared case-insensitively everywhere.
Git hookspre-push no longer trusts the remote's claimed commit. pre-commit only skips content that actually decrypts. A commit can't exempt itself by deleting or narrowing the config.
ControllerIt only caches Secrets it manages. Updating a target Secret is a single write, so it's never left half-updated. Status messages never contain field values. Renaming a target removes the old Secret.
Admission & CRDLimits on keys, sizes and recipients are the same at seal time, in the webhook and in the controller. service-account-token targets are refused.
Sealing consoleIt's protected against DNS rebinding, sends a strict Content-Security-Policy, has full server timeouts, and masks secret fields on screen.
Kubernetes manifestsEncrypted values are bound to their namespace. Malformed YAML (several documents in one file, duplicate keys, aliases) is refused.

After v0.12.0 we went back and reviewed our own fixes. That turned up two more issues, both fixed in v0.12.1 with regression tests:

  • git keyfold verify trusted a plaintext allowlist that the commit being checked could widen.
  • A staged file whose name contained a glob character could pick up another file's mode.

In both cases pre-push still blocked the plaintext.

Releases you can verify

Every release now ships with:

  • SLSA build provenance for each binary, signed with GitHub's OIDC identity.
  • Cosign-signed controller images and, new in v0.12.0, a cosign-signed OCI Helm chart.
  • An SPDX SBOM attached to the GitHub release.

Check them before you install:

# a binary
gh attestation verify ./keyfold-linux-amd64 --repo OpScaleHub/keyfold

# the Helm chart
cosign verify \
  --certificate-identity-regexp '^https://github.com/OpScaleHub/keyfold/' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  ghcr.io/opscalehub/charts/keyfold:0.12.1

keyfold is now licensed under Apache-2.0, the same licence as Kubernetes and most CNCF projects, with an explicit patent grant.

How keyfold works: I Seal, encrypt to named recipients including an offline recovery key. II Commit, a GitSecret is ciphertext you review and ship with GitOps. III Unseal, the in-cluster controller decrypts it into a Kubernetes Secret.
The flow is unchanged. What changed is how much each step refuses.

Upgrading

v0.12 makes a few checks strict that used to be loose:

  • Manifests used with kubectl keyfold need a metadata.namespace.
  • The sealing console only answers host names you allow.
  • Config patterns that never matched anything are now errors.

The upgrade guide lists each change and what to do about it. Most upgrades are helm upgrade plus kubectl apply for the CRD.

What's next

We're working toward 1.0 and a CNCF Sandbox application. Both call for another full external audit of the code as it will ship, not as it was. The roadmap tracks the path there. To report a vulnerability, follow SECURITY.md. Please don't open a public issue.

Thank you to the reviewer who did the work and disclosed it responsibly.