Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
api-cg-lib
Advanced tools
https://github.com/CloudGenUser/api-cg-lib.git
This code has the objective to get information of an API, no matter if the API is public or requires access permission.
This library could be used as part of a component based on Open Integration Hub (OIH) framework or any Nodejs development that requires API calls on it.
The library can be installed from npm page with the next:
npm install api-cg-lib
, npm i api-cg-lib
or yarn install api-cg-lib
Arguments:
Required:
Optionals:
Description: This code creates a request to get information from an API according with the parameter in the call. The correspondig configurations are provided by the API owner and should be set in the corresponding parameters of this library. Once the request is received and processed by the API the respose is sent back with the result. The result is a JSON structure in a string format with the content of the result by the API, it could be the expected result or an error message if the API couldn't process the request.
Sample request:
{"api": "https://pokeapi.co/api/v2/pokemon/ditto", "method": "get"}
Response of the sample request (fragment):
{
"content": {
"abilities": [
{
"ability": {
"name": "limber",
"url": "https://pokeapi.co/api/v2/ability/7/"
}
}
]
}
}
Required:
Optionals:
{"method": "POST","api": "https://elastic.test.com/tempo/","auth": "ZWxhc3RpYzpFGHdGlj","authType":"Basic","addData":{"valorprueba":"prueba"}}
Resultant sample (fragment):
{
"content": {
"abilities": [
{
"ability": {
"name": "limber",
"url": "https://pokeapi.co/api/v2/ability/7/"
}
}
]
}
}
FAQs
Library that gets data from an Api.
The npm package api-cg-lib receives a total of 0 weekly downloads. As such, api-cg-lib popularity was classified as not popular.
We found that api-cg-lib demonstrated a healthy version release cadence and project activity because the last version was released less than 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.