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.
kobservable
Advanced tools
This is a basic observable implementation to hold data and get notified whenever it changes. Inspired by the well-known KnockoutJS observable objects, but without any other magic (like bindings or dependency tracking). Just observables and subscriptions.
The most basic unit: you can store and retrieve data from them.
import observable from 'kobservable';
const name = observable('');
name.subscribe(newName => console.log(`The new name is '${newName)}'`);
name('foo');// sets the name
//The new name is foo
name();// gets the name
Given a number of observables, you can perform some aggregation conversion and get it like another read-only observable.
import observable, {computed} from 'kobservable';
const user = observable('me');
const password = observable('me too');
const canSubmit = computed([user, password], ([user, password]) => Boolean(user && password));
const mySubmitButton = document.querySelector('#submit');
canSubmit.subscribe(can => mySubmitButton.disabled = !can);
user('');// disables the button
password('');// the button remains disabled
user('me');// the button remains disabled
password('me again');// enables the button
If your IDE has TypeScript running (with a plugin, see more at https://www.typescriptlang.org/), you can:
npm install && npm run build
npm test
FAQs
Observable constructor with KnockoutJS style
The npm package kobservable receives a total of 2 weekly downloads. As such, kobservable popularity was classified as not popular.
We found that kobservable 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.