getsops / getsops/sops

Breaking multiline formating in yaml as soon as a line end with a space

Open
#1,180 11 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
23.1k
Forks
1.1k
Avg merge
1d 11h
Merged PRs (30d)
9

Description

👋

As soon as a line in a multiline value end with a space, sops breaks the multiline formatting and convert to single line with \n

test: |
  line one
  line two with space at the end 
  line three
$ sops --version
sops 3.7.3 (latest)
$ sops -e test.yaml > test.enc.yaml
$ sops -d test.enc.yaml
test: "line one\nline two with space at the end \nline three\n"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the provided test.yaml and the sops -e and sops -d commands. Trace the YAML handling used by the sops CLI, then verify that encrypting and decrypting a multiline value preserves its block formatting and trailing space instead of emitting a quoted single-line value.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, yaml
Domain
cli, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.