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() } }.
More on Multibranch, organization folders & webhooks
How does a multibranch pipeline work?BeginnerWhat is branch indexing and what triggers it?BeginnerWhat are the discovery traits in the GitHub branch source?IntermediateWhat environment variables are set for PR builds?BeginnerWhat is an organization folder?IntermediateHow does a GitHub webhook reach Jenkins and what URL do you configure?Beginner