Expand description
Shared infrastructure for confining templated sink outputs to an operator-authored boundary.
Sinks that render templates into security-relevant identifiers (paths, keys, URIs, …) use the helpers in this module to ensure the rendered value cannot escape the literal portion the operator wrote.
Structs§
- Path
Confinement - Confines a rendered filesystem path to a base directory derived from a template’s literal prefix.
Enums§
- Build
Error - Errors raised while building a
PathConfinementfrom a template. - Confine
Error - Errors raised while confining a rendered path against a base directory.
Constants§
- MAX_
RENDERED_ PATH_ LEN - Maximum byte length of a rendered path before it is rejected.
Functions§
- normalize_
lexically - Lexically resolve
.and..in a path without touching the filesystem.