SECURITY: SOPS decryption without integrity verification #61
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
In
lib/env.sh,.env.encfiles are decrypted using SOPS without verifying decryption integrity. No GCM authentication check is performed after decryption, and decryption failures are treated as non-fatal warnings — the script continues execution even if decryption fails.Risk
An attacker who can modify the encrypted
.env.encfile could inject malicious environment variables that pass through toeval(orsource, once #59 is fixed).Recommended Fix
sops --verifyfor built-in validationDependencies
lib/env.sh. Do eval removal first, then add integrity checks.References
Upstream: codeberg johba/disinto#820
Depends on #59 — both touch the SOPS/eval path in
lib/env.sh. Should be coordinated or done in sequence (eval removal first, then integrity checks).