Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
request-with-cookies
Advanced tools
An enhancement to mikeal/request library to create reusuable clients that supports cookies per client
An enhancement to mikeal/request library to create reusuable clients that supports cookies per client
Create a new client and use the same API as mikeal/request
var request = require("request-with-cookies");
var client = request.createClient();
client("http://www.google.com", function (error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body) // Prints the google web page.
}
});
You can also create a client with baked in options
var request = require("request-with-cookies");
var options = {
qs: {
q: "foo"
}
};
var client = request.createClient(options);
// now every request will be sent with "?q=foo" appended to the URL
client("http://www.google.com", function (error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body) // Prints the google web page.
}
});
Custom cookies can be set by passing in the following options
var options = {
url: "https://foobar.com",
cookies: [
{
name: "foo",
value: "v1"
},
{
name: "bar",
value: "v2"
}
]
};
The code can be built using gulp as follows
$ gulp
Run tests using
$ npm test
FAQs
An enhancement to mikeal/request library to create reusuable clients that supports cookies per client
The npm package request-with-cookies receives a total of 134 weekly downloads. As such, request-with-cookies popularity was classified as not popular.
We found that request-with-cookies 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 found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.