Expand description
Resource and lifetime guards for trusted interpreter processes.
Structs§
- Process
Group - Abort the whole Unix process group on completion, failure or cancellation. Scripts remain trusted: a child that deliberately creates a new session can escape this cleanup. Windows uses a kill-on-close Job Object.
Constants§
- MAX_
STDERR_ BYTES - MAX_
STDOUT_ BYTES - SECRET_
NAME_ PARTS - Substrings (upper case) of an environment variable name that mark it as a credential.
- SECRET_
NAME_ SUFFIXES - Suffixes (upper case) of an environment variable name that mark it as a credential:
HF_TOKEN,CI_JOB_TOKEN,STRIPE_SECRET,MINIO_ACCESS_KEY. The_TOKENand_ACCESS_KEYcases are the ones no entry inSECRET_NAME_PARTScovers. - STRIPPED_
ENV - Environment variables an interpreter child never inherits.
Functions§
- env_
is_ stripped - Whether an environment variable named
nameis withheld from interpreter children. - read_
bounded - Stop on the first byte beyond the limit, without retaining that excess.