Skip to content

Add pre-built mitmproxy image with 1Password CLI#41

Open
adamw wants to merge 1 commit intomasterfrom
publish-mitmproxy-image-v2
Open

Add pre-built mitmproxy image with 1Password CLI#41
adamw wants to merge 1 commit intomasterfrom
publish-mitmproxy-image-v2

Conversation

@adamw
Copy link
Member

@adamw adamw commented Mar 20, 2026

Summary

Test plan

  • Verify the workflow builds successfully for both architectures
  • Verify ghcr.io/virtuslab/sandcat-mitmproxy:latest is published after merge
  • Verify op --version works inside the published image

🤖 Generated with Claude Code

Publish ghcr.io/virtuslab/sandcat-mitmproxy (multi-arch: amd64 + arm64), extending the upstream mitmproxy image with the 1Password op CLI. This will be used by the 1Password secrets integration to resolve op:// references at proxy startup. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 20, 2026 20:40
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a pre-built mitmproxy container image that includes the 1Password op CLI, and adds CI automation to build and publish that image to GHCR. This supports upcoming work for 1Password-backed secret resolution (issue #38 / PR #39) by providing a reusable image artifact.

Changes:

  • Add images/mitmproxy/Dockerfile extending mitmproxy/mitmproxy with the 1Password op CLI.
  • Add a GitHub Actions workflow to build and publish a multi-arch image (amd64 + arm64) to GHCR on pushes to master.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
images/mitmproxy/Dockerfile Builds a mitmproxy-based image and installs the op CLI into /usr/local/bin.
.github/workflows/build-mitmproxy-image.yml Builds/publishes the mitmproxy+op image to GHCR with metadata-based tagging.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +10 to +11
&& unzip /tmp/op.zip -d /usr/local/bin op \
&& rm /tmp/op.zip \
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

The 1Password CLI binary is downloaded and installed without any integrity verification (checksum/signature). This is a supply-chain risk for an image that will be published to GHCR; consider validating the downloaded zip against the official SHA256 (or signature) before unzipping/installing.

Suggested change
&& unzip /tmp/op.zip -d /usr/local/bin op \
&& rm /tmp/op.zip \
&& curl -sSfo /tmp/op.zip.sha256 "https://cache.agilebits.com/dist/1P/op2/pkg/v${OP_CLI_VERSION}/op_linux_${ARCH}_v${OP_CLI_VERSION}.zip.sha256" \
&& (cd /tmp && sha256sum --check op.zip.sha256) \
&& unzip /tmp/op.zip -d /usr/local/bin op \
&& rm /tmp/op.zip /tmp/op.zip.sha256 \
Copilot uses AI. Check for mistakes.
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/VirtusLab/sandcat-mitmproxy
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

The PR description/test plan references publishing ghcr.io/virtuslab/sandcat-mitmproxy, but the workflow uses ghcr.io/VirtusLab/sandcat-mitmproxy. Please align the image name/casing so the published image matches the documented pull/run command and avoids any registry/name normalization surprises.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,15 @@
FROM mitmproxy/mitmproxy:latest
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

Using mitmproxy/mitmproxy:latest as the base for a published image makes builds non-deterministic and can cause silent breakage when upstream updates latest. Consider pinning to a specific mitmproxy version tag (or digest) and updating deliberately when needed.

Suggested change
FROM mitmproxy/mitmproxy:latest
FROM mitmproxy/mitmproxy:10.3.0
Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants