Secrets and ordinary variables
GitHub Actions secrets hold sensitive values with access rules and masking behavior; configuration variables are nonsecret settings. Masking is not a guarantee against transformed leakage. Do not echo secrets, place them in artifacts, or pass untrusted input into shell commands unsafely. For example, a nonsecret region is a variable; a credential, if unavoidable, belongs in a protected secret rather than YAML text.
A nonsecret region is a variable; a credential, if unavoidable, belongs in a protected secret rather than YAML text.
A workflow needs a region name and a credential. The region is nonsecret configuration and can appear in ordinary variables. The credential requires a controlled secret reference or, preferably where supported, a temporary identity flow. The job should receive it only when needed and never echo it or copy it into an artifact.
A variable stores ordinary configuration. A secret is a sensitive value with access and masking behavior. Masking hides some recognized log occurrences, not every transformed representation. Encoding, slicing, or sending the value to another endpoint can still leak it. Treat diagnostics as a potential exposure path. A fake credential in a teaching draft is not proof that repository secret configuration exists. Avoid passing secrets to untrusted code or broadly scoped third-party actions. Moving a value into a secret store improves source hygiene but does not remove the need for limited authority, rotation, and careful runtime handling.
A nonsecret region is a variable; a credential, if unavoidable, belongs in a protected secret rather than YAML text.
Do not overlook this operational distinction: Do not echo secrets, place them in artifacts, or pass untrusted input into shell commands unsafely.