Skip to main content
ISSUE-203 Critical Quick CI/CD Variables

Pipeline enables CI debug trace

Control: Pipeline must not enable debug trace · Config key: pipelineMustNotEnableDebugTrace

📋 What is this?

The pipeline enables CI_DEBUG_TRACE or CI_DEBUG_SERVICES, which causes GitLab CI to print all environment variables, including secrets, in the job logs.

⚠️ Impact

**This is a critical security vulnerability.** When debug trace is enabled, every secret variable (API tokens, passwords, deployment keys) is printed in plain text in the job logs. These logs may be accessible to anyone with repository access.

🔧 How to fix

Remove CI_DEBUG_TRACE and CI_DEBUG_SERVICES from your pipeline configuration. These should only be used temporarily for local debugging and must never be committed.

✗ Before All secret variables will be printed in plain text in job logs.
# .gitlab-ci.yml — ❌ Debug trace enabled (CRITICAL)
variables:
CI_DEBUG_TRACE: "true" # Exposes ALL secrets in logs!
deploy:
stage: deploy
variables:
CI_DEBUG_SERVICES: "true" # Also exposes secrets
script:
- deploy.sh
✓ After No debug trace — secrets remain protected.
# .gitlab-ci.yml — ✅ Debug trace removed
variables:
# CI_DEBUG_TRACE removed
deploy:
stage: deploy
script:
- deploy.sh
# For debugging, use these safer alternatives:
# - Add specific echo/print statements
# - Use 'set -x' for specific script sections only
# - Run a debug pipeline with limited access

💡 Tips

  • If you need to debug a CI job, use set -x in specific script lines instead of CI_DEBUG_TRACE.
  • If debug trace was ever enabled, **rotate all secrets** that may have been exposed in logs.
  • Configure pipelineMustNotEnableDebugTrace.forbiddenVariables to also flag other sensitive debug variables.
  • Consider setting up CI job log retention policies to limit exposure window.

⚙️ Configuration

This control is configured in .plumber.yaml under the key:

controls:
  pipelineMustNotEnableDebugTrace:
    enabled: true

See the CLI documentation for the full configuration reference.