glsec

Rules / GL033

GL033 debug logging toggles enabled in committed pipeline YAML

Severity: error (CI_DEBUG_TRACE) / warn (CI_DEBUG_SERVICES)
OWASP: CICD-SEC-6 – Insufficient Credential Hygiene

What glsec checks

glsec flags any variables: block — top-level, default:, or job-level — that commits one of GitLab's debug logging toggles:

Committing either creates a persistent secret-dumping configuration accessible to anyone who can retry the pipeline.

Trigger example

variables:
  CI_DEBUG_TRACE: "true"      # dumps all CI variable values to the job log
  CI_DEBUG_SERVICES: "true"   # dumps service-container logs incl. credentials

Or at job level:

deploy:
  variables:
    CI_DEBUG_TRACE: "true"
  script:
    - ./deploy.sh

Safe alternative

Remove the toggle from the committed YAML. Use the GitLab UI Run pipeline dialog to pass it as a transient variable for a single run — it will not persist in the repository.

References

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