
Research
npm Malware Targets Telegram Bot Developers with Persistent SSH Backdoors
Malicious npm packages posing as Telegram bot libraries install SSH backdoors and exfiltrate data from Linux developer machines.
hidden-state
Advanced tools
Attach hidden state to object instances.
import hiddenState from 'hidden-state';
const hidden = hiddenState('Point');
class Point {
constructor(x, y) {
hidden(this, { x, y });
}
toString() {
let { x, y } = hidden(this);
return `<${ x }:${ y }>`;
}
add(point) {
let { x: x1, y: y1 } = hidden(this);
let { x: x2, y: y2 } = hidden(point);
return new Point(x1 + x2, y1 + y2);
}
static isPoint(obj) {
return hidden.hasState(obj);
}
}
npm install hidden-state
hiddenState(description?)
Creates a new hidden
function for accessing the hidden state of an object. The optional description
argument is used to customize TypeError
messages.
hidden(obj)
Returns the hidden state associated with the specified object. If the object does not have hidden state then a TypeError
is thrown.
hidden(obj, state)
Initializes the hidden state for an object.
hidden.hasState(obj)
Returns a boolean value indicating whether the object has associated hidden state.
FAQs
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
Malicious npm packages posing as Telegram bot libraries install SSH backdoors and exfiltrate data from Linux developer machines.
Security News
pip, PDM, pip-audit, and the packaging library are already adding support for Python’s new lock file format.
Product
Socket's Go support is now generally available, bringing automatic scanning and deep code analysis to all users with Go projects.