Skip to content

fix(security): resolve 4 Dockerfile audit findings - #838

Merged
POWERFULMOVES merged 1 commit into
mainfrom
fix/dockerfile-audit-hardening
Mar 9, 2026
Merged

POWERFULMOVES merged 1 commit into
mainfrom
fix/dockerfile-audit-hardening

Conversation

@POWERFULMOVES

@POWERFULMOVES POWERFULMOVES commented Mar 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • pmoves-archon: Rename MCP_CREDENTIALS_PATHMCP_CONFIG_PATH to eliminate BuildKit SecretsUsedInArgOrEnv warning (value unchanged, only env var name)
  • pmoves-archon-ui: Add USER directive (uid 65532, alpine adduser) — was running as root
  • pmoves-firefly-iii: Add USER www-data defense-in-depth (upstream default, makes it explicit)
  • pmoves-llama-throughput-lab: Add USER directive (uid 65532) + nginx permission fixup for non-root operation
  • Dashboard: Correct runner status from stale "3/4 online" to actual state (all 4 were offline; ai-lab-win now online after manual restart)

All 4 findings were pre-existing audit items from make build-gate-full (14/14 images buildable, 4 had audit warnings). No regressions.

Test plan

  • make -C pmoves build-gate-full → 14/14 PASS (0 audit failures)
  • Verify archon container starts with renamed env var
  • Verify archon-ui, firefly-iii, llama-throughput-lab containers run as non-root (docker exec <container> whoami)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Updated production audit dashboard with infrastructure status updates, runner recovery details, and Dockerfile hardening improvements.
    • Updated BuildKit secrets migration documentation with variable naming consistency.
  • Chores

    • Updated submodule references.
    • Enhanced container security with non-root user execution directives.
    • Standardized environment variable naming across configuration files.

…tion

Fixes 4 pre-existing build-gate findings from BuildKit --check audit:
- pmoves-archon: rename MCP_CREDENTIALS_PATH → MCP_CONFIG_PATH
  (eliminates SecretsUsedInArgOrEnv false positive)
- pmoves-archon-ui: add USER directive (uid 65532, non-root)
- pmoves-firefly-iii: add USER www-data defense-in-depth
- pmoves-llama-throughput-lab: add USER directive + nginx non-root setup

Dashboard: correct runner status from "3/4 online" to actual state
(all 4 offline, ai-lab-win now online after manual start).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@POWERFULMOVES
POWERFULMOVES merged commit e81f37d into main Mar 9, 2026
13 of 14 checks passed
@github-actions

github-actions Bot commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

Docker Hardening Validation

Hardening Validation Report

Validated: Mon Mar 9 19:17:51 UTC 2026

Services Checked

PMOVES.AI Docker Hardening Validation

[INFO] Checking: pmoves/docker-compose.hardened.yml

[INFO] Validating: hi-rag-gateway-v2
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: extract-worker
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: langextract
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: presign
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: render-webhook
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: retrieval-eval
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: pdf-ingest
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: jellyfin-bridge
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: invidious-companion-proxy
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: ffmpeg-whisper
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: media-video
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: media-audio
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: hi-rag-gateway-v2-gpu
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: hi-rag-gateway-gpu
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: deepresearch
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: supaserch
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: publisher-discord
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: mesh-agent
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: nats-echo-req
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: nats-echo-res
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: publisher
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: analysis-echo
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: graph-linker
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: comfy-watcher
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: grayjay-plugin-host
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: agent-zero
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: archon
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: channel-monitor
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: pmoves-yt
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: notebook-sync
[PASS] Non-root user: 65532:65532
[PASS] Read-only filesystem
[PASS] All capabilities dropped
[PASS] No-new-privileges enabled
[WARN] No resource limits

[INFO] Validating: supabase_service_role_key
[WARN] No user directive
[WARN] No read_only directive
[WARN] No cap_drop: ["ALL"]
[WARN] No no-new-privileges
[WARN] No resource limits

[INFO] Validating: supabase_jwt_secret
[WARN] No user directive
[WARN] No read_only directive
[WARN] No cap_drop: ["ALL"]
[WARN] No no-new-privileges
[WARN] No resource limits

======================================
Summary: 120 passed, 40 warnings, 0 errors

@coderabbitai

coderabbitai Bot commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f32f2ee5-d82a-43e2-8d8e-298164722f4e

📥 Commits

Reviewing files that changed from the base of the PR and between 64c816b and d0d970b.

📒 Files selected for processing (6)
  • PMOVES-Archon
  • PMOVES-llama-throughput-lab
  • docs/phase2-buildkit-secrets-migration-plan.md
  • pmoves/docs/PRODUCTION_AUDIT_DASHBOARD.md
  • pmoves/images/firefly-iii/Dockerfile
  • pmoves/services/archon/Dockerfile

📝 Walkthrough

Walkthrough

Submodule pointers are updated for Archon and llama-throughput-lab components. Environment variable names are standardized from MCP_CREDENTIALS_PATH to MCP_CONFIG_PATH across configuration and Dockerfile documentation. Container hardening is applied via explicit USER directives. Production dashboard documentation is updated with detailed operational status, runner recovery steps, and audit findings.

Changes

