> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/appsec-rules/ci-cd-security/pipeline-based-access-controls/appsec-cicd-55.md).

# Jenkins jobs can be executed with high privileges

## Rule Details

|                       |                                |
| --------------------- | ------------------------------ |
| Cortex AppSec Rule ID | APPSEC\_CICD\_55               |
| Category              | Pipeline Based Access Controls |
| Severity              | MEDIUM                         |

## Impact

Each executed Jenkins job is assigned with the privileges of a Jenkins user. These privileges are used to interact with the Jenkins system, and include creating jobs, running builds, and executing on the various configured Jenkins nodes. The current authorization configuration on the Jenkins instance allows administrators to configure it to run with the Jenkins SYSTEM user account (that should not be confused with the operating system user). This user account has high privileges over the system, and is allowed to perform any action on the Jenkins instance. Any job configured to run with the context of this user account allows an attacker executing malicious code in the job to take advantage of it to perform impactful actions on the Jenkins instance and its nodes. For more information about access controls for builds: <https://www.jenkins.io/doc/book/security/build-authorization/>

## Recommended Solution - Buildtime

Prevent job administrators from configuring jobs to run with the SYSTEM user account:

1. Install the **Authorize Project** plugin.
2. On the Jenkins instance, under **Manage Jenkins**, browse to **Configure Global Security**.
3. Configure the **Per-project configurable Build Authorization** setting to NOT include the **Run as SYSTEM** strategy, to prevent it from being configured for specific jobs. In addition, set at least one of the following strategies:

* **Run as Anonymous**
* **Run as User who Triggered Build**
* **Run as Specific User**

**📌 NOTE**\
Follow the least privilege principle when configuring a job to run by a specific user.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/appsec-rules/ci-cd-security/pipeline-based-access-controls/appsec-cicd-55.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
