
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).
The module implements the ECS (Elastic Common Schema) specification that can be found at for quick reference: ECS Field Reference
You can install the package from PyPi like this:
pip install kubi-ecs-logger
This package is only for Python 3.6 or newer.
# Import
from kubi_ecs_logger import Logger, Severity
# Set some defaults in the start of your app
# If in development mode the lib will output formatted json.
Logger().dev = True
# The minimum level of severity for outputing. E.g. If set to INFO then DEBUG logs will not
# be printed to standard out
Logger().severity_output_level = Severity.INFO
# Set default key/value pairs for the different classes that will always be appended before final output
Logger().defaults = {
"event": {
"test": "test value"
}
}
# Log loaded configuration
Logger().event(
category="configuration",
action="configuration loaded",
dataset="The configuration is loaded from config.yaml"
).out(severity=Severity.INFO)
# Output
# {
# "@timestamp": "2019-07-11T15:11:03.193759+00:00",
# "event": {
# "action": "configuration loaded",
# "category": "configuration",
# "dataset": "The configuration is loaded from config.yaml",
# "test": "test value" # From defaults
# },
# "logline": {
# "level": "INFO"
# }
# }
# Here is a little bit bigger example
Logger() \
.event(category="requests", action="request received") \
.url(path="/test", domain="test.com") \
.source(ip="123.251.512.152") \
.http_response(status_code=200) \
.out(severity=Severity.INFO)
# And here is the output of this one
# {
# "@timestamp": "2019-07-11T15:15:48.896921+00:00",
# "event": {
# "action": "request received",
# "category": "requests",
# "test": "test value" # From defaults
# },
# "httpresponse": {
# "status_code": "200"
# },
# "logline": {
# "level": "INFO"
# },
# "source": {
# "ip": "123.251.512.152"
# },
# "url": {
# "domain": "test.com",
# "path": "/test"
# }
# }
name | version |
---|---|
marshmallow | 3.15.0 |
FAQs
Logger based on Elasticsearch Common Schema.
We found that kubi-ecs-logger 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.