1. Resources
  2. Detection rules
  3. CI/CD Job Token Allowlist Opened in GitLab

CI/CD Job Token Allowlist Opened in GitLab detection rules

A project's CI/CD job token allowlist is disabled, or another project or a whole group is added to it. Job tokens from pipelines in other projects can then reach the project's packages, releases, deployments and job artifacts.

Platform
GitLab
Severity
Medium
Log source
GitLab audit events
Last updated
Rule formats
Sigmaand queries for: Splunk
What an attacker needs
The Maintainer or Owner role on the project, plus a pipeline in another project that the attacker can influence.
Impact
Job tokens from other projects can reach the project's packages, releases, deployments and job artifacts with the triggering user's permissions.
Response
Enable the allowlist again, remove unexplained entries, and treat what was published to the project in the meantime as untrusted.
Mitigation
Enforce the job token allowlist for all projects on the instance, and add single projects with fine-grained permissions instead of groups.
Audit events
secure_ci_job_token_group_addedsecure_ci_job_token_inbound_disabledsecure_ci_job_token_project_addedsecure_ci_job_token_policies_updated
Threat groups
None listed in MITRE ATT&CK for this technique

How the attack works

Every CI/CD job receives a job token, CI_JOB_TOKEN, that is valid only while the job runs and carries the access of the user who triggered the pipeline, limited to a set of resources such as the container and package registries, releases, deployments, job artifacts and parts of the API. A job can use its token against another project only when the job's project or group is on that project's job token allowlist. By default the allowlist of a project contains only the project itself.

The allowlist is therefore the boundary that keeps a compromised pipeline in one project away from the others. A user with the Maintainer or Owner role can move that boundary in three ways. They can disable the allowlist, after which jobs from any project can access the project with a job token. GitLab calls this a security risk and offers the option only on GitLab Self-Managed and GitLab Dedicated instances that do not enforce the allowlist. They can add a project, or a group, in which case every project of that group is covered, including projects created later. And they can change the fine-grained permissions of an entry. GitLab records these as secure_ci_job_token_inbound_disabled, secure_ci_job_token_project_added, secure_ci_job_token_group_added and secure_ci_job_token_policies_updated.

What an attacker needs

  • The Maintainer or Owner role on the project whose allowlist is changed.
  • For the attack to pay off, a pipeline in another project that the attacker can influence and that is triggered by a user with access to the target project. GitLab notes that adding a project to the allowlist gives its members no additional permissions.
  • Log collection: audit event streaming (Ultimate) for the top-level group or the instance, to an HTTP destination, received as JSON.

Impact

A job in a project that the attacker controls can use its token against the target project with the permissions of the user who triggered it. GitLab's list of what a job token can access includes the Packages, Releases, Deployments and Environments APIs, the download of job artifacts and the endpoint that triggers a pipeline. GitLab's own example is a malicious user who compromises a pipeline in an unauthorized project that one of your maintainers runs. Where cross-project Git push is allowed for allowlisted projects, an entry with repository permissions also lets a job token push commits.

Detection rules

GitLab Group Added to a CI/CD Job Token Allowlist

Detects a group being added to the CI/CD job token allowlist of a project (audit event type secure_ci_job_token_group_added, GitLab 17.3 and later). A group entry gives the job tokens of every project in that group access to the project, and GitLab notes that projects added to the group later are included without any change to the allowlist. One entry can therefore open a publishing project to many pipelines. The Maintainer or Owner role on the project is enough to add it. The event type reference lists the event without its fields, so the rule matches on the event type. The project whose allowlist changed is in entity_path.

LevelMediumStatusExperimentalLog sourceGitLab audit events
title: GitLab Group Added to a CI/CD Job Token Allowlist
id: 6240c624-71fc-473a-bf1f-f721e095090f
status: experimental
description: >-
  Detects a group being added to the CI/CD job token allowlist of a
  project (audit event type secure_ci_job_token_group_added, GitLab 17.3
  and later). A group entry gives the job tokens of every project in that
  group access to the project, and GitLab notes that projects added to
  the group later are included without any change to the allowlist. One
  entry can therefore open a publishing project to many pipelines. The
  Maintainer or Owner role on the project is enough to add it. The event
  type reference lists the event without its fields, so the rule matches
  on the event type. The project whose allowlist changed is in
  entity_path.
references:
  - https://docs.gitlab.com/user/compliance/audit_event_types/
  - https://docs.gitlab.com/ci/jobs/ci_job_token/
  - https://attack.mitre.org/techniques/T1484/
author: Forestall
date: 2026-11-18
tags:
  - attack.defense-impairment
  - attack.privilege-escalation
  - attack.t1484
logsource:
  product: gitlab
  service: audit
