Skip to content

Pin DIFC and CLI proxy images to the gateway digest - #74950

Merged
pelikhan merged 2 commits into
mainfrom
copilot/fix-gh-aw-mcpg-tag-issue
Nov 4, 2026
Merged

pelikhan merged 2 commits into
mainfrom
copilot/fix-gh-aw-mcpg-tag-issue

Conversation

Copilot AI commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

DIFC and CLI proxies launched gh-aw-mcpg by mutable tag while the gateway used its resolved digest. A moved tag could therefore execute different code with GH_TOKEN without changing the compiled lock file.

  • Image resolution: Use the gateway’s effective-version fallback and shared container resolver, honoring repository mappings, cached pins, and embedded pins. Preserve tag-only behavior when no pin exists.
  • Regression coverage: Cover pinned and unpinned references, mappings, version fallback, and proxy/gateway image consistency.
  • Generated workflows: Update 122 lock files so proxy image values include the resolved @sha256: digest.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix gh-aw-mcpg proxy step to use digest pin Pin DIFC and CLI proxy images to the gateway digest Nov 4, 2026
Copilot AI requested a review from pelikhan November 4, 2026 19:46
@pelikhan
pelikhan marked this pull request as ready for review November 4, 2026 20:01
Copilot AI adaptive review requested due to automatic review settings November 4, 2026 20:01
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Generated by Ponytail Reviewer for #74950

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Test Quality Sentinel · routed: gpt56 max · ~1 AIC · ⌖ ~1 AIC · ⊞ 6.3K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.

Design Decision Gate 🏗️

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Design Decision Gate 🏗️ · routed: gpt56 max · ~1 AIC · ⌖ ~2 AIC · ⊞ 7.7K · ◷

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (pr-code-quality-reviewer)
reviewed_at: 2026-11-04T20:04:53Z
review_event: COMMENT
top_themes: [test independence]
files_reviewed: [pkg/workflow/compiler_difc_proxy.go, pkg/workflow/compiler_difc_proxy_test.go, pkg/workflow/threat_detection_isolation_test.go]
comment_count: 1

Note

This comment is managed by comment memory.

Expand the saved memory block to view or edit the persistent context for this thread.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.6K · ◷
Comment /review to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed the changed proxy image resolution and regression coverage. The implementation consistently applies the effective gateway version and shared pin/mapping resolver to proxy and gateway images.

Findings

  • One non-blocking test-quality issue: the threat-detection fixture computes its expected image with the resolver under test, making that assertion tautological; an inline comment suggests an independent literal expectation.

Static review only; tests were not run.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again

GITHUB_COPILOT_BASE_URL: ${{ env.GITHUB_COPILOT_BASE_URL }}
CLI_PROXY_POLICY: '{"allow-only":{"repos":"${{ steps.determine-automatic-lockdown.outputs.repos }}","min-integrity":"${{ steps.determine-automatic-lockdown.outputs.min_integrity }}"}}'
CLI_PROXY_IMAGE: '` + resolveProxyContainerImage(tt.data.SandboxConfig.MCP) + `'
CLI_PROXY_IMAGE: '` + resolveProxyContainerImage(tt.data.SandboxConfig.MCP, tt.data) + `'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This assertion derives the expected CLI_PROXY_IMAGE by calling the resolver under test, so a regression that drops pinning would still pass because both the generated fixture and expectation change together.

💡 Make the fixture independent of the implementation

Use a literal expected tag/digest (or an explicit test input and expected output) here, so this test verifies the emitted value rather than reproducing production logic. The dedicated resolver tests can cover the helper; this integration fixture should catch wiring regressions.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What this change does: It makes the DIFC and CLI proxy use the MCP gateway effective version and resolved digest. It adds regression coverage for pins, mappings, and consistency across the proxy and gateway outputs.

Should fix:

  1. Gateway image assembly is duplicated (pkg/workflow/compiler_difc_proxy.go:L214-L219)

    • What this is: The new helper repeats the version construction and resolveContainerImage call already used by the gateway command.
    • Problem: A later change to either rule must update both sites, or the proxy and gateway can receive different images.
    • Fix: Rename this to a shared MCP gateway image resolver and call it from buildMCPGatewayContainerCommand, deleting the inline block there.
    • If we skip it: The two containers can silently drift again while their local tests still pass.

Verdict: fix 1 first.
Lean: -6 lines possible.

Generated by ✂️ Ponytail Reviewer for #74950 · codex · routed: gpt56 max · ~4 AIC · ⌖ ~1 AIC · ⊞ 118
Comment /ponytail to run again

