Skip to content

feat(controls): Add debug trace detection control#90

Merged
Joseph94m merged 2 commits intogetplumber:mainfrom
stephrobert:feat/debug-trace-detection
Mar 3, 2026
Merged

feat(controls): Add debug trace detection control#90
Joseph94m merged 2 commits intogetplumber:mainfrom
stephrobert:feat/debug-trace-detection

Conversation

@stephrobert
Copy link
Contributor

Add a new control that detects CI/CD pipelines enabling CI_DEBUG_TRACE or CI_DEBUG_SERVICES in global or job-level variables. When enabled, these variables cause GitLab to print ALL environment variables in job logs, including masked secrets like CI_JOB_TOKEN.

  • Add controlGitlabPipelineDebugTrace with Run() and GetConf()
  • Add DebugTraceControlConfig in plumberconfig.go with schema validation
  • Add debug trace section to default .plumber.yaml
  • Integrate into analyze output, MR comments, and compliance calculation
  • Add comprehensive unit tests (10 tests, 14 sub-cases)

Closes #86

Add a new control that detects CI/CD pipelines enabling CI_DEBUG_TRACE
or CI_DEBUG_SERVICES in global or job-level variables. When enabled,
these variables cause GitLab to print ALL environment variables in job
logs, including masked secrets like CI_JOB_TOKEN.

- Add controlGitlabPipelineDebugTrace with Run() and GetConf()
- Add DebugTraceControlConfig in plumberconfig.go with schema validation
- Add debug trace section to default .plumber.yaml
- Integrate into analyze output, MR comments, and compliance calculation
- Add comprehensive unit tests (10 tests, 14 sub-cases)

Closes getplumber#86
@Joseph94m Joseph94m force-pushed the feat/debug-trace-detection branch from b4b77d0 to 3cf4ec4 Compare March 3, 2026 15:53
@Joseph94m
Copy link
Collaborator

Joseph94m commented Mar 3, 2026

@stephrobert rebased and added the control report progress and count for this new control and updated the readme

@Joseph94m Joseph94m force-pushed the feat/debug-trace-detection branch from 3cf4ec4 to ac8fa66 Compare March 3, 2026 15:55
@Joseph94m Joseph94m merged commit 20e8c63 into getplumber:main Mar 3, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] New control: pipelineMustNotEnableDebugTrace — detect CI_DEBUG_TRACE exposure

2 participants