ASM.EnvSnapshot (ASM v0.10.0)

Copy Markdown View Source

Allowlist filter for the config/runtime.exs environment snapshot.

ASM copies OS environment variables into Application config for its explicit environment access layer at boot. Copying the whole environment would spread every unrelated secret in the parent process into inspectable Application config (Application.get_all_env/1, :observer, crash dumps), so only the variables ASM reads are taken: the provider namespaces (which cover ASM.RuntimeAuth's per-provider auth env keys) plus a small static set.

Summary

Functions

Whether a variable name is admitted into the snapshot.

Variable-name prefixes admitted by the allowlist.

Static (non-prefixed) variable names in the allowlist.

Filters an OS environment map down to the variables ASM reads.

Functions

allowed?(key)

@spec allowed?(String.t()) :: boolean()

Whether a variable name is admitted into the snapshot.

prefixes()

@spec prefixes() :: [String.t()]

Variable-name prefixes admitted by the allowlist.

static_vars()

@spec static_vars() :: [String.t()]

Static (non-prefixed) variable names in the allowlist.

take(os_env)

@spec take(%{optional(String.t()) => String.t()}) :: %{
  optional(String.t()) => String.t()
}

Filters an OS environment map down to the variables ASM reads.