Skip to content

fix(components): replace eval() with ast.literal_eval() for safe metadata parsing#113

Merged
janickm merged 1 commit into
NVIDIA:mainfrom
janickm:dev/janickm/fix-eval-to-literal-eval
May 15, 2026
Merged

fix(components): replace eval() with ast.literal_eval() for safe metadata parsing#113
janickm merged 1 commit into
NVIDIA:mainfrom
janickm:dev/janickm/fix-eval-to-literal-eval

Conversation

@janickm
Copy link
Copy Markdown
Collaborator

@janickm janickm commented May 15, 2026

Summary

  • Replace eval() with ast.literal_eval() in PosesComponent.Reader for parsing tuple keys from zarr metadata
  • eval() is a code execution vector; ast.literal_eval() safely parses Python literals without executing arbitrary code
  • Drop-in replacement -- behavior is identical for the tuple string keys stored in zarr attrs

@janickm janickm self-assigned this May 15, 2026
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 15, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@janickm janickm force-pushed the dev/janickm/fix-eval-to-literal-eval branch from 26115db to 62fceb1 Compare May 15, 2026 09:49
@janickm
Copy link
Copy Markdown
Collaborator Author

janickm commented May 15, 2026

/ok to test 62fceb1

@janickm janickm force-pushed the dev/janickm/fix-eval-to-literal-eval branch from 62fceb1 to aa6fabb Compare May 15, 2026 11:10
@janickm janickm merged commit e31874b into NVIDIA:main May 15, 2026
5 checks passed
@janickm janickm deleted the dev/janickm/fix-eval-to-literal-eval branch May 15, 2026 11:35
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