Decrypting dotenv gives parsing time "" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "2006"
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.1k
- Forks
- 1.1k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 9
Description
On windows 10 with version 3.7.3 and using age:
When I encrypt the .env file:
PORT=test
with the command
sops --encrypt --age xxxxx ./config/dev/secrets.env > ./config/dev/secrets.enc.env
it gives the following result
PORT=ENC[AES256_GCM,data:AxlvkA==,iv:cwHo+jRhK2Qu88UnRz6ThHmdvMIEFKZQT3SMhS4qhHM=,tag:vk6wW1zQC7foeb3Valt2Qw==,type:str]
sops_version=3.7.3
sops_age__list_0__map_recipient=age16ma5vqf88ycmlmkr5y4dvd7a4q9y9fuxc6u8u2ltprr2l0v7ff3sktlyjr
sops_lastmodified=2022-09-21T21:03:17Z
sops_unencrypted_suffix=_unencrypted
sops_age__list_0__map_enc=-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBNcDF0ZTVRckNwS1B6YjBP\nWkl4bFRUY0kxb1hEd1VpL3VGd0kvQ09kYkZJCjJyVzl3cGhIMzFHeURrZDlGVmYy\nWEVCS1lGTVdZRWd0cUl6dFZzdTlhTU0KLS0tIHdpSXJFY0VxQnB0cGFrcWhjUzRC\nRnZXRGVsVWEyMjhTUDdTVmxGa2VaencKVNROzvT4Pfu1KTGkW0JbCa3WZppFKt8D\nOs5kkhWWZ+AOF5sRnKGiQ6EKAGKCPx+qFMbqRCQODnoFI70lTczPgg==\n-----END AGE ENCRYPTED FILE-----\n
sops_mac=ENC[AES256_GCM,data:sgBnRnbhc1mqqzwPgX+nB4X5du40R7BNHNm1ixv3CoX3WGPd9FoWDEwK5Ym/spNoQErIV4dn1rOYXMKxxkKeq3kh/Y6ttsO5F2wnXHX3oLJb/ZWCL2iBeyVt8tUZjqu9XkRWoBYK5DeUqtudePLgvTRs52yDruybnmtpfvg6rj4=,iv:/Vp0mMspsLSwwLvfDsZOZB8r3XxrI9BF8azHS+DO8Dw=,tag:nH0tKJH/x1Ple6p2n8e61w==,type:str]
And when I try to decrypt again with the command
sops --d ./config/dev/secrets.enc.env > ./test.env
It throws the error
parsing time "" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "2006"
Anything I'm missing? Decrypting yaml files works as expected
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported Windows 10 case with the shown sops --encrypt and sops --d commands against a dotenv file, then compare it with the working YAML decryption path. No source file or test is named; done means decrypting the generated dotenv file succeeds without the empty-time parsing error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100