Giter Club home page Giter Club logo

Comments (6)

jvehent avatar jvehent commented on August 22, 2024

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.

bhourigan avatar bhourigan commented on August 22, 2024

@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.

jvehent avatar jvehent commented on August 22, 2024

@rpappalax : Do you still have the original files in git history that I could use to test this regression?

from sops.

 avatar commented on August 22, 2024

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.

jvehent avatar jvehent commented on August 22, 2024

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.

jvehent avatar jvehent commented on August 22, 2024
$ 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.