detection:
  selection:
    event_type: secure_ci_job_token_group_added
  condition: selection
falsepositives:
  - Platform teams that give all projects of their own group access to a shared project, for example a package registry. Confirm the group with the owner of the project and prefer fine-grained permissions for the entry.
level: medium

False positives

  • Platform teams that give all projects of their own group access to a shared project, for example a package registry. Confirm the group with the owner of the project and prefer fine-grained permissions for the entry.

GitLab CI/CD Job Token Allowlist Disabled

Detects the audit event type secure_ci_job_token_inbound_disabled, which GitLab describes as CI_JOB_TOKEN permissions disabled for inbound. The setting behind it is the job token allowlist of a project, named inboundJobTokenScopeEnabled in the GraphQL API. With the allowlist disabled, jobs from any project can access the project with a job token, limited by the permissions of the user who triggered the pipeline. GitLab calls this a security risk and says the allowlist should be enabled again as soon as possible. In the GitLab source the event is written when the setting becomes false. That reading is not stated on the event type page, so confirm it with a test project.

LevelHighStatusExperimentalLog sourceGitLab audit events
title: GitLab CI/CD Job Token Allowlist Disabled
id: 845b5f7b-5ee4-4151-8a03-6f8ef7e19033
status: experimental
description: >-
  Detects the audit event type secure_ci_job_token_inbound_disabled, which
  GitLab describes as CI_JOB_TOKEN permissions disabled for inbound. The
  setting behind it is the job token allowlist of a project, named
  inboundJobTokenScopeEnabled in the GraphQL API. With the allowlist
  disabled, jobs from any project can access the project with a job
  token, limited by the permissions of the user who triggered the
  pipeline. GitLab calls this a security risk and says the allowlist
  should be enabled again as soon as possible. In the GitLab source the
  event is written when the setting becomes false. That reading is not
  stated on the event type page, so confirm it with a test project.
references:
  - https://docs.gitlab.com/user/compliance/audit_event_types/
  - https://docs.gitlab.com/ci/jobs/ci_job_token/
  - https://attack.mitre.org/techniques/T1484/
author: Forestall
date: 2026-11-18
tags:
  - attack.defense-impairment
  - attack.privilege-escalation
  - attack.t1484
logsource:
  product: gitlab
  service: audit
detection:
  selection:
    event_type: secure_ci_job_token_inbound_disabled
  condition: selection
falsepositives:
  - A Maintainer who disables the allowlist to test a cross-project pipeline. GitLab advises to enable it again as soon as possible, so the matching enabled event should follow shortly.
level: high

False positives

  • A Maintainer who disables the allowlist to test a cross-project pipeline. GitLab advises to enable it again as soon as possible, so the matching enabled event should follow shortly.

GitLab Project Added to a CI/CD Job Token Allowlist or Permissions Updated

Detects a project being added to the inbound CI/CD job token allowlist of another project (secure_ci_job_token_project_added) and the permissions of an allowlist entry being updated (secure_ci_job_token_policies_updated, GitLab 17.6 and later). After an entry is added, jobs of the added project can use their job token against the project, within the permissions of the user who triggered them. Fine-grained permissions limit an entry to chosen API endpoints, and an update can widen them. Teams add entries for ordinary cross-project pipelines, and the reference lists both events without their fields, so this is a low-level signal. It matters most on projects that publish packages or releases.

LevelLowStatusExperimentalLog sourceGitLab audit events
title: GitLab Project Added to a CI/CD Job Token Allowlist or Permissions Updated
id: 53f151b5-baf6-4d69-b076-5e56fd797dfb
status: experimental
description: >-
  Detects a project being added to the inbound CI/CD job token allowlist
  of another project (secure_ci_job_token_project_added) and the
  permissions of an allowlist entry being updated
  (secure_ci_job_token_policies_updated, GitLab 17.6 and later). After an
  entry is added, jobs of the added project can use their job token
  against the project, within the permissions of the user who triggered
  them. Fine-grained permissions limit an entry to chosen API endpoints,
  and an update can widen them. Teams add entries for ordinary
  cross-project pipelines, and the reference lists both events without
  their fields, so this is a low-level signal. It matters most on
  projects that publish packages or releases.
references:
  - https://docs.gitlab.com/user/compliance/audit_event_types/
  - https://docs.gitlab.com/ci/jobs/ci_job_token/
  - https://docs.gitlab.com/ci/jobs/fine_grained_permissions/
  - https://attack.mitre.org/techniques/T1484/
author: Forestall
date: 2026-11-18
tags:
  - attack.defense-impairment
  - attack.privilege-escalation
  - attack.t1484
logsource:
  product: gitlab
  service: audit
