Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@koibanx/http
Advanced tools
Koibanx's Axios based generic HTTP module
Add the dependency to your package.json file by running
npm install @koibanx/http
NOTE: you must have the npm token in your .npmrc file
Initialize the client by setting the optional default parameters:
import http from "@koibanx/http";
const baseURL = "anyurl.com/api"
const timeout = 5000
const baseHeaders = {
"Authorization": "JWT some-token",
"Content-Type": "application/json"
}
const logRequestInterceptor = (request) => console.log("Request:", request)
const logResponseInterceptor = (response) => console.log("Response:", response)
const requestInterceptors = [logRequestInterceptor]
const responseInterceptors = [logResponseInterceptor]
// initialize client
const client = http({ baseURL, timeout, baseHeaders, requestInterceptors, responseInterceptors })
const extraHeaders = { "Custom-Header": "SOME_VALUE" }
const foos = await httpGet({url: "/foo", headers: extraHeaders})
console.log("Received foos", foos)
const bar = {
bar: "bar"
}
const createdBar = await httpPost({url: "/bar", headers: extraHeaders, body: bar})
console.log("Received response", createdBar)
FAQs
Koibanx's Axios based generic HTTP module
We found that @koibanx/http demonstrated a healthy version release cadence and project activity because the last version was released less than 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.