skip to content

In GitLab, who can read the job logs and artifacts of a public project's pipelines, and which settings narrow that?

level: middleimportance: nice to knowfreq 17%

answer

  1. public project, public pipelines?
  2. a checkbox in general pipeline settings
  3. Project-based pipeline visibility
  4. CI/CD feature: Only project members
  5. cleared means Reporter or higher

basics

~20 s

On a public GitLab project with Project-based pipeline visibility selected and CI/CD open to Everyone With Access, anyone can read pipelines, job logs and artifacts. Clearing that checkbox, or setting CI/CD to Only project members, keeps them to project members.

solid answer

~40 s

Two settings decide it. **Project-based pipeline visibility**, a checkbox in the project's general pipeline settings, makes pipelines, job logs, job artifacts and pipeline security results visible to everyone on a **Public** project when selected; when cleared, logs, artifacts, the security dashboard and the CI/CD menu are limited to members with **Reporter** or higher, and outsiders only see pipeline and job *status* on merge requests and commits. The second control is the project's **CI/CD** feature visibility: **Only project members** or **Everyone With Access**, which only matters on public projects while the checkbox is on. It also governs a side door: on public and internal projects, jobs in projects that are not on your job token allowlist can fetch artifacts with their job token unless CI/CD is set to **Only project members**.

go deeper

for a junior

Remember that on a public GitLab project, pipelines, job logs and artifacts can be readable by anyone unless someone changes the project's settings.

for a middle

Explain how Project-based pipeline visibility behaves for public, internal and private projects, and when the CI/CD feature's Only project members choice actually takes effect.

for a senior

Show how you would audit public projects for exposed logs and artifacts, including the job token exception that lets non-allowlisted projects fetch artifacts.

for a principal

Weigh contributor transparency against exposure for public projects, and decide which defaults a platform team should set before projects are made public.

## What a pipeline exposes A GitLab **pipeline** leaves several things behind besides its pass/fail status: **job logs** (everything the scripts printed), **job artifacts** (files the jobs saved), and on projects that run security scans, **pipeline security results**. On a **public** project — one anyone can open, signed in or not — the question is which of these strangers can read. A job log that echoes an internal hostname, or an artifact that bundles a configuration file, is published to the world if the settings say so. ## Control 1: Project-based pipeline visibility The **Project-based pipeline visibility** checkbox sits in the project's general pipeline settings and applies to public and internal projects (and shapes what members see on private ones). Its effect depends on the project's own visibility: | Project visibility | Checkbox selected | Checkbox cleared | |---|---|---| | **Public** | pipelines and related features visible to everyone | logs, artifacts, security dashboard and CI/CD menu for members with Reporter or higher; others see only pipeline and job status on merge requests and commits | | **Internal** | visible to all signed-in users except external users | pipelines visible to signed-in non-external users; related features for Reporter or higher | | **Private** | visible to all project members, Guest or higher | pipelines and related features for Reporter or higher | Two points are easy to miss: - Clearing the checkbox on a public project does **not** hide whether a pipeline passed — status still shows on merge requests and commits. - On a private project, selecting the checkbox **widens** access to Guests, which is the opposite of what people expect from a "visibility" switch. ## Control 2: the CI/CD feature for non-members The project's **Visibility, project features, permissions** settings include a **CI/CD** feature with two choices for non-members of a public project: - **Only project members** — only members can view pipelines. - **Everyone With Access** — non-members can view pipelines too. This setting has **no effect** when the project is internal or private (non-members cannot open those projects anyway) or when Project-based pipeline visibility is disabled. In other words, it is a refinement that only bites on a public project whose checkbox is selected. ## The job token side door GitLab gives every job a short-lived **CI/CD job token**. Normally another project's jobs can use their token against yours only if your project's **job token allowlist** names them. Public and internal projects have an exception: jobs from projects *not* on the allowlist can still use a job token to: - fetch artifacts, - access the container and package registries, - access releases, deployments and environments, - access the repository. To close that, set the corresponding project features to **Only project members**; access to fetch artifacts follows the **CI/CD** feature's visibility. After that, only allowlisted projects can reach them with a job token. ## Deciding for a set of inherited public projects 1. **Decide what should be public.** An open-source project often wants contributors to read failing logs; an internal tool that happens to be public usually does not. 2. **Clear Project-based pipeline visibility** where outsiders have no reason to read logs, accepting that pass/fail status stays visible on merge requests and commits. 3. **Set CI/CD to Only project members** where the checkbox must stay on but non-members should not see pipelines, and to stop non-allowlisted job tokens from fetching artifacts. 4. **Read old logs and artifacts before relying on the change** — anything already downloaded is out — and treat secret masking as a separate safeguard with its own gaps, covered with GitLab CI variables.

  • On a public GitLab project with Project-based pipeline visibility cleared, what can a non-member still see of its pipelines?
    Only the status of pipelines and jobs, and only where it appears on merge requests and commits. Job logs, job artifacts, the pipeline security dashboard and the CI/CD menu are limited to project members with the Reporter role or higher, so a visitor learns that a pipeline failed but not why.
  • In GitLab, why does setting a public project's CI/CD feature to Only project members matter for other projects' job tokens?
    Public and internal projects let jobs from projects that are not on their job token allowlist fetch artifacts and reach some other features with a job token. Access to fetch artifacts follows the CI/CD feature's visibility, so setting it to **Only project members** limits that access to projects on the allowlist.

  • A public project's job logs are only ever visible to its members.
  • Clearing pipeline visibility also hides pass or fail status on merge requests.
  • The CI/CD feature setting restricts pipelines on internal and private projects too.
  • Masked variables guarantee nothing sensitive can appear in a public job log.
  • Only allowlisted projects can ever fetch a public project's artifacts with a job token.