
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
:fire: Keep personal data out of your logs
logger.info "Hi test@example.org!"
# => Hi [FILTERED]!
By default, scrubs:
Works with all types of logging - Ruby, Active Record, Active Job, and more
User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? [["email", "[FILTERED]"]]
Works even when sensitive data is URL-encoded with plus encoding
Add this line to your application’s Gemfile:
gem "logstop"
And add it to your logger:
Logstop.guard(logger)
Create config/initializers/logstop.rb
with:
Logstop.guard(Rails.logger)
To scrub IP addresses (IPv4), use:
Logstop.guard(logger, ip: true)
To scrub MAC addresses, use:
Logstop.guard(logger, mac: true)
Add custom rules with:
scrubber = lambda do |msg|
msg.gsub(/custom_regexp/, "[FILTERED]".freeze)
end
Logstop.guard(logger, scrubber: scrubber)
Disable default rules with:
Logstop.guard(logger,
email: false,
phone: false,
credit_card: false,
ssn: false,
url_password: false
)
To scrub outside of logging, use:
Logstop.scrub(msg)
It supports the same options as guard
.
This should be used in addition to config.filter_parameters
, not as a replacement.
Learn more about securing sensitive data in Rails.
Also:
View the changelog
Everyone is encouraged to help improve this project. Here are a few ways you can help:
To get started with development:
git clone https://github.com/ankane/logstop.git
cd logstop
bundle install
bundle exec rake test
FAQs
Unknown package
We found that logstop 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.