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.
A lightweight image comparison tool
Pixel-Diff was initially created to compare screenshots and continue the work of BlinkDiff.
There are three types of image comparisons:
Install this module locally with the following command:
npm install pixel-diff
Save to dependencies or dev-dependencies:
npm install --save pixel-diff
npm install --save-dev pixel-diff
let diff = new PixelDiff({
imageAPath: 'path/to/first/image',
imageBPath: 'path/to/second/image',
thresholdType: BlinkDiff.THRESHOLD_PERCENT,
threshold: 0.01, // 1% threshold
imageOutputPath: 'path/to/output/image'
});
diff.run((error, result) => {
if (error) {
throw error;
} else {
console.log(diff.hasPassed(result.code) ? 'Passed' : 'Failed');
console.log('Found ' + result.differences + ' differences.');
}
});
Refer to docs for more examples.
Run the tests with the following commands:
npm test
or npm test -- unit
The code-coverage will be written to the coverage folder in the module root.
See the contributing guide for more information.
In lieu of a formal style guide, take care to maintain the existing coding style.
Add tests for any new or changed functionality. Lint and test your code using
npm test
Licensed under the MIT license.
Copyright (c) 2016 Koola.
FAQs
A lightweight image comparison tool
We found that pixel-diff 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.