Skip to content

fix: use safe YAML loader for configs#312

Merged
LauraGPT merged 1 commit into
mainfrom
codex/safe-yaml-loader
Jul 10, 2026
Merged

fix: use safe YAML loader for configs#312
LauraGPT merged 1 commit into
mainfrom
codex/safe-yaml-loader

Conversation

@LauraGPT

@LauraGPT LauraGPT commented Jul 9, 2026

Copy link
Copy Markdown
Member

Switch config parsing from yaml.Loader to yaml.SafeLoader so model config.yaml files are parsed as data only.

This addresses the unsafe deserialization path reported in #311. A crafted YAML file using Python object tags is now rejected by PyYAML instead of being constructed at load time.

Verification run on ind-gpu8:

  • python3 -m py_compile utils/infer_utils.py
  • git diff --check
  • targeted read_yaml smoke test with a normal config and a !!python/object/apply payload, confirming the latter raises ConstructorError

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant