Repository navigation
feat(clustertool): support binary file encryption and decryption - #783
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
🚀 HelmRelease CI ReportOverall Status
🧪 HelmReleases Tested⏭️ HelmReleases SkippedResultℹ️ No HelmReleases required testing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Files selected by
.sops.yamlwith extensions such as.txt,.pem, and.binwere classified as binary but rejected during encryption. Encrypted files with these extensions were also skipped during decryption.Add the SOPS binary store and recognize its encrypted JSON metadata. Matching files with unknown extensions or no extension can now be encrypted and decrypted as a whole, preserving their original bytes. Binary encryption ignores field selectors with a warning, following SOPS behavior.
⚙️ Type of change
🧪 How Has This Been Tested?
Passed on Windows/amd64 with Go 1.27.3:
go test -mod=readonly ./pkg/sops -count=1.Cross-compiled the SOPS test binary for Linux/amd64 with
CGO_ENABLED=0. Linux runtime tests were not run.Added tests for exact byte preservation, PEM text, CRLF, non-UTF-8 bytes, empty files, extensionless files, repeated encryption, ignored field selectors, corrupted ciphertext/MAC, and staged-file detection.
Verified standalone encryption leaves the Git index unchanged.
Applied gofmt while preserving existing line endings;
git diff --checkpassed.Run clustertool commands locally
Verified cluster bootstrap on Talos nodes
Checked generated configs are valid
Validated cluster state after changes
📃 Notes:
Only files matching a
path_regexare processed. Existing structured formats retain their current handling. No new dependencies are required.Tests use temporary fixtures and generated age keys; no real cluster or secrets were used.
🤖 This PR is AI generated.
✔️ Checklist:
feat(clustertool):fix(clustertool):chore(clustertool):