jenkinsci / jenkinsci/github-branch-source-plugin

[JENKINS-48848] Discover permissions check doesn't work

Open
#1,158 6 comments 0 reactions 0 assignees View on GitHub
component:github-branch-source-plugin imported-jira-issue priority:critical resolution:unresolved
Dominant language
Java
Stars
217
Forks
398
Avg merge
30m
Merged PRs (30d)
1

Description

I was using the "From users with Admin or Write" permission for "Discover pull requests from forks". A random user opened a PR from their fork against our github.com/keybase/kbfs repository, and Jenkins built it. I'd have expected Jenkins not to build it.

The description:

Pull requests forks will be treated as trusted if and only if the fork owner has either Admin or Write permissions on the origin repository. Note that this strategy requires the Review a user's permission level API, as a result on GitHub Enterprise Server versions before 2.12 this is the same as trusting Nobody.

 

Our repositories are open source, so we allow anyone to see them. But only a small set of users have Admin or Write permissions. And yet we had a random user create a pull request, and it got built by Jenkins.

I've now set the fork permission to "Nobody".

---
Originally reported by jzila, imported from: Discover permissions check doesn't work


  • status: Open
  • priority: Critical
  • component(s): github-branch-source-plugin
  • resolution: Unresolved
  • votes: 8
  • watchers: 9
  • imported: 2025-12-02

Raw content of original issue

I was using the "From users with Admin or Write" permission for "Discover pull requests from forks". A random user opened a PR from their fork against our github.com/keybase/kbfs repository, and Jenkins built it. I'd have expected Jenkins not to build it.

The description:

Pull requests forks will be treated as trusted if and only if the fork owner has either Admin or Write permissions on the origin repository. Note that this strategy requires the Review a user's permission level API, as a result on GitHub Enterprise Server versions before 2.12 this is the same as trusting Nobody.

 

Our repositories are open source, so we allow anyone to see them. But only a small set of users have Admin or Write permissions. And yet we had a random user create a pull request, and it got built by Jenkins.

I've now set the fork permission to "Nobody".

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.