Skip to content

fix: check every document for encryption metadata - #2338

Open
anqorithm wants to merge 1 commit into
getsops:mainfrom
anqorithm:abdallah/check-all-yaml-documents
Open

anqorithm wants to merge 1 commit into
getsops:mainfrom
anqorithm:abdallah/check-all-yaml-documents

Conversation

@anqorithm

Copy link
Copy Markdown

Encryption only checked the first document for SOPS metadata, allowing an already encrypted document later in a YAML stream to be encrypted again. Check every document in the shared encryption validator and cover metadata in the first, middle and last documents, plaintext streams, empty input and nested keys.

Validated that the regression fails before the fix; race-enabled tests pass for all packages except the Docker-backed KMS and Vault suites, which were not run, and the CLI reproduction, build, go vet and import checks pass. Staticcheck reports the same 102 findings as unchanged main, with none introduced by this patch.

Fixes #1175

Signed-off-by: Abdullah Alqahtani <61029571+anqorithm@users.noreply.github.com>
@anqorithm
anqorithm force-pushed the abdallah/check-all-yaml-documents branch from a3c62e8 to 0996e5b Compare November 2, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Attempting to decrypt doubly-encrypted files triggers panic

1 participant