How do you secure Jenkins?
⚡
Quick Answer
Enforce authentication and role-based access control, store secrets in the credentials store (never in job config), run over HTTPS, keep Jenkins and plugins patched, and isolate build agents from the controller.
Detailed Answer
Jenkins is a high-value target because it can deploy to production. Harden it with least-privilege RBAC (matrix/role strategy), the Credentials plugin with scoped secrets, agent isolation so untrusted builds cannot reach the controller, restricted script approval for Groovy, audit logging, and a disciplined plugin diet to shrink the vulnerability surface.
💡
Interview Tip
Call out that Jenkins can deploy to prod, so it is a prime target — RBAC, scoped credentials, and agent isolation are the big three.
jenkinssecurityrbac