
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.
detect-readme-badges
Advanced tools
Scans a repository readme file, searching for badges.
detectReadmeBadges(readme) -> Array
Given a readme file (in string), detectReadmeBadges returns the array of badges found. Example:
const detectReadmeBadges = require('detect-readme-badges');
const badges = detectReadmeBadges(`
...
> Simplified HTTP/HTTPS requests
[](https://travis-ci.org/sindresorhus/got) [](https://coveralls.io/github/sindresorhus/got?branch=master) [](https://npmjs.com/got)
A nicer interface to the built-in ['http'](http://nodejs.org/api/http.html) module.
...
`)
// badges
[
{
urls: {
original: 'https://travis-ci.org/sindresorhus/got.svg?branch=master',
service: 'https://api.travis-ci.org/sindresorhus/got.svg?branch=master',
shields: 'https://img.shields.io/travis/sindresorhus/got/master.svg',
content: 'https://img.shields.io/travis/sindresorhus/got/master.json',
},
info: { service: 'travis', type: 'build', modifiers: { branch: 'master' } },
},
{
urls: {
original: 'https://coveralls.io/repos/sindresorhus/got/badge.svg?branch=master',
service: 'https://coveralls.io/repos/sindresorhus/got/badge.svg?branch=master',
shields: 'https://img.shields.io/coveralls/sindresorhus/got/master.svg',
content: 'https://img.shields.io/coveralls/sindresorhus/got/master.json',
},
info: { service: 'coveralls', type: 'coverage', modifiers: { branch: 'master' } },
},
{
urls: {
original: 'https://img.shields.io/npm/dm/got.svg',
shields: 'https://img.shields.io/npm/dm/got.svg',
content: 'https://img.shields.io/npm/dm/got.json' },
info: { service: 'npm', type: 'downloads', modifiers: { type: 'dm' } },
},
]
badge.urls
urls.original
the original matched url.
urls.service
the service url.
urls.shields
the shields.io equivalent url.
urls.content
the shields.io url to extract a json of the badge's "value".
badge.info
Information extracted from the badge url.
info.type
type of the badge. Available types are build
, coverage
, downloads
, version
, dependencies
and misc
.
info.service
is the service that provides the badge. Available services are coveralls, david, npm (shields.io or nodei.co), travis and gitter.
info.modifiers
are the badge modifiers that alter the interpretation of the repo/package depending on the service.
$ npm test
$ npm test-cov
to get coverage report
Released under the MIT License.
FAQs
Scans a repository's readme file, searching for badges
The npm package detect-readme-badges receives a total of 1 weekly downloads. As such, detect-readme-badges popularity was classified as not popular.
We found that detect-readme-badges 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.
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.