Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
fi-security
Advanced tools
Application security module for Node.js Express applications.
npm install --save fi-security
You must call it with your Express' application instance, to attach the routes, and a configuration object. It's important to initialize the Express' session before you configure Fi Security:
var session = require('express-session');
var security = require('fi-security');
var express = require('express');
var app = express();
app.use(session());
security(app, config);
/* And now your routes... */
app.get('/', (req, res, next) => {
//...
});
The configuration Object
must be pretty much like a Fi Aegis configuration Object
, since this module is based on it.
Function
to log with or a Boolean
. If true
it'll use console.log
.exclude
property:
CSRF
checks:
POST
, PUT
or DELETE
method or an array of them. Empty means ALL
.{
debug: true,
p3p: 'ABCDEF',
csrf: {
exclude: [{
method: 'POST',
path: '/no-csrf'
}, {
path: '/api/external'
}]
},
xframe: 'DENY',
xssProtection: {
enabled: true
},
csp: {
reportUri: 'https://example.com',
policy: {
'default-src': "'self'"
}
},
hsts: {
includeSubDomains: true,
maxAge: 31536000
},
nosniff: true
}
Just add this to your Fi Security configuration:
//...
csrf: {
angular: true
//...
}
//...
See this for more information regarding AngularJS' XSRF approach.
FAQs
Security component for Node.js Express applications
The npm package fi-security receives a total of 0 weekly downloads. As such, fi-security popularity was classified as not popular.
We found that fi-security demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.