Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Transforms console.log ('debug', 'error', 'info', 'log', 'trace', 'warn') method output with chainable pipes.
Comes with a ready-to-use implementation of different pipes, like 'JsonStringifyPipe': a pipe that transforms console output into a single serialized JSON string.
TypeScript safe. Has zero external dependencies.
Usage example:
import {installConsoleOverrides} from 'logpipes';
installConsoleOverrides(createJsonStringifyPipe());
console.log('Log after pipe is installed', {a: 1, b: 2, c: 3});
Produces a one-liner string with a serialized JSON:
'{"message":"Log after pipe is installed $1","$1":{"a":1,"b":2,"c":3},"level":"log","timestamp":"2023-07-03T17:13:56.018Z","id":"current-log-message-uuid"}'
JsonPipe converts console log arguments into a single serializable JSON object.
The pipe accepts JsonPipeOptions
which inherits all JsonSimplifierOptions
.
See in-code docs for the available options:
Check unit tests for more examples.
JsonStringifyPipe calls JsonPipe and converts the result JSON object into a single line string.
See docs for JsonPipe
for more details.
LogLevelFilterPipe excludes configured log levels from the final output.
See LogLevelFilterPipeOptions and related unit tests.
LogMessageFilterPipe excludes configured all log events with a specified tokens in the message.
See LogMessageFilterPipeOptions and related unit tests.
LogCachePipe caches console messages and provides access to the cache.
This pipe can be used to dump or sideload all console log messages.
See LogCachePipeOptions and related unit tests.
Adds a timestamp as the first parameter to every console message.
NoopPipe does nothing and proxies all parameters to the next pipe with no changes.
It can be used to reduce a client-side boilerplate code.
FAQs
Console.log transformation pipes
We found that logpipes 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.