
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.
@apicase/jsonapi
Advanced tools
Apicase plugin that helps you work with JSON API.
npm install @apicase/jsonapi
import fetch from "@apicase/adapter-fetch"
import { ApiService } from "@apicase/core"
import { jsonApiPlugin } from "@apicase/jsonapi"
const Root = new ApiService(fetch, {
url: "/api"
}).use(jsonApiPlugin) // <- Add this line
Imagine that we have API route with the following result.body
:
{
"data": [
{
"id": "1",
"type": "post",
"attributes": {
"title": "Hello world",
"text": "Lorem Ipsum Dolor ..."
},
"relationships": {
"author": {
"data": {
"id": "1",
"type": "user"
}
}
}
}
],
"included": [
{
"id": "1",
"type": "user",
"attributes": {
"name": "Anton",
"surname": "Kosykh"
}
}
]
}
We'll create a service with meta.normalize
options:
const GetPosts = Root.extend({
meta: {
normalize: ["id", "title", "text", "author.id", "author.name"]
}
})
GetPosts
.doRequest()
.then(({ result }) => {
console.log(result.body)
})
It will convert result.body
to:
[
{
"id": "1",
"title": "Hello world",
"text": "Lorem Ipsum Dolor ...",
"author": {
"id": "1",
"name": "Anton"
}
}
]
If you need links
or another options from original body, it's stored in result.rawBody
:
console.log(result.rawBody.included)
/*
[{
"id": "1",
"type": "user",
"attributes": {
"name": "Anton",
"surname": "Kosykh"
}
}]
*/
MIT
FAQs
JSON API plugin for Apicase (jsonapi.org)
The npm package @apicase/jsonapi receives a total of 1 weekly downloads. As such, @apicase/jsonapi popularity was classified as not popular.
We found that @apicase/jsonapi 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.