Conversation
|
Hey Right now, though, the PR is still in pure planning state: the only commit is "Initial plan" with zero file changes and all 10 checklist items remain unchecked. Here's what needs to happen before this is ready for review:
If you'd like to hand this off to a coding agent, here's a ready-to-use prompt:
|
…ckdown - Change determine_automatic_lockdown.cjs to output min_integrity/repos for public repos instead of lockdown field - Update Go code to pass configured guard policy values as env vars to step - Use step outputs (min_integrity, repos) in Start MCP Gateway via new env vars GITHUB_MCP_GUARD_MIN_INTEGRITY and GITHUB_MCP_GUARD_REPOS - Render guard-policies with env var refs when step is used (no explicit guard policy) - Remove GITHUB_MCP_LOCKDOWN from auto-detection flow (kept for explicit lockdown) - Recompile all 172 lock files with updated guard policy behavior - Update tests to match new behavior Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
| @@ -25,7 +27,7 @@ | |||
| */ | |||
| async function determineAutomaticLockdown(github, context, core) { | |||
There was a problem hiding this comment.
@copilot render resolved repos/min-integrity to the step summary.
There was a problem hiding this comment.
Done in 5646c57. The step now writes a summary table with the resolved repos and min-integrity values, showing whether each came from the workflow config or was automatically set for a public repository:
| Field | Value | Source |
|---|---|---|
| min-integrity | approved | automatic (public repo) |
| repos | all | automatic (public repo) |
Render the resolved repos and min-integrity values to the step summary as a table, showing both the resolved value and whether it came from the workflow config or was automatically set for a public repository. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates the GitHub MCP “automatic lockdown” behavior for public repositories to instead auto-apply GitHub MCP guard policy defaults (min-integrity=approved, repos=all) via step outputs and runtime env var wiring, while stopping automatic emission of the lockdown output.
Changes:
- Replace
GITHUB_MCP_LOCKDOWNplumbing withGITHUB_MCP_GUARD_MIN_INTEGRITY/GITHUB_MCP_GUARD_REPOSenv vars sourced from the determine step. - Render GitHub MCP
guard-policies.allow-onlyin generated MCP configs using runtime-resolved env var references. - Update wasm golden fixtures, Codex MCP config rendering test expectations, and regenerate many workflow lockfiles accordingly.
Reviewed changes
Copilot reviewed 184 out of 184 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/with-imports.golden | Updates golden output to use guard policy env vars and render guard-policies instead of lockdown. |
| pkg/workflow/testdata/wasm_golden/TestWasmGolden_CompileFixtures/basic-copilot.golden | Updates golden output to use guard policy env vars and render guard-policies instead of lockdown. |
| pkg/workflow/mcp_setup_generator.go | Passes guard policy env vars into MCP gateway container environment passthrough list. |
| pkg/workflow/mcp_renderer_types.go | Extends GitHub MCP renderer option structs with GuardPoliciesFromStep. |
| pkg/workflow/mcp_environment.go | Collects new guard policy env vars from determine-step outputs when applicable. |
| pkg/workflow/codex_engine_test.go | Updates expected rendered MCP config to include guard-policies section in JSON gateway config. |
| .github/workflows/video-analyzer.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/typist.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/tidy.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/test-workflow.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/test-project-url-default.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/test-dispatcher.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/test-create-pr-error-handling.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/terminal-stylist.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/super-linter.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/step-name-alignment.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/static-analysis-report.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/smoke-call-workflow.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/sergo.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/semantic-function-refactor.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/security-review.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/security-compliance.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/schema-consistency-checker.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/safe-output-health.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/repo-tree-map.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/release.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/q.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/prompt-clustering-analysis.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/pdf-summary.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/metrics-collector.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/mergefest.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/lockfile-stats.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/layout-spec-maintainer.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/jsweep.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/instructions-janitor.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/gpclean.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/go-pattern-detector.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/go-fan.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/github-mcp-tools-report.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/github-mcp-structural-analysis.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/firewall.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/example-workflow-analyzer.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/example-permissions-warning.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/duplicate-code-detector.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/dev.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/dev-hawk.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/delight.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/deep-report.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/daily-security-red-team.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/daily-safe-outputs-conformance.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/daily-function-namer.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/daily-fact.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/daily-code-metrics.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/daily-choice-test.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/craft.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/copilot-session-insights.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/copilot-agent-analysis.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/commit-changes-analyzer.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/codex-github-remote-mcp-test.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/cloclo.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/cli-version-checker.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/changeset.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/blog-auditor.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/audit-workflows.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/artifacts-summary.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/archie.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/ai-moderator.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
| .github/workflows/ace-editor.lock.yml | Replaces lockdown env/header wiring with guard policy env vars and guard-policies config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| // Add guard policy env vars if the determine-automatic-lockdown step will be generated. | ||
| // Skip when a GitHub App is configured or when guard policy is already explicitly set — | ||
| // in those cases, the determine-automatic-lockdown step is not generated. | ||
| // Security: Pass step outputs through environment variables to prevent template injection. | ||
| guardPoliciesExplicit := len(getGitHubGuardPolicies(githubTool)) > 0 | ||
| if !guardPoliciesExplicit && !appConfigured { | ||
| envVars["GITHUB_MCP_GUARD_MIN_INTEGRITY"] = "${{ steps.determine-automatic-lockdown.outputs.min_integrity }}" | ||
| envVars["GITHUB_MCP_GUARD_REPOS"] = "${{ steps.determine-automatic-lockdown.outputs.repos }}" | ||
| } |
|
@copilot apply comment and use repos: all and min-integrity: none for private repos. |
Private/internal repositories now always emit min_integrity=none and repos=all outputs (unless already configured), so the guard-policies block in the GitHub MCP config is never populated with empty values. Pre-configured values are always passed through via setOutput regardless of whether they were auto-set or came from the workflow config. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 34f5df7. Private/internal repositories now always emit |
|
✅ All tools validated successfully! Agent Container Smoke Test confirms agent container is ready. |
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
💥 WHOOSH! Smoke Claude springs into action on this pull request! [Panel 1 begins...] |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
Agent Container Tool Check
Result: 12/12 tools available ✅ Overall Status: PASS
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
The
determine_automatic_lockdown.cjsruntime check previously auto-emittedlockdown=truefor public repos. This switches it to instead auto-configuremin_integrityandreposguard policy fields on the GitHub MCP server for all repositories, and stops emitting thelockdownfield automatically.Behavior changes
determine_automatic_lockdown.cjsmin_integrity=approvedif not already configured; outputsrepos=allif not already configuredmin_integrity=noneif not already configured; outputsrepos=allif not already configuredmin_integrityandreposoutputs so theguard-policiesblock in the GitHub MCP config is never populated with empty valuessetOutput(never overridden)lockdownoutputGH_AW_GITHUB_MIN_INTEGRITY/GH_AW_GITHUB_REPOSenv vars (set at compile time fromtools.githubguard policy config), so the step won't override explicit configurationreposandmin-integrityvalues, with aSourcecolumn indicating whether each came from the workflow config or was automatically applied (automatic (public repo)/automatic (private repo))Step generation condition (
mcp_github_config.go)repos+min-integrityset), rather than whenlockdownis explicitly setMCP config rendering (
mcp_renderer_github.go,mcp_environment.go)GITHUB_MCP_LOCKDOWN→GITHUB_MCP_GUARD_MIN_INTEGRITY+GITHUB_MCP_GUARD_REPOSenv vars sourced from step outputsguard-policiessection is rendered with bash variable refs that resolve at runtime:For private repos,
min-integrityresolves tononeandrepostoall, ensuring a valid (permissive) guard policy is always applied. Explicitlockdown: truein workflow config continues to work unchanged.Original prompt
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.