1
0
mirror of synced 2026-06-20 20:10:49 +00:00
Commit Graph

6 Commits

Author SHA1 Message Date
Hidde Beydals 2ca3468423 Return error for public-only GPG signing keyring
`SelectOpenPGPSigningEntity` selects `keyRing[0]` when no key id is
supplied and then calls `entity.PrivateKey.Decrypt` directly. For a
keyring that contains only public keys — e.g. an armor-exported
public key file — `PrivateKey` is `nil` and the call panics with a
nil pointer dereference rather than surfacing an actionable error.
The keyed branch already guards against this; the default branch
did not.

Guard the default branch with the same nil check and return an
error pointing at `gpg --export-secret-keys` or `--gpg-key-id` so
the user knows how to recover. Cover the public-only-keyring case
in `TestSelectOpenPGPSigningEntity` so a future regression cannot
re-introduce the panic.

Assisted-by: claude/opus-4.7
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2026-06-19 15:03:54 +02:00
Hidde Beydals 4810828b53 Cover pkg/bootstrap SSH signing roundtrip
Adds two layers of coverage for the SSH commit-signing path that the
previous commit wires through PlainGitBootstrapper.

TestPlainGitBootstrapper_resolveSigner exercises every branch of the
new dispatcher: nil configuration, GPG-only, SSH-only, encrypted-SSH-
without-passphrase failure, and the documented GPG-wins-when-both-
set precedence.

TestPlainGitBootstrapper_sshSignerProducesVerifiableCommit drives an
end-to-end roundtrip: resolveSigner returns an SSH signer, the signer
plugs into repository.WithSigner, gogit.Client.Commit produces a
commit object, and signature.VerifySSHSignature cryptographically
verifies the gpgsig header against the matching authorized_key.
Catches regressions in the SSH-signing wiring that the dispatcher
unit tests would miss.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2026-06-18 14:40:42 +02:00
fluxcdbot b4bc0d4932 Update toolkit components
- source-controller to v1.7.0
  https://github.com/fluxcd/source-controller/blob/v1.7.0/CHANGELOG.md

Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-09-15 17:33:20 +01:00
Stefan Prodan d340f80d75 Update dependencies to Kubernetes v1.34.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-08-30 15:11:43 +03:00
Stefan Prodan 79fed691ca Update CLI to OCIRepository v1 (GA)
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2025-05-28 15:12:17 +03:00
Somtochi Onyekwere 2289c6cc60 bootstrap: provide better error message on timeout
Check GitRepository and return Ready condition message as part of error
on timeout.

Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2023-12-08 19:00:01 +05:30