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.
readme-badger
Advanced tools
Whizzy badges in your READMEs.
npm install readme-badger
addBadge(content, fileExt, imageUrl, linkUrl, altText)
Returns the content but with a new badge inserted.
content
: the text content of a README.fileExt
: the file extension of the README (md, textile, rdoc etc).imageUrl
: the image url for the badge.linkUrl
: the url for the badge to link to.altText
: the alternative if images aren't visible. This will be used on its own for plaintext READMEs, so include a url in the text.hasImageSupport(fileExt)
Returns true/false depending on whether the format (fileExt
) will render a badge image or just the altText.
fileExt
: the file extension of the README (md, textile, rdoc etc)var badger = require('readme-badger');
var readme = '# My Lovely Library\n' +
'\n' +
'## Features\n';
var imageUrl = 'https://badges.gitter.im/Join%20Chat.svg';
var linkUrl = 'https://gitter.im/gitterHQ/gitter';
var altText = 'Join the chat at https://gitter.im/gitterHQ/gitter';
var readmeWithBadge = badger.addBadge(readme, 'md', imageUrl, linkUrl, altText);
console.log(readmeWithBadge);
// # My Lovely Library
//
// [![Join the chat at https://gitter.im/gitterHQ/gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/gitterHQ/gitter)
//
// ## Features
// ...
fileExt
) Supportreadme-badger supports almost all of the GitHub README markups:
It will also failover to inserting the altText
at the bottom of the README for any format that doesnt have image link support (creole, txt or anything else).
git clone git@github.com:gitterHQ/readme-badger.git
cd readme-badger
npm install
npm test
MIT
FAQs
Inserts badges into GitHub READMEs
The npm package readme-badger receives a total of 38,276 weekly downloads. As such, readme-badger popularity was classified as popular.
We found that readme-badger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.