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 dual-binding library for window.location.hash
var Hash = require('hashbind');
var Result = require('rezult');
var hash = new Hash(window);
// Simple usage as a key-value store:
var someVal = hash.get('setting');
hash.set('setting', someVal);
// Better still, bind the value:
var bound = hash.bind('setting')
.addListener(function onSettingChange(val) {
console.log('the setting is', val);
})
;
// Maybe you wanted an integer setting:
var bound = hash.bind('setting')
.setParse(Result.lift(parseInt))
.addListener(function onSettingChange(val) {
console.log('the setting is', val);
})
;
// Maybe you wanted a default:
var bound = hash.bind('setting')
.setParse(Result.lift(parseInt))
.setDefault('42')
.addListener(function onSettingChange(val) {
console.log('the setting is', val);
})
;
// You can still set it by name:
hash.set('setting', 99);
// You can also set it through the bound reference:
bound.set(99);
// If you care to handle parse errors when settingy our values (rather than
have them thrown):
bound.set('XXX', function setDone(err, str, val) {
// err is null or the parse error
// str is the string that was parsed
// val is the value returned by the parser
console.error(err);
});
FAQs
Dual Binding Library For window.location.hash
The npm package hashbind receives a total of 3 weekly downloads. As such, hashbind popularity was classified as not popular.
We found that hashbind 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.