Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@plasma-js/hades
Advanced tools
A library for data/event handling
Install:
npm install --save @plasma-js/hades
Then:
// const Hades = require('hades').default;
import Hades from 'hades';
const hades = new Hades();
const eventName = 'eventExemple';
const eventHandler = function(message) {
alert(message);
}
// Subscribe
hades.on(eventName, eventHandler);
// Trigger
hades.publish(eventName, 'Trigger message exemple');
const collectionName = 'events';
const collectionFields = {
name: 'string|required',
location: 'string|required',
tickets: [
{
lote: 'integer|required',
price: 'float|required',
avaiable: 'integer|required'
}
]
};
const dataExemple = {
name: 'Lollapalooza',
location: 'Indie Land',
tickets: [
{
lote: 1,
price: 600.00,
avaiable: 600
},
{
lote: 2,
price: 700.00,
avaiable: 1000
}
]
};
// Collection register
hades.collections.new(collectionName, collectionFields);
// Validate a entry before register a new line collection
let validEntry = await hades.collections.events.validate(dataExemple);
You can import the data managing only (Collections), like in the exemple bellow:
// const Collections = require('hades').Collections;
import { Collections } from 'hades'; // Collections data class
Or only the pubsub class:
// const Events = require('hades').Events;
import { Events } from 'hades'; // Events data class
FAQs
A standalone event handler and data manager.
We found that @plasma-js/hades 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.