Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
connect-access
Advanced tools
Access controls (ACLs) by location as a Connect middleware. Inspired by nginx's http_access_module.
$ npm install connect-access
access(String path, Array rules)
var access = require('connect-access');
var rules = [
'192.168.1.1', // Allow 192.168.1.1
'10.0.0.0/8', // Allow entire 10.0.0.0/8 range
'127.0.0.1', // Allow localhost
'-all', // block everyone else
];
var app = connect()
.use(access('/private/*', rules)) // Lock down all of /private/* to the ACLs we declared
.use(function(req, res, next) {
res.end('Hello world');
});
There are 2 ways to declare a list of acls.
To allow or disallow, the ip rule is prefixed with a +
or -
. If no qualifier is specified, it's assumed to allow
.
Rules are executed first to last and ends when the first rule is matched. If no match is found, assumes allow everything.
'all' // Allow everything
'127.0.0.1' // Allow just 127.0.0.1
'10.0.0.0/8' // Allow a CIDR range
'-127.0.0.1' // Disallow 127.0.0.1
'-10.0.0.0/8' // Disallow a CIDR range
'-all' // Disallow everything
FAQs
Access controls (ACLs) by location as a Connect middleware
We found that connect-access 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.