Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Implemented as an http backend, cryptoform encypts your state using one of the providers and stores in one on the backends. Currently only lockbox provider and file backend are supported. The tool designed to be modular so other encryption providers and backends may be added later on.
Even though it's strongly recommended to use S3 or some other 3rd party service to store the state, and using git to store it is discouraged, sometimes it's still very handy to not have any external services and store the state in git, encryted for better safety. For instance: you work on the project alone and you don't need locking(an external lock mechanism can be supported in the future) and you don't want to bother configuring an external state store.
Install one of supported ruby versions: 3.2 or newer
In your terraform project, create 2 files:
Gemfile:
# frozen_string_literal: true
source "https://rubygems.org"
gem "cryptoform"
Run bundle install
Run bundle exec cryptoform init
and follow the instructions.
wget https://raw.githubusercontent.com/zhulik/cryptoform/main/cryptoform
chmod +x ./cryptoform
./cryptoform init
port 3000 # Optional, default is 3000
state :state do # required, name can be different if you like
# only file is supported, state will be stored in <state name>.tfstate.enc
storage_backend :file, name: "state.tfstate.env" # required, file name can be overwriten if needed
# lockbox and diff_lockbox are supported backends, both use lockbox gem,
# but diff_lockbox only encrypts JSON scalar values making the state file
# a little bit less secure, but partially human readable and gid diff friendly.
encryption_backend :diff_lockbox, key: -> { ENV.fetch("CRYPTOFORM_KEY") } # required, `key` is also required
end
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and the created tag, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/zhulik/cryptoform. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the Cryptoform project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
FAQs
Unknown package
We found that cryptoform demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.