Skip to content

Replace curl|sh oh-my-zsh install with pinned shallow git fetch in devcontainer#62

Draft
Copilot wants to merge 2 commits intomark/feat/make-config-options-overridablefrom
copilot/sub-pr-56-again
Draft

Replace curl|sh oh-my-zsh install with pinned shallow git fetch in devcontainer#62
Copilot wants to merge 2 commits intomark/feat/make-config-options-overridablefrom
copilot/sub-pr-56-again

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 12, 2026

The devcontainer Dockerfile executed a remote install script via curl | sh, creating a supply-chain RCE risk if the upstream URL or connection was compromised.

Changes

  • Remove curl | sh: Replace sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" with git init + git fetch --depth 1 + git checkout FETCH_HEAD — no remote script is executed
  • Pin to a specific commit: OMZ_COMMIT=8df5c1b18b1393dc5046c729094f897bd3636a9b (master HEAD, 2026-03-10); shallow fetch limits clone size and reachable history
  • Overridable at build time via ARG OMZ_COMMIT for easy upgrades
ARG OMZ_COMMIT=8df5c1b18b1393dc5046c729094f897bd3636a9b
RUN if [ ! -d /home/vscode/.oh-my-zsh ]; then \
        git init /home/vscode/.oh-my-zsh \
        && git -C /home/vscode/.oh-my-zsh fetch --depth 1 \
            https://github.com/ohmyzsh/ohmyzsh.git "${OMZ_COMMIT}" \
        && git -C /home/vscode/.oh-my-zsh checkout FETCH_HEAD; \
    fi \
    ...

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

Co-authored-by: SimonCahill <3124521+SimonCahill@users.noreply.github.com>
Copilot AI changed the title [WIP] [WIP] Address feedback on making config options overridable Replace curl|sh oh-my-zsh install with pinned shallow git fetch in devcontainer Mar 12, 2026
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