You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Take a floored mode argument on the encryption actions #513
DecryptSopsFile and EncryptFile hardcode 0o600, making them the only writes in the catalog that do not
take a mode — every other one (Copy, Mkdir, WriteBytes, WriteText) does.
But the parameter cannot be free. Encrypting a file is the declaration that its contents are sensitive,
and the deployed mode already follows from that declaration
(tree/builder.go derives 0o600 from the pipeline containing encryption.decrypt). A plain mode parameter would reopen that decision to a caller who can get it wrong,
and a world-readable secret fails silently: the file is written, the run succeeds, nothing reports it.
Ruled: take mode, and floor it on decrypt — refuse any mode granting group or other access, before
decrypting, so a rejected call never materializes plaintext. 0o600 and 0o400 remain expressible.
The encrypt side is not floored: its product is ciphertext, safe at rest by construction and destined for
a repository that stores it 0o644 regardless.
Activity