Skip to content

Harden Dockerfile: HTTPS downloads, non-root user, git clone retained#307

Merged
ekosman merged 3 commits intomainfrom
copilot/check-docker-file-security
Feb 21, 2026
Merged

Harden Dockerfile: HTTPS downloads, non-root user, git clone retained#307
ekosman merged 3 commits intomainfrom
copilot/check-docker-file-security

Conversation

Copy link
Contributor

Copilot AI commented Feb 21, 2026

The Dockerfile had several security and correctness issues: downloading artifacts over plain HTTP, running as root, and pulling requirements.txt from Google Drive unnecessarily.

Security

  • HTTP → HTTPS for c3d.pickle wget download
  • Non-root user (anomalyuser) added; container no longer runs as root
  • Sudo restricted to /usr/bin/apt-get only — not NOPASSWD:ALL

Functional

  • git clone retained — the image remains portable and can be built from any machine without a local copy of the repository
  • Removed redundant gdown callrequirements.txt is included in the cloned repository; no need to fetch from Google Drive
  • conda install in setup_anomaly.sh targets -n anomaly explicitly and no longer runs under sudo; anomalyuser owns /opt/conda/envs/anomaly
  • setup_anomaly.sh apt-get calls prefixed with sudo to work correctly under the new non-root user

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…gnore

Co-authored-by: ekosman <10260165+ekosman@users.noreply.github.com>
Copilot AI changed the title [WIP] Review Dockerfile for security and functionality Harden Dockerfile: HTTPS downloads, non-root user, COPY over git clone Feb 21, 2026
Copilot AI requested a review from ekosman February 21, 2026 23:42
@ekosman ekosman marked this pull request as ready for review February 21, 2026 23:44
Co-authored-by: ekosman <10260165+ekosman@users.noreply.github.com>
Copilot AI changed the title Harden Dockerfile: HTTPS downloads, non-root user, COPY over git clone Harden Dockerfile: HTTPS downloads, non-root user, git clone retained Feb 21, 2026
Copilot AI requested a review from ekosman February 21, 2026 23:48
@ekosman ekosman merged commit 22b344a into main Feb 21, 2026
4 checks passed
@ekosman ekosman deleted the copilot/check-docker-file-security branch February 21, 2026 23:55
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