An environment variable is a named string that the operating system passes to a process, widely used to supply configuration and credentials to programs.
An environment variable is a name-value pair inherited by a process from its parent. POSIX defines the model: when a program starts, it receives an environment array that it can read with calls such as getenv. Because child processes inherit it, a variable set in a shell is visible to every command launched from that shell. The twelve-factor method recommends storing config, including credentials, in the environment rather than in code, and nearly every runtime, container platform and CI service supports it. The weaknesses are well known. Environment variables are visible to the process's whole tree, can appear in crash dumps, debug pages and logs that print the environment, and on some systems can be read by other processes of the same user or through /proc. Docker's inspect output and CI logs can expose them. CWE-526 describes the weakness of storing sensitive data in an environment variable. Safer options include mounting secrets as files with tight permissions, fetching them from a secrets manager at start-up, using short-lived tokens, and masking known values in logs. When variables are the only option, scope them to a single command instead of exporting them in a shell profile. BotPassword supplies values to one command at a time via run_with.