Cohort / File(s) Summary
Submodule Updates
PMOVES-Archon, PMOVES-llama-throughput-lab
Commit references bumped to latest versions (178ebb9 → dd2f2ed and 213a682 → 823922f) with no functional code changes.
Environment Variable Standardization
docs/phase2-buildkit-secrets-migration-plan.md, pmoves/services/archon/Dockerfile
Variable names refactored from MCP_CREDENTIALS_PATH to MCP_CONFIG_PATH consistently across BuildKit secret path references.
Container Security Hardening
pmoves/images/firefly-iii/Dockerfile, pmoves/services/archon/Dockerfile
USER directive added to firefly-iii (www-data) for non-root execution; archon Dockerfile updated with standardized environment variable naming for security compliance.
Production Documentation Updates
pmoves/docs/PRODUCTION_AUDIT_DASHBOARD.md
Dashboard metadata refreshed with expanded March 9, 2026 changes section detailing runner recovery procedures, AB-9 status update, Dockerfile audit fixes, and degraded CI queue visibility.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 A rabbit hops through variable names, renames with care,
BuildKit secrets now MCP_CONFIG everywhere,
Dockerfiles tightened with USER directives bright,
Dashboard status refreshed—runners back in sight!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/dockerfile-audit-hardening

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

POWERFULMOVES pushed a commit that referenced this pull request Mar 9, 2026
- Dashboard: normalize runner status to "0/4 offline" (was contradictory)
- Dashboard: clarify P2 count "15 open" as pre-triage snapshot
- Dashboard: fix "3 of 4" → "4 of 4" P2 items verified
- Dashboard: AB-9 blocker detail REGRESSED (was stale RESOLVED)
- Dashboard: Docker Bench row reflects AB-9 regression
- Dockerfiles: pin exact CVE versions (>=→==) for crawl4ai, langchain-core, ray, vllm
- BuildKit migration plan: add archival banner (implemented in PR #838)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
POWERFULMOVES added a commit that referenced this pull request Mar 9, 2026
* fix(security): validate Hi-RAG video_id against allowlist regex

Add _SAFE_VID_RE.match(video_id) check on video IDs extracted from
Hi-RAG search results before passing to supa_get(). Prevents query
injection via crafted video_id values. Closes P2 #7.

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

* fix(security): pin CVE-patched versions for archon + deepresearch

Add post-install pip overrides for 4 Trivy-flagged CVEs:
- archon: crawl4ai>=0.8.0 (CVE-2026-26216), langchain-core>=1.2.5 (CVE-2025-68664)
- deepresearch: ray>=2.52.0 (CVE-2025-62593), vllm>=0.14.1 (CVE-2026-22778)

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

* fix(security): resolve 2 CodeQL alerts in chrome extension

- options.js: Replace innerHTML template literal with DOM API
  (textContent) to eliminate XSS vector
- mock-server.js: Guard routes[key] lookup with Object.hasOwn()
  to prevent prototype chain access

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

* docs(audit): close 4 P2 production-blockers + refresh dashboard

- P2 tracker: Mark items #1, #4, #7, #8 as FIXED with verification dates
- Dashboard: Add triage sweep entry, update stale PRs to MERGED,
  document CodeQL and Trivy fixes

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

* docs(audit): reconcile P2 tracker — close 7 stale P1 findings

All 7 reported P1 submodule issues from Phase C audit (2026-02-16)
verified already fixed on PMOVES.AI-Edition-Hardened branches.
Added individual verification entries with evidence paths to
Closed Issues table.

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

* docs(audit): refresh dashboard — all P1 submodule issues resolved

Update executive summary and latest changes to reflect tracker
reconciliation: all 7 Phase C P1 submodule findings verified fixed
on Hardened branches. Add changelog entry with evidence summary.

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

* feat(tools): add living document reconciliation script

Checks and updates dashboard commit SHA/date metadata and flags stale
P2 tracker items whose submodules have advanced. Supports --check
(CI-safe read-only), --update (write metadata), and --json output.

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

* build(make): add docs-reconcile Make targets and preflight integration

Adds docs-reconcile, docs-reconcile-check, docs-reconcile-json targets.
Integrates non-blocking docs-reconcile-check into audit-layers-static.

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

* feat(skills): add /docs:reconcile skill command

Provides CLI-invocable skill for living document reconciliation with
check, update, and JSON modes. Cross-links audit-layers and sign-trail.

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

* docs(context): add Living Document Maintenance guidance to CLAUDE.md

Directs agents to run docs-reconcile after audit/security work or
submodule gitlink updates. Lists the two living documents and rules.

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

* fix(review): resolve 7 CodeRabbit findings across PRs #839/#840

- Dashboard: normalize runner status to "0/4 offline" (was contradictory)
- Dashboard: clarify P2 count "15 open" as pre-triage snapshot
- Dashboard: fix "3 of 4" → "4 of 4" P2 items verified
- Dashboard: AB-9 blocker detail REGRESSED (was stale RESOLVED)
- Dashboard: Docker Bench row reflects AB-9 regression
- Dockerfiles: pin exact CVE versions (>=→==) for crawl4ai, langchain-core, ray, vllm
- BuildKit migration plan: add archival banner (implemented in PR #838)

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

---------

Co-authored-by: Shaela Bello <slbello@uncg.edu>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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