
Product
Introducing Socket Scanning for OpenVSX Extensions
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.
rack-potentially-secure-cookies
Advanced tools
This is a Rack middleware for one very specific purpose;
You have a site running on a server that can be accessed through both HTTP and HTTPS. Whichever method the user accesses the site she'll never change. So if you access the site the first time through HTTPS you will continue to do so.
Because security we needed a way to ensure that the cookie flag Secure was
being set whenever our users accesses the site through HTTPS, and to ensure it
was not set when accessing through HTTP as the users couldn't login then.
An example of this is:
This is available as a gem so just add to your Gemfile:
gem 'rack-potentially-secure-cookies', require: 'rack/potentially_secure_cookies'
In your environment.rb (or maybe environments/production.rb) add the middleware:
config.middleware.insert_before(ActionDispatch::Cookies,
Rack::PotentiallySecureCookies,
['_session_id'])
The last argument is an array of cookies to force this configuration on.
MIT License
FAQs
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.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.

Product
Bringing supply chain security to the next generation of JavaScript package managers

Product
A safer, faster way to eliminate vulnerabilities without updating dependencies