glsec

Rules / GL041

GL041 include: component: without pinned version

Severity: warn
OWASP: CICD-SEC-4 – Poisoned Pipeline Execution / CICD-SEC-8 – Ungoverned Usage of 3rd-Party Services

What glsec checks

glsec flags include: component: entries that use a mutable or missing version specifier. GitLab CI components are versioned via an @<ref> suffix. When the ref is a branch name (@main), a tilde-latest (@~latest), @latest, or omitted entirely, the exact pipeline template executed can change between runs — a compromised or updated component can silently alter your pipeline's security controls.

Only the following refs are considered pinned:

Trigger example

include:
  - component: gitlab.com/components/sast           # missing @<version>
  - component: gitlab.com/components/dast@latest    # mutable alias
  - component: gitlab.com/components/fuzz@~latest   # tilde-latest — still mutable
  - component: gitlab.com/components/iast@main      # branch name — mutable

Safe alternatives

Pin to a semver tag:

include:
  - component: gitlab.com/components/sast@1.3.0
  - component: gitlab.com/components/dast@2.0.1

Pin to a commit SHA (highest integrity):

include:
  - component: gitlab.com/components/sast@a3f1e9b2c4d5678901234567890abcdef1234567

Notes

Documentation for glsec 1.23.0. Source of this page · Rule implementation