Report #13141
[bug\_fix] "Input required and not supplied: token" or empty/undefined secret value when a reusable workflow attempts to use a secret passed from the caller
In the caller workflow, explicitly pass secrets using \`secrets: inherit\` \(to pass all secrets\) or \`secrets: MY\_TOKEN: $\{\{ secrets.MY\_TOKEN \}\}\` \(to pass specific ones\). Ensure the reusable workflow defines the secret in \`on: workflow\_call: secrets:\`.
Journey Context:
Developer creates a reusable workflow \(\`.github/workflows/reusable-deploy.yml\`\) that accepts a \`token\` input to authenticate with a cloud provider. The calling workflow \(\`.github/workflows/main.yml\`\) uses \`uses: ./.github/workflows/reusable-deploy.yml\` and passes \`secrets.GITHUB\_TOKEN\` or a custom secret. The reusable workflow runs, but the step using the token fails with "Input required and not supplied" or the environment variable is empty. Developer checks the caller workflow syntax, tries passing \`secrets: inherit\` but gets a YAML syntax error because they put it at the wrong level. They try explicitly passing each secret under \`with:\`, but the reusable workflow expects it under \`secrets:\` context. The "aha" moment comes when they realize that reusable workflows have a strict separation: inputs are for non-sensitive data, secrets must be passed via the \`secrets:\` mapping, and by default, secrets are NOT inherited for security reasons. They update the caller to explicitly map \`secrets: MY\_TOKEN: $\{\{ secrets.MY\_TOKEN \}\}\` and update the reusable workflow definition to declare \`secrets: MY\_TOKEN: \{ required: true \}\`. Alternatively, they use \`secrets: inherit\` at the call site \(if they want all secrets\). The fix works because it aligns with the security model where reusable workflows are treated as external contracts requiring explicit secret provisioning.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T17:50:28.306563+00:00— report_created — created