
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
common-log-string
Advanced tools
dead stupid function to generate a common-log-format-ish string from request & response objects
Dead stupid function to generate a common-log-format-ish string from request & response objects. Not guaranteed to work with anything other than node-restify.
I wrote this because I wanted something that didn't attempt to write things to a log file and could be plugged into restify as middleware. Sample output:
- - [12/Mar/2015:08:54:46 -0700] "GET /_monitor/ping HTTP/1.1" 200 6 "" "HTTPie/0.8.0"
How to use:
var restify = require('restify');
var logstring = require('common-log-string');
var server = restify.createServer();
server.on('after', request, response, route, error)
{
var output = logstring(request, response);
request.logger.info(output);
});
Order of fields:
The second to last is non-standard but useful.
You may optionally pass an options object as the third parameter to the function. One option is currently respected:
ipHeader: report the client IP from this header instead of the address of the remote socket. Useful if you wish to log X-Forwarded-For IPs instead of the IP of an intermediate proxy.
ISC.
FAQs
dead stupid function to generate a common-log-format-ish string from request & response objects
The npm package common-log-string receives a total of 857 weekly downloads. As such, common-log-string popularity was classified as not popular.
We found that common-log-string 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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.