
Research
5 Malicious Chrome Extensions Enable Session Hijacking in Enterprise HR and ERP Systems
Five coordinated Chrome extensions enable session hijacking and block security controls across enterprise HR and ERP platforms.
npm-test-helpers
Advanced tools
Useful shared test helpers for writing apps that interact with npm.
It can be useful to test against a fully-functional Registry-Couch-App. npm-test-helpers provides a useful set of helpers for doing this.
setting up your local environment
local.ini to have the settings outlined in https://github.com/npm/npm-registry-couchapp.test-config.json that has appropriate settings for your CouchDB configuration:{
"testRegistryName": "npm-test-registry",
"host": "localhost",
"port": 5984,
"scheme": "http",
"cache": "/tmp",
"couchUser": "admin",
"couchPass": "admin",
"populateDesign": true
}
initializing a testing registry
Couch = require('../lib').Couch;
couch.setup().then(function() {
// a registry is now available with the
// design documents populated.
});
tearing down the testing registry
var Couch = require('npm-test-helpers').Couch;
couch.teardown().then(function() {
// the testing registry has been destroyed.
});
publishing a package
var Couch = require('npm-test-helpers').Couch,
Registry = require('npm-test-helpers').Registry;
couch.setup().then(function() {
var registry = new Registry();
registry.publish('request@2.36.0').then(function(stdout) {
// the package is now published.
});
});
unpublish a package
var Couch = require('npm-test-helpers').Couch,
Registry = require('npm-test-helpers').Registry;
couch.setup().then(function() {
var registry = new Registry();
registry.publish('request@2.36.0').then(function(stdout) {
return registry.unpublish('request');
}).then(function(stdout) {
// the package was unpublished.
});
});
delete a package
var Couch = require('npm-test-helpers').Couch,
Registry = require('npm-test-helpers').Registry;
couch.setup().then(function() {
var registry = new Registry();
registry.publish('request@2.36.0').then(function(stdout) {
return registry.delete('request');
}).then(function(stdout) {
// the package was unpublished.
});
});
testing a follower feed
We use followers all over the place, for different pieces of npm's architecture, npm-test-helpers makes it easy to perform inegration tests on followers.
listening for a publication event
var Couch = require('npm-test-helpers').Couch,
Registry = require('npm-test-helpers').Registry;
couch.setup().then(function() {
var feed = follow({
db: url + '/' + config.testRegistryName,
include_docs: true,
since: 'now'
}, function(err, change) {
// change.doc.time.unpublished will be
// an object.
});
feed.on('catchup', function() {
(new Registry()).unpublish('request@1.9.0').done();
})
});
FAQs
Useful shared test helpers for writing apps that interact with npm.
We found that npm-test-helpers 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
Five coordinated Chrome extensions enable session hijacking and block security controls across enterprise HR and ERP platforms.

Research
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.

Research
/Security News
A malicious Chrome extension steals newly created MEXC API keys, exfiltrates them to Telegram, and enables full account takeover with trading and withdrawal rights.