glsec

OWASP Top 10 CI/CD Security Risks in GitLab

The OWASP Top 10 CI/CD Security Risks list the ways a delivery pipeline gets attacked. glsec's 85 rules cover 8 of the ten in .gitlab-ci.yml. The remaining 2 depend on settings and logs that a pipeline file doesn't contain.

  1. A change reaches production without the checks meant to stop it: deploy jobs that run on any branch, manual gates that don't block, security scans that are switched off or can't fail.

  2. CICD-SEC-2

    Inadequate Identity and Access Management

    not in the pipeline file

    Who can reach the CI/CD system and with which role is set in GitLab's group and project settings, not in .gitlab-ci.yml.

  3. CICD-SEC-3

    Dependency Chain Abuse

    13 rules

    The pipeline pulls code that can change under it: mutable image tags, includes from a branch, packages fetched without a lock file or checksum.

  4. CICD-SEC-4

    Poisoned Pipeline Execution

    14 rules

    Whoever can push a branch or open a merge request gets to run commands in the pipeline, for example through a branch name, commit message or merge request title placed into a script.

  5. Jobs get more access than they need: OIDC tokens with a broad audience or on untrusted pipelines, deploy jobs on any runner, the host's Docker socket.

  6. CICD-SEC-6

    Insufficient Credential Hygiene

    23 rules

    Secrets end up where they shouldn't: committed in the pipeline file, printed to the job log, packed into artifacts, or forwarded to other hosts and downstream pipelines.

  7. CICD-SEC-7

    Insecure System Configuration

    18 rules

    The pipeline weakens its own environment: privileged Docker, disabled TLS or host key checks, root and sudo, pipes that hide a failing command.

  8. Third-party code gets into the pipeline without anyone choosing a version, such as a CI/CD component included without a pinned release.

  9. Nobody can check what was built or downloaded: files fetched without a checksum, releases published without a signature.

  10. CICD-SEC-10

    Insufficient Logging and Visibility

    not in the pipeline file

    Audit logs and their monitoring live in GitLab's instance and group settings and in your log pipeline, not in .gitlab-ci.yml.

Category names and links are from OWASP's list. A rule can belong to more than one risk.