detection:
  selection:
    event_type:
      - secure_ci_job_token_project_added
      - secure_ci_job_token_policies_updated
  condition: selection
falsepositives:
  - Teams that connect their own projects, for example to fetch artifacts or packages from one another. Keep the rule for the projects that publish or deploy, and confirm the added project with their owner.
level: low

False positives

  • Teams that connect their own projects, for example to fetch artifacts or packages from one another. Keep the rule for the projects that publish or deploy, and confirm the added project with their owner.

Detection logic

Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.

Job token allowlist disabled and not enabled again

Detection hypothesisSequence of eventsCompares with an earlier value

GitLab advises that the allowlist is disabled only for testing and enabled again as soon as possible. A project whose allowlist is disabled and stays that way is open to job tokens from every project for as long as nobody notices, and the single disable event is easy to lose among other alerts.

  1. The allowlist is disabled: the audit event type secure_ci_job_token_inbound_disabled. Keep the project (entity_path), the account (author_id) and the time.
  2. Look for secure_ci_job_token_inbound_enabled with the same entity_path in the following 24 hours.
  3. Alert when there is none. When there is one, review the job token authentications in between: the streamed event user_authenticated_using_job_token (GitLab 17.4 and later) for that project.

Eventssecure_ci_job_token_inbound_disabledsecure_ci_job_token_inbound_enableduser_authenticated_using_job_token

LimitsThe job token authentication event is not saved to the database and exists only in audit event streaming, and GitLab does not document which of its fields names the project the token came from. In the GitLab source the disable event is written by the GraphQL settings mutation, so a change made another way may not be recorded. The 24 hours are a starting point.

Triage

  • Identify who made the change (author_name, author_id, ip_address) and on which project (entity_path).
  • For a new entry, read target_details and the message of the event for the project or group that was added, and open the Job token permissions in the CI/CD settings of the project to see the entry and its permissions.
  • Ask who owns the added project or group and whether a pipeline there needs the access. A group entry covers every project in that group.
  • For a disabled allowlist, check whether it was enabled again (secure_ci_job_token_inbound_enabled) and how long it stayed open.
  • Review what reached the project in that time, such as new packages, releases and deployments, and pipelines triggered from other projects.

Response

Once the attack is confirmed:

  1. Enable the allowlist again and remove the entries that have no owner or reason.
  2. Treat packages and releases that were published to the project while the allowlist was open as untrusted until their origin is confirmed, and withdraw the ones that cannot be traced.
  3. Review the pipelines of the added project or group that ran in the period, and who triggered them.
  4. Take the Maintainer or Owner role from the account that made the change until it is explained, reset its credentials and revoke its tokens.
  5. Check the other projects of the group for the same change.

Mitigation

  • On GitLab Self-Managed and GitLab Dedicated, turn on the instance setting that enables and enforces the job token allowlist for all projects, which removes the option to disable it.
  • Add single projects instead of groups to an allowlist, and only when cross-project access is needed.
  • Give allowlist entries fine-grained permissions for the endpoints they need instead of the default permissions.
  • Keep the Maintainer role small on projects that publish packages or releases.
  • Alert on every disabled allowlist, and review new allowlist entries on the projects that publish or deploy.

Frequently asked questions

What does a disabled job token allowlist allow?

GitLab states that with the allowlist disabled, jobs from any project can access your project with a job token, and that the user who triggers the pipeline must have permission to access your project. The token is limited to the resources a job token can reach, such as packages, releases, deployments and job artifacts. GitLab says the setting should only be disabled for testing and enabled again as soon as possible.

How do I know that the event means the allowlist was switched off and not on?

GitLab has two event types, described as CI_JOB_TOKEN permissions disabled for inbound and enabled for inbound, and its documentation names the allowlist setting `inboundJobTokenScopeEnabled` in the GraphQL API. In the GitLab source the disabled event is written when that setting becomes false, which is the allowlist being switched off. The description alone is easy to misread, so confirm it once with a test project.

Why is a group on the allowlist riskier than a project?

A group entry gives access to every project in that group, and GitLab notes that projects added to the group later are included without any change to the allowlist. The set of pipelines that can reach your project then grows with the group, and nobody has to approve it again.

Is the option to disable the allowlist available on GitLab.com?

GitLab documents the option for GitLab Self-Managed and GitLab Dedicated instances on which the setting that enables and enforces the job token allowlist for all projects is disabled. Where the allowlist is enforced, the disable event cannot occur, and the events for added projects and groups remain the ones to watch.

References

We respect your privacy

We use cookies to keep this site secure and working properly. With your permission, we also use optional cookies to understand usage and improve the experience. Cookie Policy

You can change your choice at any time.