Skip to content

modern gnupg compatibility #31836

Open
Open

Description

@lobeck

What happened?

Using commands like helm plugin install on a modern system with a modern GPG cause the command to error out:

helm plugin install https://github.com/...
Verifying plugin signature...
Error: plugin verification failed: open /Users/user/.gnupg/pubring.gpg: no such file or directory

This is caused by GPG moving to the new file formats used since 2.1 (> 10 years ago). See also: https://www.gnupg.org/documentation/manuals/gnupg/GPG-Configuration.html

There are several workarounds like the file conversion, but the proper fix would be for helm to support the new format or even both for better compatibility.

What did you expect to happen?

it working.

How can we reproduce it (as minimally and precisely as possible)?

brew install helm gnupg
helm plugin install ...

Helm version

Details
$ helm version
version.BuildInfo{Version:"v4.1.0", GitCommit:"4553a0a96e5205595079b6757236cc6f969ed1b9", GitTreeState:"clean", GoVersion:"go1.25.6", KubeClientVersion:"v1.35"}

Kubernetes version

Details
$ kubectl version
not relevant

Activity

  1. lucasfcnunes commented on Apr 22, 2026

    @lucasfcnunes

    The funny thing is that Helm 4 is recent. This issue here should not exist...

  2. TerryHowe commented on Apr 23, 2026

    @TerryHowe
    Contributor

    I'd welcome a PR for this, but the risk is breaking changes. Even if the behavior is incorrect, people might be relying on it.

  3. ruslan-shaydullin commented on Jul 8, 2026

    @ruslan-shaydullin
    Contributor

    I took a stab at this: #32281.

    The breaking-changes risk raised above was the main design constraint, so the change is strictly additive. The legacy pubring.gpg code path is untouched, and the new keybox/armored handling only activates for keyrings that fail to load today — anything that loads fine now goes through the exact same code. When both files exist, pubring.gpg keeps precedence, so a setup that works today keeps behaving the same way.

    The keybox reader is small and self-contained (no new dependencies, public keys only). It follows the blob layout from GnuPG's own keybox-blob.c and skips ephemeral blobs the same way gpg does, so helm won't trust a key that gpg --list-keys wouldn't show.

    Scope-wise I stuck to the verification side. Reading secret keys from private-keys-v1.d/ for --sign is a much bigger change (gpg-agent territory), so I left that as a possible follow-up. Happy to adjust the scope or approach if the direction looks wrong.

  4. ayuris-liveramp commented on Jul 23, 2026

    @ayuris-liveramp

    @ruslan-shaydullin I wanted to point out that newer versions of gpg use an sqlite database for its public keybox. Which may warrant a separate issue or PR as the one you've already submitted is tagged "XL".

  5. ruslan-shaydullin commented on Jul 28, 2026

    @ruslan-shaydullin
    Contributor

    Good point. keyboxd is a separate backend from the file-backed .kbx format this PR reads. I've narrowed #32281 to file-backed keyrings and changed it from Closes to Related to #31836, so the broader keyboxd case stays open. I don't think this PR should parse pubring.db directly; that needs a separate design.

  6. ruslan-shaydullin commented on Sep 17, 2026

    @ruslan-shaydullin
    Contributor

    Following up on the keyboxd scope we kept out of #32281: I reproduced it on current main (31050af0) with GnuPG 2.5.19, a disposable keyboxd-only home and synthetic keys. GnuPG verifies the signature, while Helm cannot find a file keyring. The same signed chart passes with legacy .gpg, file-backed .kbx, and an explicit public export. Plugin tarball verification shows the same boundary.

    A small local experiment uses gpg --no-options --batch --no-tty --homedir DIR --export, parses the public packets in memory, and calls Helm's existing verifier. It passes the same artifact, rejects a missing signer/tampering, and fails on empty/failed export, unavailable home/executable, timeout or cancellation without falling back to another key source.

    Would an explicitly selected GnuPG public-key source be welcome, and should this be a focused HIP or a smaller additive PR? I would keep existing --keyring/default file selection unchanged, make GnuPG optional, and reject combining an explicit file keyring with the new source. My proposed first contract requires an explicit home, retains common.conf keyboxd selection, and ignores gpg.conf output/keyring customizations.

    The main integration choice is a temporary export file using existing options versus an in-memory snapshot exposed additively to chart/plugin callers and SDK users. I prefer discussing the latter, with acquisition deferred until verification is needed so existing skip paths remain intact. This scope excludes private-key signing, SQLite parsing and algorithm expansion. I have the reproduction logs, limited prototype and caller/test matrix ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions