
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Simple whitelist-based html sanitizer inspired by the SanitizationFilter
in GitHub's html-pipeline library.
Works in node (through cheerio) and in the browser (through jquery), and weighs in ~ 2kb minimized.
var cockblock = require("cockblock");
cockblock(html[, options]); // Returns sanitized html
cockblock.url(url[, options]); // Returns sanitized url
In the browser, just include jquery and cockblock.js:
<script src="path/to/jquery.js" type="text/javascript"></script>
<script src="path/to/cockblock.js" type="text/javascript"></script>
The library comes with a sensible set of defaults. You can override them
through cockblock.defaults
or simply pass the options inline.
// Simplified example that only permits <a>, <em> and <strong> elements.
// Titles are permitted on all elements and links can also include href.
// Only absolute http(s) links are permitted.
cockblock.defaults = {
elements: ["a", "em", "strong"],
attributes: {
"a": ["href"],
"all": ["title"]
},
protocols: /^(http|https)/i
};
See lib/cockblock.js for the default set of allowed elements, attributes, and supported protocols.
Want to contribute? Great! Open an issue if you've found a bug, and pull requests are always welcome.
git clone https://github.com/kumu/cockblock && cd cockblock
npm install -g mocha
npm install
make test # run tests within console / cheerio
make test-browser # run tests within browser / jquery
FAQs
Keep your pants on, xss
The npm package cockblock receives a total of 0 weekly downloads. As such, cockblock popularity was classified as not popular.
We found that cockblock 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 researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.