func resolveProxyContainerImage(gatewayConfig *MCPGatewayRuntimeConfig) string {
// resolveProxyContainerImage returns the pinned container image reference for the
// DIFC/CLI proxy, using the same version fallback and pins as the MCP gateway.
func resolveProxyContainerImage(gatewayConfig *MCPGatewayRuntimeConfig, data *WorkflowData) string {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What this is: This helper adds a second copy of the MCP gateway image assembly already in pkg/workflow/mcp_setup_gateway.go:445-451. Problem: A later change to the version fallback or digest lookup must update both sites, or the proxy and gateway can receive different images. Fix: Rename this to a shared MCP gateway image resolver and call it from buildMCPGatewayContainerCommand, deleting that inline block. If we skip it: The two containers can silently drift again while their local tests still pass.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Skills-Based Review 🧠

Applied /codebase-design and /diagnosing-bugs. The fix is correct and well-tested. One coverage gap is worth a follow-up, but it is not blocking.

📋 Key Themes & Highlights

Verification

  • Targeted tests pass: TestResolveProxyContainerImage, TestProxyContainerImagePins, TestDIFCProxy*, and TestDetectionAndEvalsSidecarOutputUnchanged.
  • The committed lock files at the PR head contain the @sha256: digest in all 127 proxy image values (120 CLI_PROXY_IMAGE, 7 DIFC_PROXY_IMAGE).
  • Recompiling copilot-opt from a clean HEAD export reproduces the proxy image line exactly. The only drift is an unrelated scattered-cron line.
  • resolveContainerImage and effectiveMCPGatewayVersion are nil-safe, so the data: nil test cases are valid.

Key Themes

  • Silent tag fallback when unpinned: when no pin exists, the proxies still launch the mutable tag while holding GH_TOKEN, and nothing is recorded. This matches the PR's stated goal of preserving tag-only behavior, so it is a follow-up, not a blocker. See the inline comment.

Positive Highlights

  • ✅ Reuses the gateway's effectiveMCPGatewayVersion and resolveContainerImage, so proxy and gateway cannot drift apart.
  • ✅ The TestProxyContainerImagePins table covers without-pin, cached-pin, and repository-mapping cases across both proxy builders and the gateway command.

@copilot please address the review comment above.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~6 AIC · ⌖ ~1 AIC · ⊞ 5.4K
Comment /matt to run again

version = effectiveMCPGatewayVersion(data)
}
return gatewayConfig.Container + ":" + version
return resolveContainerImage(gatewayConfig.Container+":"+version, data)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[/codebase-design] When no pin exists, the proxy falls back to the mutable gh-aw-mcpg:<version> tag and records nothing. The proxies receive GH_TOKEN, so the tag-move risk this PR targets still applies to unpinned builds.

💡 Suggested direction

If tag-only behavior is intended, make it visible. docker.go (around line 231) already records an ActionResolutionFailures entry for gh-aw-firewall images that lack a digest. Applying the same check to constants.DefaultMCPGatewayContainer in this resolver would surface unpinned proxies in lock-file audits. The gateway command builder has the same silent fallback, so this is a broader gap and not one introduced here.

Current embedded pins cover v0.5.2, so default workflows are unaffected. The "without pin" case in TestProxyContainerImagePins could assert that the failure is recorded.

@copilot please address this.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The “without pin” test uses a substring assertion that also accepts a digest-pinned gateway image, allowing an incorrect image configuration to pass.

1 open issue
What changed in this PR

Aligns DIFC and CLI proxy image resolution with the MCP gateway in the gh-aw compiler, addressing #73572 so available digest pins also protect proxy containers that receive GH_TOKEN.

Changes:

  • Use the gateway’s version fallback and shared container resolver for both proxies, preserving tag-only behavior when no pin exists.
  • Add regression coverage for pins, mappings, fallback versions, and proxy/gateway consistency.
  • Regenerate 122 workflow lock files with digest-pinned proxy images.
File Description
pkg/​workflow/​threat_detection_isolation_test.go Update proxy image expectations.
pkg/​workflow/​compiler_difc_proxy.go Resolve proxy images with gateway fallback and pins.
pkg/​workflow/​compiler_difc_proxy_test.go Cover image resolution and gateway consistency.
.github/​workflows/​workflow-health-manager.lock.yml Pin CLI proxy image.
.github/​workflows/​workflow-generator.lock.yml Pin CLI proxy image.
.github/​workflows/​windows-grower.lock.yml Pin CLI proxy image.
.github/​workflows/​weekly-safe-outputs-spec-review.lock.yml Pin CLI proxy image.
.github/​workflows/​weekly-otel-reference.lock.yml Pin CLI proxy image.
.github/​workflows/​weekly-network-domains-audit.lock.yml Pin CLI proxy image.
.github/​workflows/​weekly-issue-summary.lock.yml Pin CLI proxy image.
.github/​workflows/​weekly-blog-post-writer.lock.yml Pin DIFC and CLI proxy images.
.github/​workflows/​unbloat-docs.lock.yml Pin CLI proxy image.
.github/​workflows/​uk-ai-operational-resilience.lock.yml Pin CLI proxy image.
.github/​workflows/​ubuntu-image-analyzer.lock.yml Pin CLI proxy image.
.github/​workflows/​test-quality-sentinel.lock.yml Pin CLI proxy image.
.github/​workflows/​terminal-stylist.lock.yml Pin CLI proxy image.
.github/​workflows/​technical-doc-writer.lock.yml Pin CLI proxy image.
.github/​workflows/​sub-issue-closer.lock.yml Pin CLI proxy image.
.github/​workflows/​step-name-alignment.lock.yml Pin CLI proxy image.
.github/​workflows/​stale-repo-identifier.lock.yml Pin DIFC and CLI proxy images.
.github/​workflows/​squad.lock.yml Pin CLI proxy image.
.github/​workflows/​squad-plan.lock.yml Pin CLI proxy image.
.github/​workflows/​squad-implement-worker.lock.yml Pin CLI proxy image.
.github/​workflows/​squad-game-planner.lock.yml Pin CLI proxy image.
.github/​workflows/​spec-librarian.lock.yml Pin CLI proxy image.
.github/​workflows/​spec-extractor.lock.yml Pin CLI proxy image.
.github/​workflows/​smoke-security-alerts.lock.yml Pin CLI proxy image.
.github/​workflows/​smoke-pi.lock.yml Pin CLI proxy image.
.github/​workflows/​smoke-otel-backends.lock.yml Pin CLI proxy image.
.github/​workflows/​smoke-opencode.lock.yml Pin CLI proxy image.
.github/​workflows/​smoke-github-claude.lock.yml Pin CLI proxy image.
.github/​workflows/​smoke-deepseek-harness.lock.yml Pin CLI proxy image.
.github/​workflows/​smoke-copilot.lock.yml Pin CLI proxy image.
.github/​workflows/​smoke-copilot-mai.lock.yml Pin CLI proxy image.
.github/​workflows/​smoke-copilot-auto.lock.yml Pin CLI proxy image.
.github/​workflows/​smoke-copilot-aoai-entra.lock.yml Pin CLI proxy image.
.github/​workflows/​smoke-copilot-aoai-apikey.lock.yml Pin CLI proxy image.
.github/​workflows/​smoke-claude.lock.yml Pin CLI proxy image.
.github/​workflows/​smoke-claude-on-copilot.lock.yml Pin CLI proxy image.
.github/​workflows/​smoke-aider.lock.yml Pin CLI proxy image.
.github/​workflows/​skillet.lock.yml Pin CLI proxy image.
.github/​workflows/​sergo.lock.yml Pin CLI proxy image.
.github/​workflows/​semantic-function-refactor.lock.yml Pin CLI proxy image.
.github/​workflows/​security-compliance.lock.yml Pin CLI proxy image.
.github/​workflows/​scout.lock.yml Pin CLI proxy image.
.github/​workflows/​repository-quality-improver.lock.yml Pin CLI proxy image.
.github/​workflows/​refactoring-cadence.lock.yml Pin CLI proxy image.
.github/​workflows/​q.lock.yml Pin CLI proxy image.
.github/​workflows/​pr-sous-chef.lock.yml Pin CLI proxy image.
.github/​workflows/​pr-finisher.lock.yml Pin CLI proxy image.
.github/​workflows/​pr-description-caveman.lock.yml Pin CLI proxy image.
.github/​workflows/​pr-code-quality-reviewer.lock.yml Pin CLI proxy image.
.github/​workflows/​ponytail-reviewer.lock.yml Pin CLI proxy image.
.github/​workflows/​org-health-report.lock.yml Pin CLI proxy image.
.github/​workflows/​objective-impact-report.lock.yml Pin CLI proxy image.
.github/​workflows/​necromancer.lock.yml Pin CLI proxy image.
.github/​workflows/​mergefest.lock.yml Pin CLI proxy image.
.github/​workflows/​mattpocock-skills-reviewer.lock.yml Pin CLI proxy image.
.github/​workflows/​layout-spec-maintainer.lock.yml Pin CLI proxy image.
.github/​workflows/​issue-monster.lock.yml Pin CLI proxy image.
.github/​workflows/​issue-arborist.lock.yml Pin DIFC proxy image.
.github/​workflows/​impeccable-skills-reviewer.lock.yml Pin CLI proxy image.
.github/​workflows/​hourly-ci-cleaner.lock.yml Pin CLI proxy image.
.github/​workflows/​hippo-embed.lock.yml Pin CLI proxy image.
.github/​workflows/​go-logger.lock.yml Pin CLI proxy image.
.github/​workflows/​front-page-copy-guard.lock.yml Pin CLI proxy image.
.github/​workflows/​firewall-escape.lock.yml Pin CLI proxy image.
.github/​workflows/​evoskill-evolver.lock.yml Pin CLI proxy image.
.github/​workflows/​eslint-refiner.lock.yml Pin CLI proxy image.
.github/​workflows/​eslint-miner.lock.yml Pin CLI proxy image.
.github/​workflows/​engine-conformance-deepseek-harness.lock.yml Pin CLI proxy image.
.github/​workflows/​engine-conformance-aider.lock.yml Pin CLI proxy image.
.github/​workflows/​dictation-prompt.lock.yml Pin CLI proxy image.
.github/​workflows/​developer-docs-consolidator.lock.yml Pin CLI proxy image.
.github/​workflows/​designer-drift-audit.lock.yml Pin CLI proxy image.
.github/​workflows/​design-decision-gate.lock.yml Pin CLI proxy image.
.github/​workflows/​deployment-incident-monitor.lock.yml Pin CLI proxy image.
.github/​workflows/​delight.lock.yml Pin CLI proxy image.
.github/​workflows/​dataflow-pr-discussion-dataset.lock.yml Pin DIFC and CLI proxy images.
.github/​workflows/​daily-yamllint-fixer.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-workflow-updater.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-workflow-security-model.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-work-queues-report.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-windows-terminal-integration-builder.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-windows-defender-scan.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-tlc-test-expert.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-testify-uber-super-expert.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-storify.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-spdd-spec-planner.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-security-red-team.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-security-observability.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-secrets-analysis.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-safeoutputs-git-simulator.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-safe-outputs-conformance.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-safe-output-integrator.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-repo-chronicle.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-rendering-scripts-verifier.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-reliability-review.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-performance-summary.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-observability-report.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-news.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-multi-device-docs-tester.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-model-resolution.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-issues-report.lock.yml Pin DIFC and CLI proxy images.
.github/​workflows/​daily-hippo-learn.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-graft-intelligence.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-go-test-stubs-aider.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-go-test-parallelizer.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-geo-optimizer.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-function-namer.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-formal-spec-verifier.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-firewall-report.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-experiment-report.lock.yml Pin CLI proxy image.
.github/​workflows/​daily-code-debt-aider.lock.yml Pin CLI proxy image.
.github/​workflows/​craft.lock.yml Pin CLI proxy image.
.github/​workflows/​copilot-session-insights.lock.yml Pin CLI proxy image.
.github/​workflows/​copilot-opt.lock.yml Pin CLI proxy image.
.github/​workflows/​copilot-cli-deep-research.lock.yml Pin CLI proxy image.
.github/​workflows/​contribution-check.lock.yml Pin DIFC and CLI proxy images.
.github/​workflows/​claude-code-user-docs-review.lock.yml Pin CLI proxy image.
.github/​workflows/​aw-issue-clustering.lock.yml Pin CLI proxy image.
.github/​workflows/​auto-triage-issues.lock.yml Pin DIFC proxy image.
.github/​workflows/​ai-moderator.lock.yml Pin CLI proxy image.
.github/​workflows/​agentic-token-optimizer.lock.yml Pin CLI proxy image.
.github/​workflows/​actions-aw-linter-factory.lock.yml Pin CLI proxy image.

Review effort: Max (auto)

workflowData: data,
gatewayConfig: data.SandboxConfig.MCP,
})
assert.Contains(t, gatewayCommand, " "+tt.expected)
@pelikhan
pelikhan merged commit 47d7434 into main Nov 4, 2026
121 checks passed
@pelikhan
pelikhan deleted the copilot/fix-gh-aw-mcpg-tag-issue branch November 4, 2026 21:55
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.2.0

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.

DIFC/CLI proxy steps start gh-aw-mcpg by mutable tag while the gateway uses the digest pin

3 participants