Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Result of sops encoded yaml file have inconsistent indentation #1066

Open
budimanjojo opened this issue May 30, 2022 · 1 comment
Open

Result of sops encoded yaml file have inconsistent indentation #1066

budimanjojo opened this issue May 30, 2022 · 1 comment

Comments

@budimanjojo
Copy link

Here is a test yaml file:

hello:
  hello2:
    - sops: value
      sops2:
        sops3: value

Encrypt it with SOPS:

 sops -e test.yaml
hello:
    hello2:
        - sops: ENC[AES256_GCM,data:rLOq/m0=,iv:e02zP+IuYoHdh6y5l13Lmd/Csh1zjgQ1v5tGjzLsyEA=,tag:iIobTHf40HkgtUO2ep5hOQ==,type:str]
          sops2:
            sops3: ENC[AES256_GCM,data:O/SwQd0=,iv:DfN2KCmj8D3D0P5M28/kQBcoWPTbUJO3rnw5K4PN2Ow=,tag:OWstfacX86bm1Xa93mJw5A==,type:str]
sops:
    kms: []
    gcp_kms: []
    azure_kv: []
    hc_vault: []
    age:
        - recipient: age1zeqkpfz7e3s207ynea0z0auc0mrct0pc7w4sh6j3d0c4qac3dahqj9ufdg
          enc: |
            -----BEGIN AGE ENCRYPTED FILE-----
            YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBqSTFsMEZVRjlSQVVzSVB5
            YllVdmZJelh4d3ZXKzF5dUtic1BYZkdTUHdNCk94RWNkeDJxRU02QkhYUGJLQnZ0
            aDNrdFQ5VTRsUHp4RmJ3R1lnNi9xUncKLS0tIFZzczkwYjV1M29UbDNuTCtGYWlV
            cHJQbDJ5UGwrYUNLT1JiS0pydFEraVUKjx2/UrSrzaWuJGBXGrbFpw1VhyBu2vVR
            DARFNAlmFsgHBq0bIq5SL9r5GKX2BJGeLuipuX/QGAZlVsib2dtaXw==
            -----END AGE ENCRYPTED FILE-----
    lastmodified: "2022-05-30T07:02:27Z"
    mac: ENC[AES256_GCM,data:PGgJz/LZkk3Wvh9lbPFa8bWvtI5WJ2N3nfLMs3GThzofGJ+p6GRaMuXdTFJJ/aXGH1vPBm+n67eIeHIr2Jne2tgcwGx3rzkLtfM3lauvNk5NzQ37DP2rfe2jE1phAsgW3CuYfYcCH/dShTogx4wIuL/mDJ3hGKYnTlEUmrEfta4=,iv:2VNk7jj3vkupQfrdscIYRFLGd1HrV70sSoM8JUEzRqs=,tag:xOCUXJ8TUnzJr3oVylydCQ==,type:str]
    pgp: []
    unencrypted_suffix: _unencrypted
    version: 3.7.3

hello2 field is indented 4 spaces from hello while sops3 is indented 2 spaces from sops2.

Refs: #900

@anutator
Copy link

anutator commented May 26, 2023

I have the same problem.

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

No branches or pull requests

2 participants