
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).
Validate and serialize YAML config files with Pydantic, with support for environment variables.
Validate and serialize YAML config files with Pydantic, with support for environment variables.
This package uses uv for project management. To get started, ensure that uv is installed on your machine and updated to the 0.5.6
version. Detailed installation instructions for uv can be found here.
uv add pyamldantic
config.yaml
database:
host: $DATABASE_HOST
name: $DATABASE_NAME
password: $DATABASE_PASSWORD
port: $DATABASE_PORT
user: $DATABASE_USER
timeout: $DATABASE_TIMEOUT?
environment: development
is_debug: true
config.py
from pyamldantic import YAMLConfig
from pydantic import BaseModel, SecretStr
class DatabaseSchema(BaseModel):
host: str
name: str
password: SecretStr
port: int
user: str
ssl: bool = False
timeout: int | None = None
class Schema(BaseModel):
database: DatabaseSchema
environment: str
is_debug: bool
config = YAMLConfig.load("config.yaml", schema=Schema)
main.py
from .config import config
if __name__ == "__main__":
print(f"Initializing {config.environment} environment...")
...
uv sync --frozen --group=development
uv run --frozen pre-commit install --install-hooks
uv run --frozen pre-commit install --hook-type=commit-msg
uv sync --frozen --group=testing
uv run --frozen pytest
This project was inspired by envyaml.
Contributions are welcome! To get started, please refer to our contribution guidelines.
If you encounter any problems while using this package, please open a new issue here.
FAQs
Validate and serialize YAML config files with Pydantic, with support for environment variables.
We found that pyamldantic 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.