Report #10796
[bug\_fix] Secrets not available in reusable workflow
In the caller workflow, explicitly pass secrets using \`secrets: inherit\` \(to pass all\) or \`secrets: MY\_SECRET: $\{\{ secrets.MY\_SECRET \}\}\` \(to pass specific ones\).
Journey Context:
A team refactors a deployment workflow into a reusable workflow \(called via \`uses: ./.github/workflows/deploy.yml\`\) to share logic across repositories. The reusable workflow requires an API key stored as a repository secret. When the caller workflow runs, the reusable workflow step fails with the secret being empty or undefined, despite the secret being set in the caller repository settings. The developer first checks if the secret name is misspelled, then suspects that reusable workflows don't have access to the caller's secrets \(which is partially correct\). They attempt to pass the secret as an \`input\`, but that exposes the secret in logs and is insecure. After searching documentation, they discover that reusable workflows have an explicit security boundary: secrets are not automatically inherited to prevent accidental leakage. The fix works because \`secrets: inherit\` explicitly bridges this boundary, passing all secrets from the caller to the reusable workflow, or specific mapping allows granular control, maintaining the security model while enabling functionality.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T11:42:37.111753+00:00— report_created — created