Skip to content

fix(docker): add USER non-root to idle-monitor sidecar (T21.14) - #889

Merged
jsboige merged 2 commits into
mainfrom
fix/docker-idle-monitor-non-root
May 10, 2026
Merged

jsboige merged 2 commits into
mainfrom
fix/docker-idle-monitor-non-root

Conversation

@jsboige

@jsboige jsboige commented May 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds USER non-root directive to docker-configurations/services/shared/Dockerfile.idle-monitor
  • This was the only Dockerfile (out of 15) running as root

Docker Phase 5 USER audit — full results

Dockerfile USER UID Status
orchestrator orchestrator 1000 OK
whisper-api appuser 1000 OK
funasr-api appuser 1000 OK
demucs-api appuser 1000 OK
musicgen-api appuser 1000 OK
forge-turbo appuser 1000 OK
sd-forge-main appuser 1000 OK
sdnext appuser 1000 OK
tts-api appuser 1000 OK
tts-multi/gateway appuser 1000 OK
tts-multi/kokoro appuser 1000 OK
tts-multi/qwen appuser 1000 OK
tts-multi/tada appuser 1000 OK
qwen-asr-api appuser 1000 OK
shared/idle-monitor none (root) — FIXED

Test plan

  • All 15 Dockerfiles audited
  • 14 already compliant (UID 1000:1000)
  • idle-monitor fixed with groupadd/useradd/chown/USER
  • Verify docker build passes (requires Docker daemon)

Dispatch

  • T21.14 HIGH — Docker Phase 5 USER directive audit complete

jsboige and others added 2 commits May 10, 2026 12:25
User directive 2026-05-10: EPF directory to be dissolved. All EPF-specific
content migrated to neutral CaseStudies naming. Phase 1 = this design doc,
Phase 2 = physical git mv by po-2025.

Covers: inventory (10 notebooks + supporting files), migration mapping,
naming decisions (enonce→student, corrige→solution, CC1/CC2→descriptive),
README update plan, CATALOG-STATUS marker changes, git strategy (all git mv),
validation checklist for Phase 2, risk assessment.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
All 14 service Dockerfiles already run as UID 1000 (appuser/orchestrator).
The idle-monitor sidecar was the only one missing the USER directive.
Adds groupadd/useradd + chown + USER appuser consistent with other services.

Before/After audit:
- 14/15 Dockerfiles had USER non-root -> 15/15
- All use UID 1000:1000 (appuser or orchestrator)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

@clusterManager-Myia clusterManager-Myia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: APPROVE -- CoursIA #889

PR: fix(docker): add USER non-root to idle-monitor sidecar (T21.14)
Files: Dockerfile.idle-monitor (+6 lines), docs/epf-universalisation-design.md (+232 lines)

Dockerfile.idle-monitor -- Clean security fix

  • groupadd/useradd with uid/gid 1000 (standard Docker convention)
  • chown -R 1000:1000 /app before USER switch -- correct ordering
  • USER appuser placed after COPY + chown, before WORKDIR -- correct
  • Runs the idle monitor as non-root, following container security best practices

docs/epf-universalisation-design.md -- Bundled, belongs in #888

This 232-line design document is also the sole file in PR #888. If both PRs merge, the second will conflict. Consider removing this file from #889 to keep the Dockerfile fix focused, or close #888 as superseded.

Checklist

  • Scope: Security hardening (non-root container user)
  • Correctness: user creation + chown + USER ordering is standard pattern
  • No logic risk to monitor script itself
  • MERGEABLE

No blockers. Dockerfile fix is ready to merge.


Reviewed by Hermes (clusterManager-Myia) -- cron review PR run

@jsboige
jsboige merged commit 032e9b6 into main May 10, 2026
1 check passed
@jsboige
jsboige deleted the fix/docker-idle-monitor-non-root branch May 10, 2026 11:24
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.

2 participants