Jenkins is a free automation server that builds, tests and ships software, often using stored secrets to do it.
This guide is for anyone who has heard that their team "uses Jenkins" and wants to know why it needs care. You do not need to write code to be affected: if your firm ships an app or a website, a build server may hold the keys to it.
In short
- Jenkins runs jobs for your team, and those jobs often use stored secrets such as API tokens and keys.
- Anyone with full admin rights in Jenkins can run any script on it, so keep that group small.
- Run builds on separate machines called agents, not on the main Jenkins server.
- Keep plugins few and up to date, and give every stored secret an owner and a narrow job.
What you will learn
- Explain what Jenkins does and why it holds secrets.
- Spot the settings that give someone near full control.
- Check who can see and use the secrets in your Jenkins.
- Ask your team four simple questions about plugins and builds.
- Build server (Jenkins controller)
- the main computer that stores settings and secrets and hands out work.
- Software password (API token)
- a secret code a program shows to another service to prove it may connect.
- Add-on (plugin)
- an extra piece of software that adds features to Jenkins.
This is an independent guide from NHI Mgmt Group, based on Jenkins's public documentation as of December 2026. It is not sponsored or reviewed by the Jenkins project. Product features change, so confirm settings against the current Jenkins documentation.
What is Jenkins?
Think of the key cabinet in a building site office. The site manager keeps keys to every van, store and gate in it, and hands them to workers for each task. Jenkins plays that role for software.
Jenkins is a free, open source automation server. Teams use it to build, test and deliver software [1]. A job (a set of steps Jenkins runs for you) might fetch code, test it and send it to a cloud account.
To reach those places, jobs need secrets. Jenkins can store API tokens, user names with passwords, secret files, SSH keys and certificates [2]. These are non-human identities: credentials used by software, not by a person.
Where the comparison stops working: a missing key leaves an empty hook. A copied secret leaves no gap, so nobody may notice it has gone.
Why does it matter?
One Jenkins server can hold secrets for many systems at once. If the wrong person gets full control of it, they may reach all of them.
If you manage a software team
What could happen: too many people hold full admin rights, so one stolen account opens every secret.
Check this: ask for the list of Jenkins admins and why each one needs it.
If you are new to IT work
What could happen: a secret you add for one job can be used by many other jobs.
Check this: ask which jobs may use a secret before you add it.
If you own a small business
What could happen: a supplier's build server holds the keys to your website or app store account.
Check this: ask your supplier where those keys are kept and who can use them.
What does it look like?
Here is a made-up list of stored secrets. An admin sees a list like this in Jenkins.
Example only. All values are made up.
Stored credentials (EXAMPLE list) ID: cloud-deploy-key Kind: secret text Scope: Global (1) ID: code-host-token Kind: secret text Scope: Global (2) ID: old-ftp-password Kind: user/password Scope: Global (3) ID: FAKE-test-0000 Kind: secret file Scope: System (4) Description: (empty) Owner: (unknown) (5)
- In a real file, this line would contain the name of a key that can change a cloud account.
- A token for the place where the code lives. It may let a job change code.
- An old password nobody has removed. It may still work.
- A secret kept for Jenkins itself, not for jobs.
- No description and no owner, so nobody knows if it is still needed.
Why this is risky: "Global" secrets can be used by many jobs. Secrets with no owner are easy to forget while they still work.
The safer way: give each secret a clear name, an owner and a note. Limit it to the folder that needs it. Remove what is unused.
How does it work?
- People sign in. By default, Jenkins does not allow anonymous access, and its setup wizard creates one admin user [1].
- Admins store secrets. Jenkins keeps stored credentials encrypted on the controller, and jobs refer to them by an ID, not by the value [2].
- The controller hands out work. Builds can run on the controller, but the Jenkins docs advise against it. A build there has the same access to the controller's files as Jenkins itself [4].
- Agents run the builds. An agent is a separate machine that runs jobs. The docs say to set the controller's own build slots to zero once agents are ready [4].
- Plugins add features. Plugins are the main way to extend Jenkins. The docs advise removing plugins you no longer use [5]. Security fixes are listed on the Jenkins security advisories page [7].

