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

filestatus Subcommand cannot handle mismatch between file extension and encrypted file format. #1591

Open
Jafner opened this issue Aug 30, 2024 · 1 comment · May be fixed by #1601
Open

Comments

@Jafner
Copy link

Jafner commented Aug 30, 2024

I have a file secrets.env where the plain content is dotenv formatted.
I encrypt all files to json format.

When I run sops filestatus secrets.env I get:

[CMD]    FATA[0000] cannot check file status: cannot load encrypted file: invalid dotenv input line: {

I can decrypt the file just fine with sops decrypt --input-type json secrets.env

Is there another programmatic way to determine whether a file is properly sops-encrypted?

@felixfontein
Copy link
Contributor

Unfortunately there's no --input-type for filestatus (yet). So right now there's no other way (except to reimplement filestatus in a programming language of your choice).

(Support for --input-type is definitely something that should be added.)

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 a pull request may close this issue.

2 participants