
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
pip install tf-lazy-loader
from tf_lazy_loader import dynamic_import
# Lazily import the "os" module
os = dynamic_import("os")
# Trigger the actual import by referencing a name in the "os" module:
print(os.environ)
You can set the lazy
arg of the dynamic_import
function to False
to eagerly import the given module. This can be useful if you only want to perform lazy imports based on a flag.
For example, if you have a Django project and you only want to enable lazy imports when in DEBUG mode, and do imports eagerly in production, you would do something like this:
from django.conf import settings
DEBUG = settings.DEBUG
os = dynamic_import("os", lazy=DEBUG)
FAQs
Lazy loading of Python modules, based on TensorFlow's LazyLoader util.
We found that tf-lazy-loader 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
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.