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.
Capture Python's stdlib logging
messages and route them to other logging frameworks.
(Modified and packaged for PyPI from Matthew Scholefield's loguru-logging-intercept.)
Currently supported targets:
Loguru is a great alternative logging library for Python. However, if you use
(potentially external) code that already integrates with Python's default logger, you'll
get a combination of the two logging styles. This code provides code for setting up an
intercept handler to route calls to Python's default logging
module to Loguru.
Before calls that use Python's default logging
module, call the provided
setup_loguru_interceptor()
as shown below:
from logging_interceptor import setup_loguru_interceptor
setup_loguru_interceptor(modules=("foo", "foo.bar", "foo.baz"))
# now call functions from `foo` that use getLogger(__name__)
Install via pip
:
pip3 install logging-interceptor
FAQs
Intercept Python's standard logging and re-route the messages.
We found that logging-interceptor 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.
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.