
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
trapdoor monkeypatches ENV
so any secret values are available when asked for by name (i.e. ENV['SOME_SECRET']
) but are hidden when requested in bulk (i.e. ENV.to_h
, ENV.inspect
, iterators). This was designed to be a drop in replacement for codebases that use ENV
to hold secrets but also use developer tools that may cause these values to be accidentally logged.
gem install trapdoor
require 'trapdoor'
Let's start by inspecting the environment in the repl. We can see SECRET_API_TOKEN
and its value.
> ENV
=> {... "SECRET_API_TOKEN"=>"987tfghjo0987yt"}
After loading trapdoor
, let's tell it to hide this specific value then inspect the environment again.
> ENV.hide "SECRET_API_TOKEN"
> ENV
=> {... "SECRET_API_TOKEN"=>"**REDACTED**"}
But we can see this value can still be accessed just like before:
> ENV['SECRET_API_TOKEN']
=> "987tfghjo0987yt"
Additionally, we can call ENV.start_smuggling
to start redacting all new environment variables. This can be useful if you insert sensitive variables into the environment afterwards so that any non-pre loaded values are redacted.
FAQs
Unknown package
We found that trapdoor 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.