Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Private Rack middleware purpose is to protect your Rack application from anonymous via a secret code form.
$ gem install rack-private
require 'rack-private'
use Rack::Private, :code => 'secret'
You can also define multiple codes.
use Rack::Private, :codes => ['secret', 'super-secret']
And provide your own template.
use Rack::Private, :code => 'secret', :template_path => Rails.root.join("app/templates/private.html")
You can specify exceptions, using strings or regular expressions
use Rack::Private, :code => 'secret', :except => ["public"]
This will allow access to any URL containing 'public'. If you want more control, use a regular expression:
use Rack::Private, :code => 'secret', :except => [/public$/]
This will only allow access to URLs that end in 'public'. You can use any expressions you want.
If you have a lot of exceptions, you can specify a block
use Rack::Private, :code => 'secret' do
except /foo$/
except 'public'
end
You can also specify a HTTP method in the block form
use Rack::Private, :code => 'secret' do
except /foo$/, :method => 'post'
except 'public', :method => :get
end
FAQs
Unknown package
We found that rack-private 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.