Skip to content

sops truncates the file to zero after a failed key rotation #855

@cohadar

Description

@cohadar

Sops version: 3.7.1 (Installed from deb package)

How to reproduce:

  1. create example.yaml using one KMS and one PGP key
  2. turn off your aws profile / credentials
  3. try to rotate the file in place: sops -r -i example.yaml

What happens:

  1. example.yaml file gets truncated to zero bytes!
  2. sops prints no error messages
  3. sops returns exit code zero as if everything was ok

What I would like to happen:

  1. sops detects that not all master keys are available
  2. sops prints error message: you cannot rotate because you are missing key X
  3. sops exits with non-zero code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions