Join our Newsletter — 33% off our NHI Course
Home› FAQ› Cyber Security› What is the difference between running builds on…
Cyber Security

What is the difference between running builds on the Jenkins controller and using isolated agents?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated October 31, 2026 Domain: Cyber Security

Running builds on the controller gives pipeline code direct access to the Jenkins filesystem, workspace, configuration, and encrypted secrets, which concentrates risk in one high-value node. Isolated agents separate execution from control, so a compromised build has a smaller blast radius. That separation also makes it easier to apply tighter permissions and safer network boundaries.

Why controller execution and isolated agents are not the same security model

Running builds on the controller concentrates execution, state, and secrets on the highest-trust Jenkins node. That is operationally convenient, but it means a pipeline step can inherit broad filesystem access and a larger blast radius if it is compromised. Isolated agents shift execution away from the controller so the control plane stays smaller and the build impact is easier to contain.

The distinction is not just about performance or scaling. It changes where code runs, where credentials can be reached, and how much of the Jenkins environment a malicious or buggy build can touch. In practice, the controller should be treated as the orchestration and policy point, while build execution belongs on a constrained worker with only the access it truly needs.

For a broader hardening baseline, the Jenkins Security Guide covers controller isolation, credential scoping, script approval, and related controls that become much more important when build workloads are separated from the controller.

What isolated agents change for access, secrets, and network boundaries

Isolated agents reduce the amount of sensitive material exposed to any one build. That matters when jobs need repository credentials, signing keys, deployment tokens, or access to internal services, because those secrets should be scoped to the agent and the job rather than being effectively reachable from the controller. The same principle applies to network design: the agent should reach only the endpoints required for its build role.

This separation also makes permissions easier to reason about. Instead of assuming every pipeline can see the controller’s workspace, configuration, and stored secrets, you can define tighter worker-level access, ephemeral credentials, and cleaner network egress rules. If a build step is malicious, the compromise tends to stay inside the agent boundary rather than becoming immediate controller compromise.

If you need a concrete example of the consequence of overexposed CI secrets, Homebrew GitHub token exposure 2018 shows how a token exposed through Jenkins could translate into real repository access within minutes.

When the controller still matters, and why agent isolation is not enough on its own

Isolated agents do not remove the need to secure the controller. The controller still defines job orchestration, credential binding policy, plugin behavior, and approval flows, so a weak controller can still expose the entire CI system even if builds do not run there. That is why controller hardening, plugin hygiene, and strict secret handling remain part of the same risk picture.

The practical difference is blast radius. If the controller is also a build host, a single compromise can combine orchestration compromise with execution compromise, which makes response harder and increases the chance of secret theft or lateral movement. With isolated agents, the controller is less exposed to arbitrary build code, so defenders can focus on protecting a smaller, more stable control plane.

OWASP CI/CD Top 10 CICD-SEC-7 Insecure System Configuration Guide is useful here because controller hardening, inventory, patching, and isolation are the controls that prevent the control plane from becoming the easiest target.

Risk and Threat Considerations

Running builds on the controller creates a high-value compromise path because build code, secrets, and orchestration logic meet in one place. A hostile or compromised pipeline step can then access more of the Jenkins environment than it should, which increases the chance of credential theft, workspace tampering, and persistence inside the CI system.

Failure mechanism: The build executes with the controller’s trust context, or with overly broad access to controller-resident files, secrets, and plugins, so a single job compromise can escalate into wider CI compromise or secret exposure.

Impact: The attacker gains a larger blast radius, greater chance of stealing reusable credentials or tokens, and a better position to tamper with subsequent builds or downstream delivery.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP ASVS and NIST SP 800-53 Rev 5 set the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.

FrameworkControl / ReferenceRelevance
OWASP ASVSV6 — AuthenticationJenkins controller and agent access depend on strong authentication and secret handling.
Recommendation — Require strong authentication and scoped credentials for CI users and service access.
NIST SP 800-53 Rev 5IA-5 — Authenticator ManagementCI secret handling and token lifecycle are central to controller and agent separation.
AC-6 — Least PrivilegeIsolated agents are valuable because they reduce the privileges a build can reach.
SC-7 — Boundary ProtectionAgent isolation depends on tighter network boundaries between build hosts and the controller.
Recommendation — Manage build credentials so controller and agent exposure stays tightly bounded. Limit each build host and job to the minimum access required. Segment build networks so agents can reach only approved services.
ISO/IEC 27001:2022A.8.9 — Configuration managementJenkins controller hardening and agent isolation depend on controlled system configuration.
Recommendation — Harden controller and agent configurations and keep them under change control.

Practitioner Guidance

What to verify: Confirm that no untrusted pipeline runs on the controller, and check that the controller does not host secrets or workspace state that should belong on a worker. Also verify that agent access is narrower than controller access, not merely different in name.

Decision rule: If a job can reach sensitive build inputs, deployment credentials, or internal network services, treat agent isolation as the baseline and require tighter scoping, not just a separate machine. If the controller must execute anything, limit it to exceptional administration tasks with explicit approval.

What good looks like: The controller remains a control plane, agents are replaceable and constrained, and a compromised build can be discarded without assuming the controller itself is lost. That is the operating state that meaningfully shrinks blast radius.

Practitioner takeaway: The main security gain from isolated agents is not abstract separation, it is reducing how much trust any single build inherits and making compromise easier to contain, investigate, and recover from.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 31, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org