Skip to content

fix: scan WordPress image before publishing and use mmmcp - #15

Draft
calvinmclean wants to merge 7 commits into
obot-platform:mainfrom
calvinmclean:fix/scan-before-push
Draft

calvinmclean wants to merge 7 commits into
obot-platform:mainfrom
calvinmclean:fix/scan-before-push

Conversation

@calvinmclean

@calvinmclean calvinmclean commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Problem

The build job pushes to GHCR before enforcing its Trivy vulnerability policy. A run can fail while :main has already moved to the new image. The current nanobot base also has HIGH findings that would block publication once the scan runs first.

Changes

  • Export the amd64 and arm64 image as an OCI archive, scan both platforms, and push the scanned image only after the HIGH/CRITICAL gate passes.
  • Replace nanobot with digest-pinned mmmcp and uv images. Install current Wolfi Python packages and run the WordPress server from its built virtual environment.
  • Upload separate SARIF reports, sign the published digest, and keep release-only :latest tagging.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The container build ignores the committed dependency lockfile, allowing untested dependency drift.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Updates container publishing so multi-platform images are scanned before publication and served through mmmcp.

Changes:

  • Builds and scans amd64/arm64 OCI images before pushing.
  • Replaces nanobot with mmmcp on a Wolfi/Python runtime.
  • Uploads platform-specific SARIF reports and signs the published digest.
File Description
Dockerfile Builds the runtime with mmmcp, uv, and Wolfi Python.
.github/​workflows/​docker-build-and-push.yml Adds pre-publish scanning, OCI publication, signing, and release tagging.
.github/​scripts/​select-oci-platform.py Creates single-platform OCI views for scanning.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread Dockerfile Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The post-push mutable-tag lookup can sign the wrong digest during concurrent builds.

Review effort: Balanced
Findings: 1 High severity

Open (1)
Resolved since last review (1)

Comment thread .github/workflows/docker-build-and-push.yml Outdated
@calvinmclean
calvinmclean requested a balanced review from Copilot October 7, 2026 15:03
@calvinmclean
calvinmclean marked this pull request as ready for review October 7, 2026 17:52
env:
IMAGE_TAG: ghcr.io/${{ github.repository }}:${{ github.ref_name }}
run: |
image_ref=$(crane push --index "$RUNNER_TEMP/image-layout" "$IMAGE_TAG")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

My agent says that --index should be removed, because it results in an index wrapped in another index. Normal containerd-based clients would still be able to use the image, but this is abnormal.

for platform in linux/amd64 linux/arm64; do
arch="${platform#*/}"
trivy image --input "$RUNNER_TEMP/image-${arch}" \
--skip-dirs '**/venv' --format sarif --output "trivy-results-${arch}.sarif"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Double check whether we should be skipping **/venv or **/.venv.

@calvinmclean
calvinmclean marked this pull request as draft October 14, 2026 00:16
@calvinmclean

Copy link
Copy Markdown
Member Author

converting to draft for now and removing reviewers so it's out of the way for v0.27 release

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.

3 participants