Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-63421] Add agentServiceAccounts optional config #246

Closed
wants to merge 1 commit into from

Conversation

scurvydoggo
Copy link
Member

This is intended to address: JENKINS-63421.

This plugin assigns Jenkins permissions based on their GitHub permissions - if a user can read a repo then they can view and execute the job.

However there exists no role that to represent the service account used by Jenkins agents to connect to the controller. This means that plugin users are forced to make the service account an admin, and this presents a security risk because the service account credentials exist on every agent if you know where to look.

An attacker can take the credentials from the agent and use them to become a Jenkins admin.

Our fork introduces a configurable agentServiceAccounts field which has the proper, reduced permissions.

image

Testing done

Unit tests have been included in the commit.

This has been deployed to production on our instance and it's been working well. We use the CasC plugin and so can verify that works too.

Submitter checklist

Apply the principle of least privilege for agents connecting via service accounts (they are currently admins)
@scurvydoggo
Copy link
Member Author

Closing this as it's a duplicate PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant