Interview Prep/CI/CD/Secrets and Credentials

How do you handle secrets for pull requests from forks?

AdvancedProductionSecrets and Credentials
Answer

Do not expose them. GitHub already withholds secrets from fork pull_request runs; GitLab protects variables by default for unprotected refs; Jenkins multibranch uses trust strategies. Fork PRs run only unprivileged checks (build, unit tests). If you need privileged follow-up (deploy preview, comment), split into a second workflow triggered after approval or via workflow_run, which treats PR artifacts as untrusted data and never executes them with secrets.

All CI/CD questions

More on Secrets and Credentials