
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Use EncryptedZip to create an archive of encrypted files. Files are encrypted using AES-256 using a randomly generated base64 password of approximately 100 characteres. The password is encrypted according to a provided public key. The encrypted password is then stored as a txt file and zipped along with the encrypted zip.
Add this line to your application's Gemfile:
gem 'encryptedzip'
And then execute:
$ bundle
Or install it yourself as:
$ gem install encryptedzip
You must specify a public key file to use for the password encryption:
EncryptedZip.public_key_file = 'public.pem'
You can then create an encrypted zip file by providing an output filepath and an array of filepaths to encrypt.
EncryptedZip.create_encrypted_zip(output_filepath: 'archive.zip', files: ['secret.txt'])
Optionally, you can provide a password_path and encrypted_filepath.
EncryptedZip.password_path = "p4$$w0rd.txt"
EncryptedZip.encrypted_filepath = "BigSecret.zip"
To generate a 4096-bit private key:
$ openssl genrsa -des3 -out private.pem 4096
To generate a public key from a private key:
$ openssl rsa -in private.pem -out public.pem -outform PEM -pubout
Example script to decrypt a password file:
require 'openssl'
private_key_file = 'private.pem'
password = '' # password used during key genertation
encrypted_string = File.read('password.txt')
private_key = OpenSSL::PKey::RSA.new(File.read(private_key_file),password)
puts private_key.private_decrypt(encrypted_string)
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that encryptedzip demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.