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.
@amazebot/logger
Advanced tools
When building dependencies of more complex apps, you don't want to be too
opinionated about how logs are written, nor add more dependencies that might not
play with choices made in the app. However, you also don't want to hard code
console.log
and end up with multiple output streams.
This package provides standard logging methods for packages requiring it. They route to console.log by default, but apps requiring those packages can pass in their own log utility, to overwrite the default methods (as long as the logger instance is exported).
import { logger } from '@amazebot/logger'
Provides standard debug/info/warning/error methods
export const pkgLogger = logger
pkgLogger.info(`That's pretty much it.`)
Outputs to console by default, but allows override.
import { logger } from 'amazing-logger'
import * as myPackage from 'my-package'
myPackage.logger.replace(logger)
Routes to debug/info/warning/error of new interface.
import { silence } from '@amazebot/logger'
describe('test methods that log', () => {
before(() => silence())
after(() => silence(false))
})
Routes debug/info/warning/error to null output.
FAQs
Basic log handling with overrides for use within other modules.
The npm package @amazebot/logger receives a total of 1 weekly downloads. As such, @amazebot/logger popularity was classified as not popular.
We found that @amazebot/logger 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.