Interview Prep/GitHub Actions/Secrets, Variables, Environments & Permissions

What happens if a secret is printed in a different encoding, or split across lines?

IntermediateConceptSecrets, Variables, Environments & Permissions
Answer

It leaks. Masking replaces exact substrings only. echo $SECRET | base64, echo ${SECRET:0:10}, jq reformatting, or set -x output with escaping can all print unmasked forms. Never print secrets, avoid set -x in steps with secrets, and add masks for transformed forms you must generate (echo "::add-mask::$(echo -n "$S" | base64)"). Treat log access as secret access when in doubt, and rotate on any suspicion.

All GitHub Actions questions Roadmap: GitHub Actions

More on Secrets, Variables, Environments & Permissions