Skip to content

Reverify unchanged GitRepository on key rotation - #2166

Merged
matheuscscp merged 1 commit into
mainfrom
fix/gitrepo-verification-key-rotation
Oct 5, 2026
Merged

matheuscscp merged 1 commit into
mainfrom
fix/gitrepo-verification-key-rotation

Conversation

@matheuscscp

@matheuscscp matheuscscp commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

Fixes: #2165

The optimized same-revision checkout skipped signature verification when only the verification Secret or its key material changed, since the change predicate tracked the verification mode but not the trusted keys. This kept a stale SourceVerified=True after a key rotation or revocation.

Record a fingerprint of the verification public keys in status on success, and require a full checkout and re-verification when that fingerprint changes. The fingerprint depends only on key material, not the Secret name or data key names.

@matheuscscp matheuscscp added bug Something isn't working area/git Git related issues and pull requests labels Sep 21, 2026

@stefanprodan stefanprodan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks @matheuscscp

PS. We should apply the same check to OCI Cosign.

@matheuscscp
matheuscscp force-pushed the fix/gitrepo-verification-key-rotation branch from 95cddf6 to 7da58d7 Compare October 5, 2026 10:04
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
@matheuscscp
matheuscscp force-pushed the fix/gitrepo-verification-key-rotation branch from 7da58d7 to 4633663 Compare October 5, 2026 10:18
@matheuscscp
matheuscscp merged commit c855ebf into main Oct 5, 2026
6 checks passed
@matheuscscp
matheuscscp deleted the fix/gitrepo-verification-key-rotation branch October 5, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/git Git related issues and pull requests bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Flux source-controller retains Git verification after trust-key rotation

2 participants