Your organization uses GitHub Actions for CI/CD. You need to ensure that secrets stored in GitHub are not exposed in logs. A developer reports that a secret value appeared in the workflow run log. What is the most likely reason?
Correct: When a script or action writes a secret value to stdout in a format that GitHub's log redaction does not recognize—for example, by printing it in base64, with escaped characters, or through an intermediate environment variable that is not pre-registered as a secret—the automatic masking may fail and expose the value. GitHub masks secrets that appear verbatim in the log, but only if the exact string is seen; any transformation bypasses that protection.
Why this answer
GitHub Actions automatically masks secrets in logs by replacing their values with '***', but this masking can be bypassed if a script transforms the secret (e.g., base64 encoding, splitting, or printing it in a way that changes its exact string) before outputting it. The most likely reason a secret value appeared in the log is that the script printed it in a form that bypassed the automatic masking. This is a known limitation of GitHub's secret masking.
Exam trap
AZ-400 often tests the misconception that GitHub Actions masks secrets in all cases, when in fact masking can be bypassed by transforming the secret value before printing.
How to eliminate wrong answers
Option A is wrong because triggering a workflow via repository_dispatch does not affect secret masking; secrets are still masked regardless of trigger type. Option C is wrong because using the secret name (not its value) in log output is safe — masking applies to the value, not the name. Option D is wrong because enabling debug logging does not disable secret masking; GitHub still masks secrets even in debug logs, though debug logs may reveal more context.