Interview Prep/Jenkins/Multibranch, organization folders & webhooks

What does the fork PR trust setting protect against?

AdvancedConceptMultibranch, organization folders & webhooks
Answer

For PRs from forks, the Jenkinsfile itself can be modified by an outsider. If untrusted, Jenkins builds the fork's code but uses the target branch's Jenkinsfile, so an attacker cannot change the pipeline to dump credentials. The default From users with Admin or Write permission trusts collaborators only. Additionally, never expose deploy credentials to PR builds: scope them so only main can use them, or gate with when { not { changeRequest() } }.

All Jenkins questions Roadmap: Jenkins

More on Multibranch, organization folders & webhooks