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.
Build a test pipeline with mocha
mocha-pipe allows you to define your tests as a series of asynchronous units of work. Collectively the individual steps make up the pipeline. Each step pipes its output into the next step. If any uncaught exception occurs, the pipe is considered broken, and the step which threw the error will show as broken. The pipe returns a promise which will be resolved with the result from the last step.
npm install --save-dev mocha-pipe
# or
yarn add -D mocha-pipe
const mochaPipe = require('mocha-pipe');
const steps = [{
name: 'Get user', // passed to it(name, ...);
before: () => 'MOCHA_PIPE',
execute: (username) => getUser(username),
after: res => assertSomething(res)
}, {
name: 'Update user email',
execute: user => updateEmail(user, 'a@b.com'),
after: res => assertSomething(res)
}, {
name: 'Expect 401 on invalid password',
execute: user => authenticate(user, 'bad password').catch(err => assertStatusCode(err, '401'))
}];
const pipeline = mochaPipe({
name: 'Basic Example', // passed to describe(name, ...);
steps
});
pipeline.run();
FAQs
Build a test pipeline with mocha
The npm package mocha-pipe receives a total of 2 weekly downloads. As such, mocha-pipe popularity was classified as not popular.
We found that mocha-pipe 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.
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.