Skip to main content

Security for Jenkinss

Jenkins security is the set of controls that stop unauthorised access and protect secrets: authentication, authorisation, credential handling, script approval, agent isolation and plugin hygiene. It sits in the Managing Jenkins stage, because a CI server holds deployment keys and source code and is a high-value target.

Stage: Managing Jenkins · Part of the Jenkins roadmap · Last reviewed 19 November 2026

What to learn in Security

Security interview questions

Why should you not run builds on the Jenkins controller?

Build code can read files and secrets on the machine it runs on. If it runs on the controller, a malicious or buggy job can access JENKINS_HOME and credentials. Running builds on separate agents with limited rights keeps the controller protected.

How do you avoid leaking secrets in Jenkins logs?

Store secrets as Jenkins credentials and use withCredentials or the credentials helper, which masks values in console output. Never echo them, pass them on a command line that is logged, or hardcode them in a Jenkinsfile that is committed to Git.

Where Security fits in the Jenkins roadmap

Security belongs to the Managing Jenkins stage (intermediate level). Configuration.

Back to the full Jenkins roadmap