Pcornel
Automation · Secrets & Credentials

Environment Variables

Cheat sheet · https://pcornel.dk/topic.php?topic=5895

Back to the Topic

Answer

Environment Variables are a common runtime injection channel for configuration and secrets, but they are process state—not a secret store—and can leak through debugging, child processes, crash reports, orchestration metadata and environment dumps.

Remember

  • Environment variable ≠ secret store.
  • Masked CI variable ≠ invisible to process/debug tooling.
  • Not written to disk explicitly ≠ never persisted by runtime or crash tooling.
  • Variable unset in shell ≠ removed from already-started child processes.

First checks

  • printenv | grep -i -e token -e secret — secrets in env (check carefully)
  • CI masked variables — protection
  • Process listing exposure (/proc/<pid>/environ) — risk

Verify in this order

secret store → env var → process

Where it usually breaks

Environment-variable evidence proves the configured injection and inspected process boundaries only; it cannot guarantee absence from all runtime memory, dumps or platform telemetry.

Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness. Preserve at least three independent checks: prerequisite/interface or identity/transport state; the owning control/service/policy state; then effective data-plane, backend or workload state. A healthy upstream boundary does not prove the downstream consumer or return path.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5895

Confirmation

Confirm action

Continue?