Comments (6)
This looks related to 31cf35a , which @bhourigan submitted not long ago. I had not considered the case of breaking binary files, but indeed that's an issue. We may have to revert that patch.
@bhourigan: any thoughts?
from sops.
@rpappalax I'm trying to reproduce this using sops 1.7, but I'm unable to. Would you mind sharing the exact steps you're taking so I can reproduce the problem?
Here's my test procedure:
bash$ tar -zpcf sops-test.tar.gz sops
bash$ sops -i -e --input-type blob --output-type blob sops-test.tar.gz
please wait while a data encryption key is being generated and stored securely
bash$ file sops-test.tar.gz
sops-test.tar.gz: gzip compressed data, from Unix, last modified: Thu Mar 3 22:09:25 2016
bash$ sops -i -d --input-type blob --output-type blob sops-test.tar.gz
bash$ file sops-test.tar.gz
sops-test.tar.gz: ASCII text, with very long lines, with no line terminators
bash$ tar -ztvf sops-test.tar.gz
drwxr-xr-x 0 bhourigan staff 0 Feb 22 08:21 sops/
<...>
bash$
I didn't get any output about a malformed archive.
from sops.
@rpappalax : Do you still have the original files in git history that I could use to test this regression?
from sops.
I have stumbled into this problem as well, and have noticed that sops 1.10 is also affected. While not providing the .tar.gz file, I can display the problem with an arbitrary file and checking the sha512 hash:
# dd if=/dev/urandom of=/tmp/somerandom bs=1024 count=512
512+0 records in
512+0 records out
524288 bytes (524 kB) copied, 0.0491849 s, 10.7 MB/s
# sha512sum /tmp/somerandom
31569c6194b67dc00c995caf32b5d23cec5c160893b5361a92ff669d957cbff4eba981680f99d21eaa8a6ace4b1999ac2331f186757aa967aac729be129727d2 /tmp/somerandom
# sops -e -i /tmp/somerandom
INFO: generating and storing data encryption key
# sops -d -i /tmp/somerandom
# sha512sum /tmp/somerandom
1f5873a7634b189022d310aebd296b3e02faa66269362a825362ccf7bedc35921130c35805d4491a6835ed5a5978453e5220b1bebdd11de81fe3effda58df6b0 /tmp/somerandom
# sops --version
sops 1.1
from sops.
I have a fix in #69 which should do the job, but we might run into the issue @bhourigan was trying to fix in 31cf35a
from sops.
$ dd if=/dev/urandom of=/tmp/somerandom bs=1024 count=512
512+0 records in
512+0 records out
524288 bytes (524 kB) copied, 0.0405401 s, 12.9 MB/s
$ sha512sum /tmp/somerandom
7e4f7dd8dd562b41efd3ae3787f4050e620580205737f6f1fa03617f06a1d5b28db5aaaed1c80165ab4216e3c030a49de3a2fa72729fad45ca4d47db922a49dd /tmp/somerandom
$ sops -e -i /tmp/somerandom
INFO found a configuration for '/tmp/somerandom' in '.sops.yaml'
INFO: generating and storing data encryption key
$ sops -d -i /tmp/somerandom
gpg: encrypted with 1024-bit RSA key, ID 7CD79CC0, created 2015-10-08
"SOPS Functional Tests (https://github.com/mozilla/sops/) <[email protected]>"
$ sha512sum /tmp/somerandom
7e4f7dd8dd562b41efd3ae3787f4050e620580205737f6f1fa03617f06a1d5b28db5aaaed1c80165ab4216e3c030a49de3a2fa72729fad45ca4d47db922a49dd /tmp/somerandom
from sops.
Related Issues (20)
- sops command doesn't read --aws-profile flag value HOT 1
- sops encryption/decryption with age key doesn't work for Python ini Files with [DEFAULT] section HOT 4
- New patch version please HOT 22
- Main project page getsops/sops never loads because of README rendering issue HOT 3
- hc-vault: Support for kubernetes auth HOT 1
- Support encryption with x.509 cert in win certmgr
- Allow to encrypt specific nodes in a file with specific keys (muliple matching creation_rules) HOT 3
- Different AWS profiles are ignored when using multiple KMS keys
- exec-env/exec-file: support "--" to separate command to run HOT 5
- Can't use docker compose and sops together HOT 3
- `sops execfile` filename should not have a random suffix appended in --no-fifo mode HOT 2
- diff shows entire file has changed HOT 1
- [question] Where is the documentation? HOT 2
- ForbiddenByRbac when using azure key vault backend with version 3.8+
- "$" in code examples in Readme prevents simple copy/paste HOT 1
- When we encrypt our values it updates all variables HOT 2
- Decrypt doesn't handle multiple files / bulk operations
- panic: runtime error: invalid memory address or nil pointer dereference when using updatekeys HOT 11
- SOPS mac_only_encrypted HOT 3
- Does sops edit exist? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sops.