One part needs special care. The script console is an admin screen that runs any script typed into it. The Jenkins docs warn that scripts there can bypass all security controls and reach any data [3]. Only users with the Administer permission can open it [3]. The docs also say there are no limits to what a full admin can do in Jenkins [6].
A worked example
Dev Rinaldi looks after the delivery app at Pine Couriers. The app is built by a Jenkins server that a contractor set up two years ago. Dev is not a security expert, but a new manager asks a simple question: "What can that server reach?"
Dev opens the list of stored credentials. There are eleven. Most are marked Global, and only three have a description. One is a password for an old file server the firm stopped using last year.
Next, Dev checks who has full admin rights. Seven people do, including two contractors who have left. Dev learns that admin rights include the script console, which can run any script on the server. Dev asks the manager to approve a smaller admin group of two people.
Then Dev looks at where builds run. All of them run on the controller itself. The Jenkins docs advise moving builds to separate agents. Dev books time to add one agent and set the controller's build slots to zero.
Last, Dev looks at plugins. There are 60, and nobody knows why some were added. Dev makes a list, marks the ones the team still uses and plans to remove the rest in stages, testing as they go.
By the end of the week, the old password is deleted and the two contractor accounts are gone. Each remaining secret has an owner and a note. Dev also adds the Jenkins security advisories page to the team's weekly check, so updates are applied promptly.
Nothing dramatic happened. The server simply holds fewer secrets, and fewer people can reach them.
Myths and mistakes
| What people think | What is true |
|---|---|
| Secrets in Jenkins are encrypted, so they are safe. | They are stored encrypted, but jobs and admins can still use them. Who can run a job matters as much as how it is stored. |
| Giving someone script console access is a small favour. | The Jenkins docs say it is essentially the same as making them an administrator. |
| Running builds on the main server is fine for a small team. | A build there can reach the controller's files. Use a separate agent, even just one. |
| More plugins mean more features at no cost. | Each plugin is more code to update. Keep the ones you use and remove the rest. |
| Uninstalling a plugin removes everything it set up. | The docs say its saved settings can stay behind. Check what is left. |
What can I do this week?
- List everyone with full admin rights and remove anyone who has left or no longer needs it.
- Open the stored credentials list and add an owner and a note to each one.
- Delete any secret for a system you no longer use. Then turn it off at the other end too.
- Check whether builds run on the controller, and plan a move to an agent if they do.
- Check the Jenkins security advisories page each week and apply updates.
Checklist
- Only a small, named group holds full admin rights.
- Anonymous visitors cannot see jobs or settings.
- Every stored secret has an owner and a description.
- Secrets are limited to the folders or jobs that need them.
- Unused secrets have been removed in Jenkins and changed at the other service.
- Builds run on agents, and the controller's build slots are set to zero.
- Plugins are reviewed, and unused ones are removed.
- Someone checks the Jenkins security advisories and applies updates.
Common questions
Does Jenkins encrypt the secrets it stores?
Yes. The Jenkins docs say stored credentials are kept in encrypted form on the controller, and jobs refer to them by ID. That protects the stored copy, but any job or admin allowed to use a secret can still use it, so access rules matter too.
What is the script console, and why does it matter?
It is an admin screen that runs any script on Jenkins or its agents. The docs warn that such scripts can bypass all security controls and reach any data. Treat access to it as full admin access, and keep that group small.
Why should builds not run on the main server?
A build on the controller has the same access to its files as Jenkins itself. That includes settings and stored secrets. The Jenkins docs advise running builds on separate agents and setting the controller's own build slots to zero.
Are API tokens in Jenkins the same as a person's password?
No. An API token is a secret that a program uses to reach another service, such as a code host or cloud account. It is a non-human identity, so it needs an owner, a narrow purpose and a plan to change it.
How do I keep up with Jenkins security fixes?
Watch the Jenkins security advisories page, which lists every advisory the project has published. Jenkins also checks its update site for plugin updates every 24 hours by default, so review the Updates tab and apply fixes promptly.
Where next?
Ready for the detail? Read the practitioner guide: Jenkins Security Guide. It goes further into permission settings, credential scopes and binding, script approval and swapping stored cloud keys for short-lived tokens.
Also useful:
- How to audit Jenkins credentials and secrets
- How to federate Jenkins to AWS, Azure and Google Cloud with OIDC instead of stored keys
- CI/CD Pipeline Identities for Beginners
- Secrets in Code for Beginners
Related NHI Mgmt Group resources: CI/CD Security Guide, Leaked Secret Response for Beginners and Service Accounts for Beginners.
Key terms
- CI/CD pipeline
- The automated steps that build, test and deliver software, often using stored secrets to reach other systems.
- API key
- A secret code a program uses to prove it may call another service.
- Credential store
- The place that holds secrets such as tokens, keys and certificates; in Jenkins, the credentials store on the controller.
- CI/CD secret
- A secret that build or deployment tools use to reach code hosts, cloud services or package stores.
- Least privilege
- Giving each person, program or job only the access it needs, and no more.
- Script console access
- The right to use the Jenkins admin screen that runs any script, which is why access to it equals full admin access.
- Build agent
- A separate machine that runs Jenkins builds, so the main server does not have to.
Sources and further reading
- Jenkins project, "Jenkins User Documentation" and "Securing Jenkins", jenkins.io. https://www.jenkins.io/doc/book/security/ and https://www.jenkins.io/doc/ (accessed 2 Dec 2026).
- Jenkins project, "Using credentials", Jenkins User Handbook. https://www.jenkins.io/doc/book/using/using-credentials/ (accessed 2 Dec 2026).
- Jenkins project, "Script Console", Jenkins User Handbook. https://www.jenkins.io/doc/book/managing/script-console/ (accessed 2 Dec 2026).
- Jenkins project, "Controller Isolation", Jenkins User Handbook. https://www.jenkins.io/doc/book/security/controller-isolation/ (accessed 2 Dec 2026).
- Jenkins project, "Managing Plugins", Jenkins User Handbook. https://www.jenkins.io/doc/book/managing/plugins/ (accessed 2 Dec 2026).
- Jenkins project, "Permissions", Jenkins User Handbook. https://www.jenkins.io/doc/book/security/access-control/permissions/ (accessed 2 Dec 2026).
- Jenkins project, "Security Advisories". https://www.jenkins.io/security/advisories/ (accessed 2 Dec 2026).