Skip to content

Improve safety and robustness of configuration parsing in TestEnv and Dataset #317

@yoursanonymous

Description

@yoursanonymous

What would you like to be added/modified:

I propose refactoring the configuration parsing logic in the TestEnv and Dataset core classes to move away from dynamic attribute assignment (self.dict[k] = v).

Why is this needed:

The current reliance on dict for configuration parsing presents several issues:

  • Security Risks: It allow for uncontrolled attribute injection, where any key in a user supplied YAML file becomes an attribute on a core class instance. This could lead to unintended state manipulation.

  • Low Maintainability: It is difficult to distinguish between the class's intended internal state and parameters dynamically added from configuration files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions