Skip to content

Suggestion to not emit decrypted file values into logs on 'complex value in dotenv file' failure #1198

Closed

Description

@mistakenot

If you try to run exec-env with a file with a complex value YAML entry, it fails and outputs the failing complex value block into the log. I wanted to raise this as a potential security risk, as it can lead to secrets being written into logs if this command fails in CI, for example.

I think this is the line where the error is generated:

https://github.com/mozilla/sops/blob/66043e71a81787d6513bc2e5505a29aac67dc6f1/stores/dotenv/store.go#L116

I would be very happy to submit a PR to change this, but wanted to raise it first to get your thoughts.

Activity

  1. felixfontein commented on Sep 27, 2025

    @felixfontein
    Contributor

    While it's helpful for fixing a case when seeing the value, it's probably better to print the value's key since that's not sensitive (as opposed to the value) and still allows you to find the value.

  2. felixfontein commented on Sep 27, 2025

    @felixfontein
    Contributor

    Fixed by #1959.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions