Tracking issue for the Hydra 1.4 line.
The instantiate blocklist is defense-in-depth and cannot be a complete security
boundary. For 1.4, move hydra.utils.instantiate() toward a stricter
allowlist-based model for selecting _target_ values.
Proposed direction:
-
Users declare trusted module patterns that Hydra is allowed to instantiate,
for example:
hydra:
instantiate:
allowlist:
- my_app.*
- sam2.*
- hydra_plugins.*
-
The allowlist must come from trusted application code/configuration, not from
untrusted config being instantiated.
-
Block or reject targets outside the allowlist with an actionable error.
-
Point the error to migration documentation.
-
Document how applications that consume untrusted or semi-trusted config should
configure allowed targets.
This is expected to be a breaking change and should include migration docs.
Tracking issue for the Hydra 1.4 line.
The instantiate blocklist is defense-in-depth and cannot be a complete security
boundary. For 1.4, move
hydra.utils.instantiate()toward a stricterallowlist-based model for selecting
_target_values.Proposed direction:
Users declare trusted module patterns that Hydra is allowed to instantiate,
for example:
The allowlist must come from trusted application code/configuration, not from
untrusted config being instantiated.
Block or reject targets outside the allowlist with an actionable error.
Point the error to migration documentation.
Document how applications that consume untrusted or semi-trusted config should
configure allowed targets.
This is expected to be a breaking change and should include migration docs.