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.
safe-images
Advanced tools
A Node.js package for detecting NSFW (Not Safe For Work) content in images using the SmartClick AI NSFW Detection API.
Install the package using npm:
npm install safe-Images
Import Package:
const SafeImage = require('safe-Images');
const safeImage = new SafeImage();
Usage with URL:
const imageURL = 'https://example.com/path/to/image.jpg';
safeImage.detectFromURL(imageURL)
.then((result) => {
console.log('Not Safe:', result);
})
.catch((error) => {
console.error('Error:', error.message);
});
Usage with image file (Buffer):
const fs = require('fs');
const imageFilePath = 'path/to/your/image.jpg';
const imageBuffer = fs.readFileSync(imageFilePath);
safeImage.detectFromFile(imageBuffer)
.then((result) => {
console.log('Not Safe:', result);
})
.catch((error) => {
console.error('Error:', error.message);
});
const safeImage = new SafeImage("YOUR_CUSTOM_API_KEY");
To use the NSFW detection service, you need to obtain an API key from SmartClick AI . You can either pass your custom API key when creating an instance of the SafeImage
class or leave it empty to use the default API key.
This package is open-source and available under the LICENSE .
This package relies on an external NSFW detection service provided by SmartClick AI. Make sure you comply with their terms of service and usage policy.
If you encounter any issues or have suggestions for improvements, please open an issue on GitHub.
FAQs
Safe Image Package To Check Images Safty
We found that safe-images 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.