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.
axios-endpoint
Advanced tools
Manage and create axios requests without a hassle
npm i axios-endpoint
let route = require("axios-endpoint");
// es6
import route from "axios-endpoint";
const axios = require("axios");
axios.defaults.baseURL = "https://jsonplaceholder.typicode.com";
let endpoint = {
getTodos: route("GET", "/todos/1").bundle(),
getTodosBefore: route("GET", "/todos/1")
.before(() => {
console.log("this is gonna run before the request!");
})
.bundle(),
getTodosAfter: route("GET", "/todos/1")
.after(() => {
console.log("this is gonna run after the request!");
})
.bundle(),
getTodosBeforeAfter: route("GET", "/todos/1")
.before(() => {
console.log("this is gonna run before the request!");
})
.after(() => {
console.log("this is gonna run after the request!");
})
.bundle()
};
endpoint
.getTodos()
.then(response => {
console.log(response);
})
.catch(error => {
console.error(error);
});
endpoint
.getTodosBefore()
.then(response => {
console.log(response);
})
.catch(error => {
console.error(error);
});
endpoint
.getTodosAfter()
.then(response => {
console.log(response);
})
.catch(error => {
console.error(error);
});
endpoint
.getTodosBeforeAfter()
.then(response => {
console.log(response);
})
.catch(error => {
console.error(error);
});
before
runs exactly before making the request
after
runs exactly after making the request
npm run test
FAQs
Scalable and easy to use axios arch
We found that axios-endpoint 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’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.