
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Check environment variable presence easily.
bundle install require_env
Create a YAML file, e.g. config/environment.yml
, where you define the environment variables
required by your application, for the different environment it will run
(test, development, production by default)
Here is an example presenting the different possibilities:
DEFAULTS: &DEFAULTS
BEANSTALK_URL: 'beanstalk://127.0.0.1'
SLACK_TOKEN:
# Use the environment variable TOKEN_SCALINGO as a default value if provided
SCALINGO_TOKEN: "<%= ENV['TOKEN_SCALINGO'] %>"
# Declare STRIPE_ENABLED to check for STRIPE_PUBLIC_KEY and STRIPE_SECRET_KEY
STRIPE_PUBLIC_KEY_IF_STRIPE_ENABLED:
STRIPE_SECRET_KEY_IF_STRIPE_ENABLED:
test:
<<: *DEFAULTS
IGNORE_EVENT_DELAY: 'true'
development:
<<: *DEFAULTS
IGNORE_EVENT_DELAY: 'true'
production:
<<: *DEFAULTS
When your application starts, simply call RequireEnv.check(Rails.root.join('config', 'environment.yml'))
to check if the required environment variables are provided.
If any variable is missing, RequireEnv::Missing
will be raised, detailing the missing environment variable.
FAQs
Unknown package
We found that require_env 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
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.