Repository navigation
Preserve valid GitHub App checkout token permissions when permissions.contents: none skips default checkout - #59743
Conversation
Co-authored-by: pelikhan <[email protected]>
Co-authored-by: pelikhan <[email protected]>
permissions.contents: none skips default checkout
There was a problem hiding this comment.
🟡 Changes recommended
Safe-output checkouts remain broken, skipped default checkouts can mint unnecessary tokens, and unrelated lockfile drift should be removed.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Fixes target-only GitHub App checkouts by requesting contents: read while still suppressing the default checkout.
Changes:
- Adds checkout-specific permission resolution and regression coverage.
- Regenerates 12 workflow locks with unrelated
gpt-6routing changes.
File summaries
| File | Description |
|---|---|
pkg/workflow/compiler_yaml_checkout.go |
Adjusts checkout App-token permissions. |
pkg/workflow/checkout_disabled_test.go |
Tests target-only App checkout behavior. |
.github/workflows/windows.lock.yml |
Adds generated gpt-6 routing. |
.github/workflows/windows-grower.lock.yml |
Adds generated gpt-6 routing. |
.github/workflows/semantic-function-refactor.lock.yml |
Adds generated gpt-6 routing. |
.github/workflows/notion-issue-summary.lock.yml |
Adds generated gpt-6 routing. |
.github/workflows/hippo-embed.lock.yml |
Adds generated gpt-6 routing. |
.github/workflows/firewall.lock.yml |
Adds generated gpt-6 routing. |
.github/workflows/example-permissions-warning.lock.yml |
Adds generated gpt-6 routing. |
.github/workflows/daily-max-ai-credits-test.lock.yml |
Adds generated gpt-6 routing. |
.github/workflows/daily-harness-experiment-proposer.lock.yml |
Adds generated gpt-6 routing. |
.github/workflows/daily-credit-limit-test.lock.yml |
Adds generated gpt-6 routing. |
.github/workflows/codex-github-remote-mcp-test.lock.yml |
Adds generated gpt-6 routing. |
.github/workflows/agentic-token-optimizer.lock.yml |
Adds generated gpt-6 routing. |
Review details
- Files reviewed: 30/299 changed files
- Comments generated: 3
- Review effort level: Balanced
| // resolveCheckoutAppTokenPermissions returns permissions for checkout GitHub App token minting. | ||
| // Explicit target checkouts still need repository contents access, even when | ||
| // permissions.contents is set to none to suppress the default workflow checkout. | ||
| func resolveCheckoutAppTokenPermissions(data *WorkflowData) *Permissions { |
There was a problem hiding this comment.
Fixed in bf54249: resolveCheckoutAppTokenPermissions moved next to resolveCheckoutPermissions in checkout_manager.go and is now used by both callers — the agent job (compiler_yaml_checkout.go) and the safe_outputs job (compiler_safe_outputs_steps.go, both the github-app and safe-outputs-github-app mint paths).
| (umask 177 && touch /tmp/gh-aw/agent-stdio.log) | ||
| # shellcheck disable=SC2016 | ||
| printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.28.14/awf-config.schema.json","network":{"allowDomains":["api.snapcraft.io","archive.ubuntu.com","azure.archive.ubuntu.com","crl.geotrust.com","crl.globalsign.com","crl.identrust.com","crl.sectigo.com","crl.thawte.com","crl.usertrust.com","crl.verisign.com","crl3.digicert.com","crl4.digicert.com","crls.ssl.com","json-schema.org","json.schemastore.org","keyserver.ubuntu.com","ocsp.digicert.com","ocsp.geotrust.com","ocsp.globalsign.com","ocsp.identrust.com","ocsp.sectigo.com","ocsp.ssl.com","ocsp.thawte.com","ocsp.usertrust.com","ocsp.verisign.com","packagecloud.io","packages.cloud.google.com","packages.microsoft.com","ppa.launchpad.net","s.symcb.com","s.symcd.com","security.ubuntu.com","ts-crl.ws.symantec.com","ts-ocsp.ws.symantec.com","www.googleapis.com"],"isolation":true,"topologyAttach":["awmg-mcpg","awmg-cli-proxy"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxCacheMisses":5,"maxAiCredits":1500,"models":{"agent":["sonnet-6x","gpt-5.4","gpt-5.5","gpt-5.6","gpt-5.3","gemini-pro","any"],"antigravity":["copilot/antigravity*","google/antigravity*","gemini/antigravity*"],"any":["copilot/*","anthropic/*","openai/*","google/*","gemini/*"],"auto":["copilot/auto","large"],"claude":["agent"],"codex":["agent"],"coding":["copilot/gpt-5*codex*","openai/gpt-5*codex*","gpt-5-codex","kimi"],"computer-use":["copilot/*computer-use*","google/*computer-use*","gemini/*computer-use*","openai/*computer-use*"],"copilot":["agent"],"deep-research":["copilot/deep-research*","copilot/o3-deep-research*","copilot/o4-mini-deep-research*","google/deep-research*","gemini/deep-research*","openai/o3-deep-research*","openai/o4-mini-deep-research*"],"detection":["small"],"evals":["small"],"fable":["copilot/*fable*","anthropic/*fable*"],"gemini":["agent"],"gemini-3-flash":["copilot/gemini-3*flash*","google/gemini-3*flash*","gemini/gemini-3*flash*"],"gemini-3-pro":["copilot/gemini-3*pro*","google/gemini-3*pro*","google/nano-banana*","gemini/gemini-3*pro*"],"gemini-3.1-flash":["copilot/gemini-3.1*flash*","google/gemini-3.1*flash*","gemini/gemini-3.1*flash*"],"gemini-3.1-pro":["copilot/gemini-3.1*pro*","google/gemini-3.1*pro*","gemini/gemini-3.1*pro*"],"gemini-3.5-flash":["copilot/gemini-3.5*flash*","google/gemini-3.5*flash*","gemini/gemini-3.5*flash*"],"gemini-3.6-flash":["copilot/gemini-3.6*flash*","google/gemini-3.6*flash*","gemini/gemini-3.6*flash*"],"gemini-3.7-flash":["copilot/gemini-3.7*flash*","google/gemini-3.7*flash*","gemini/gemini-3.7*flash*"],"gemini-flash":["copilot/gemini-*flash*","google/gemini-*flash*","gemini/gemini-*flash*"],"gemini-flash-lite":["copilot/gemini-*flash*lite*","google/gemini-*flash*lite*","gemini/gemini-*flash*lite*"],"gemini-omni":["copilot/gemini-omni*","google/gemini-omni*","gemini/gemini-omni*"],"gemini-pro":["copilot/gemini-*pro*","google/gemini-*pro*","gemini/gemini-*pro*"],"gemma":["copilot/gemma*","google/gemma*","gemini/gemma*"],"gpt-5":["copilot/gpt-5*","openai/gpt-5*"],"gpt-5-codex":["copilot/gpt-5*codex*","openai/gpt-5*codex*"],"gpt-5-mini":["copilot/gpt-5*mini*","openai/gpt-5*mini*"],"gpt-5-nano":["copilot/gpt-5*nano*","openai/gpt-5*nano*"],"gpt-5-pro":["copilot/gpt-5*pro*","openai/gpt-5*pro*"],"gpt-5.1":["copilot/gpt-5.1*","openai/gpt-5.1*"],"gpt-5.2":["copilot/gpt-5.2*","openai/gpt-5.2*"],"gpt-5.3":["copilot/gpt-5.3*","openai/gpt-5.3*"],"gpt-5.4":["copilot/gpt-5.4*","openai/gpt-5.4*"],"gpt-5.5":["copilot/gpt-5.5*","openai/gpt-5.5*"],"gpt-5.6":["copilot/gpt-5.6*","openai/gpt-5.6*"],"grok":["copilot/*grok*","openai/*grok*"],"haiku":["copilot/*haiku*","anthropic/*haiku*"],"image-generation":["copilot/gpt-image*","openai/gpt-image*","openai/chatgpt-image*","copilot/gemini-*image*","google/gemini-*image*","gemini/gemini-*image*","google/imagen*"],"kimi":["copilot/kimi*","openai/kimi*"],"kiwi":["copilot/kiwi*","openai/kiwi*"],"large":["sonnet","gpt-5-pro","gpt-5","gemini-pro"],"lyria":["google/lyria*","gemini/lyria*","copilot/lyria*"],"mai-code":["copilot/MAI-Code*","copilot/mai-code*","openai/MAI-Code*"],"mai-code-1-flash-picker":["copilot/MAI-Code-1-Flash-picker*","copilot/mai-code-1-flash-picker*","openai/MAI-Code-1-Flash-picker*"],"mini":["haiku","gpt-5-mini","gpt-5-nano","gemini-flash-lite"],"nano-banana":["copilot/nano-banana*","google/nano-banana*","gemini/nano-banana*"],"opus":["copilot/*opus*","anthropic/*opus*"],"opusplan":["opus?effort=high"],"raptor-mini":["copilot/raptor*","openai/raptor*"],"reasoning":["copilot/o1*","copilot/o3*","copilot/o4*","openai/o1*","openai/o3*","openai/o4*"],"robotics":["copilot/*robotics*","google/*robotics*","gemini/*robotics*"],"small":["mini"],"small-agent":["haiku","gpt-5-mini","gemini-flash"],"sonnet":["copilot/*sonnet*","anthropic/*sonnet*"],"sonnet-6x":["copilot/*sonnet-4.5*","copilot/*sonnet-4.6*","copilot/*sonnet-5*","copilot/*sonnet-4-5-*","anthropic/*sonnet-4-5-*","copilot/*sonnet-4-6*","anthropic/*sonnet-4-6*","anthropic/*sonnet-5*"],"summarization":["haiku","gpt-5-mini","gemini-flash-lite","mini"],"veo":["google/veo*","gemini/veo*"],"vision":["copilot/gemini-*image*","google/gemini-*image*","gemini/gemini-*image*","copilot/gemini-*flash*","google/gemini-*flash*","gemini/gemini-*flash*"]}},"container":{"imageTag":"0.28.14,squid=sha256:2ce8df3abf3e9b76e9c0cf5863da41f1ab3f89b20ad14b988806ab89e7bf2cd5,agent=sha256:f7df036c86575527b61f3f7df91c4412349a12b2a74988d929eafa2999230c98,api-proxy=sha256:6f95e2234dd9bd6333a8ff28ccea7ecf0204acd4a09108723844dbd2bf6268c5,cli-proxy=sha256:3a379c5e96e29499c815e9dd2a71334d01c326a9b73991c76544fda9cae35c34"},"logging":{"proxyLogsDir":"/tmp/gh-aw/sandbox/firewall/logs","auditDir":"/tmp/gh-aw/sandbox/firewall/audit"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" | ||
| printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.28.14/awf-config.schema.json","network":{"allowDomains":["api.snapcraft.io","archive.ubuntu.com","azure.archive.ubuntu.com","crl.geotrust.com","crl.globalsign.com","crl.identrust.com","crl.sectigo.com","crl.thawte.com","crl.usertrust.com","crl.verisign.com","crl3.digicert.com","crl4.digicert.com","crls.ssl.com","json-schema.org","json.schemastore.org","keyserver.ubuntu.com","ocsp.digicert.com","ocsp.geotrust.com","ocsp.globalsign.com","ocsp.identrust.com","ocsp.sectigo.com","ocsp.ssl.com","ocsp.thawte.com","ocsp.usertrust.com","ocsp.verisign.com","packagecloud.io","packages.cloud.google.com","packages.microsoft.com","ppa.launchpad.net","s.symcb.com","s.symcd.com","security.ubuntu.com","ts-crl.ws.symantec.com","ts-ocsp.ws.symantec.com","www.googleapis.com"],"isolation":true,"topologyAttach":["awmg-mcpg","awmg-cli-proxy"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxCacheMisses":5,"maxAiCredits":1500,"models":{"agent":["sonnet-6x","gpt-6","gpt-5.4","gpt-5.5","gpt-5.6","gpt-5.3","gemini-pro","any"],"antigravity":["copilot/antigravity*","google/antigravity*","gemini/antigravity*"],"any":["copilot/*","anthropic/*","openai/*","google/*","gemini/*"],"auto":["copilot/auto","large"],"claude":["agent"],"codex":["agent"],"coding":["copilot/gpt-5*codex*","openai/gpt-5*codex*","gpt-5-codex","kimi"],"computer-use":["copilot/*computer-use*","google/*computer-use*","gemini/*computer-use*","openai/*computer-use*"],"copilot":["agent"],"deep-research":["copilot/deep-research*","copilot/o3-deep-research*","copilot/o4-mini-deep-research*","google/deep-research*","gemini/deep-research*","openai/o3-deep-research*","openai/o4-mini-deep-research*"],"detection":["small"],"evals":["small"],"fable":["copilot/*fable*","anthropic/*fable*"],"gemini":["agent"],"gemini-3-flash":["copilot/gemini-3*flash*","google/gemini-3*flash*","gemini/gemini-3*flash*"],"gemini-3-pro":["copilot/gemini-3*pro*","google/gemini-3*pro*","google/nano-banana*","gemini/gemini-3*pro*"],"gemini-3.1-flash":["copilot/gemini-3.1*flash*","google/gemini-3.1*flash*","gemini/gemini-3.1*flash*"],"gemini-3.1-pro":["copilot/gemini-3.1*pro*","google/gemini-3.1*pro*","gemini/gemini-3.1*pro*"],"gemini-3.5-flash":["copilot/gemini-3.5*flash*","google/gemini-3.5*flash*","gemini/gemini-3.5*flash*"],"gemini-3.6-flash":["copilot/gemini-3.6*flash*","google/gemini-3.6*flash*","gemini/gemini-3.6*flash*"],"gemini-3.7-flash":["copilot/gemini-3.7*flash*","google/gemini-3.7*flash*","gemini/gemini-3.7*flash*"],"gemini-flash":["copilot/gemini-*flash*","google/gemini-*flash*","gemini/gemini-*flash*"],"gemini-flash-lite":["copilot/gemini-*flash*lite*","google/gemini-*flash*lite*","gemini/gemini-*flash*lite*"],"gemini-omni":["copilot/gemini-omni*","google/gemini-omni*","gemini/gemini-omni*"],"gemini-pro":["copilot/gemini-*pro*","google/gemini-*pro*","gemini/gemini-*pro*"],"gemma":["copilot/gemma*","google/gemma*","gemini/gemma*"],"gpt-5":["copilot/gpt-5*","openai/gpt-5*"],"gpt-5-codex":["copilot/gpt-5*codex*","openai/gpt-5*codex*"],"gpt-5-mini":["copilot/gpt-5*mini*","openai/gpt-5*mini*"],"gpt-5-nano":["copilot/gpt-5*nano*","openai/gpt-5*nano*"],"gpt-5-pro":["copilot/gpt-5*pro*","openai/gpt-5*pro*"],"gpt-5.1":["copilot/gpt-5.1*","openai/gpt-5.1*"],"gpt-5.2":["copilot/gpt-5.2*","openai/gpt-5.2*"],"gpt-5.3":["copilot/gpt-5.3*","openai/gpt-5.3*"],"gpt-5.4":["copilot/gpt-5.4*","openai/gpt-5.4*"],"gpt-5.5":["copilot/gpt-5.5*","openai/gpt-5.5*"],"gpt-5.6":["copilot/gpt-5.6*","openai/gpt-5.6*"],"gpt-6":["copilot/gpt-6*","openai/gpt-6*"],"grok":["copilot/*grok*","openai/*grok*"],"haiku":["copilot/*haiku*","anthropic/*haiku*"],"image-generation":["copilot/gpt-image*","openai/gpt-image*","openai/chatgpt-image*","copilot/gemini-*image*","google/gemini-*image*","gemini/gemini-*image*","google/imagen*"],"kimi":["copilot/kimi*","openai/kimi*"],"kiwi":["copilot/kiwi*","openai/kiwi*"],"large":["sonnet","gpt-6","gpt-5-pro","gpt-5","gemini-pro"],"lyria":["google/lyria*","gemini/lyria*","copilot/lyria*"],"mai-code":["copilot/MAI-Code*","copilot/mai-code*","openai/MAI-Code*"],"mai-code-1-flash-picker":["copilot/MAI-Code-1-Flash-picker*","copilot/mai-code-1-flash-picker*","openai/MAI-Code-1-Flash-picker*"],"mini":["haiku","gpt-5-mini","gpt-5-nano","gemini-flash-lite"],"nano-banana":["copilot/nano-banana*","google/nano-banana*","gemini/nano-banana*"],"opus":["copilot/*opus*","anthropic/*opus*"],"opusplan":["opus?effort=high"],"raptor-mini":["copilot/raptor*","openai/raptor*"],"reasoning":["copilot/o1*","copilot/o3*","copilot/o4*","openai/o1*","openai/o3*","openai/o4*"],"robotics":["copilot/*robotics*","google/*robotics*","gemini/*robotics*"],"small":["mini"],"small-agent":["haiku","gpt-5-mini","gemini-flash"],"sonnet":["copilot/*sonnet*","anthropic/*sonnet*"],"sonnet-6x":["copilot/*sonnet-4.5*","copilot/*sonnet-4.6*","copilot/*sonnet-5*","copilot/*sonnet-4-5-*","anthropic/*sonnet-4-5-*","copilot/*sonnet-4-6*","anthropic/*sonnet-4-6*","anthropic/*sonnet-5*"],"summarization":["haiku","gpt-5-mini","gemini-flash-lite","mini"],"veo":["google/veo*","gemini/veo*"],"vision":["copilot/gemini-*image*","google/gemini-*image*","gemini/gemini-*image*","copilot/gemini-*flash*","google/gemini-*flash*","gemini/gemini-*flash*"]}},"container":{"imageTag":"0.28.14,squid=sha256:2ce8df3abf3e9b76e9c0cf5863da41f1ab3f89b20ad14b988806ab89e7bf2cd5,agent=sha256:f7df036c86575527b61f3f7df91c4412349a12b2a74988d929eafa2999230c98,api-proxy=sha256:6f95e2234dd9bd6333a8ff28ccea7ecf0204acd4a09108723844dbd2bf6268c5,cli-proxy=sha256:3a379c5e96e29499c815e9dd2a71334d01c326a9b73991c76544fda9cae35c34"},"logging":{"proxyLogsDir":"/tmp/gh-aw/sandbox/firewall/logs","auditDir":"/tmp/gh-aw/sandbox/firewall/audit"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" |
There was a problem hiding this comment.
Removed in bf54249: all .github/workflows/*.lock.yml files are reverted to the base commit, so this PR contains only the Go changes and tests. No repository workflow uses checkout app auth, so the compiler change produces no lock-file changes.
| if checkoutMgr.HasAppAuth() { | ||
| compilerYamlLog.Print("Generating checkout app token minting steps in agent job") | ||
| for _, step := range checkoutMgr.GenerateCheckoutAppTokenSteps(c, resolveCheckoutPermissions(data)) { | ||
| for _, step := range checkoutMgr.GenerateCheckoutAppTokenSteps(c, resolveCheckoutAppTokenPermissions(data)) { |
There was a problem hiding this comment.
Fixed in bf54249: CheckoutManager.SetSkipDefaultCheckout is set from !needsCheckout (agent job) and data.CheckoutSkipDefault (safe_outputs job), and both app-token generators skip the default entry when it is suppressed, so no unused contents: read token is minted. Target entries are unaffected and the regression test asserts checkout-app-token-0 is absent while checkout-app-token-1 is present.
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅ Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "github.com"See Network Configuration for more information.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality Sentinel skipped because pre-fetch PR data was unavailable: unable to fetch test file diff
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Warning Threat Detection Engine Failure — The analysis engine could not complete. This is a tooling failure, not a security finding. What happenedThe threat detection engine failed to produce results. Review the workflow run logs for details.
|
|
✅ PR Code Quality Reviewer completed the code quality review. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "github.com"See Network Configuration for more information.
|
|
✅ Ponytail Reviewer completed successfully! Lean already. Ship. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "ab.chatgpt.com"See Network Configuration for more information.
|
Comment MemoryNote This comment is managed by comment memory.It stores persistent context for this thread in the code block at the top of this comment. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "github.com"See Network Configuration for more information.
|
There was a problem hiding this comment.
Request changes
The agent-job path is fixed, but the matching safe_outputs checkout path still uses the old permission resolver, so target-only PR/push workflows with checkout GitHub App auth can still fail.
Blocking theme
The new regression coverage only inspects the agent job, which means it will not catch the still-broken safe_outputs path that mirrors checkout token minting for PR operations.
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
github.com
To allow these domains, add them to the network.allowed list in your workflow frontmatter:
network:
allowed:
- defaults
- "github.com"See Network Configuration for more information.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 60.1 AIC · ⌖ 5.69 AIC · ⊞ 22.9K
Comment /review to run again
| require.NoError(t, err, "should read lock file") | ||
| lockContentStr := string(lockContent) | ||
|
|
||
| agentJobStart := strings.Index(lockContentStr, "\n agent:") |
There was a problem hiding this comment.
This test only inspects the agent section, so it will still pass while the mirrored safe_outputs checkout path keeps emitting permission-contents: none and breaking PR/push flows.
💡 Why this is still broken
generateAppTokenAndDefaultCheckoutSteps now calls resolveCheckoutAppTokenPermissions, but buildSharedPRCheckoutSteps still passes resolveCheckoutPermissions(data) to both checkout app-token generators. That leaves the safe-outputs create-pull-request / push-to-pull-request-branch path on the old behavior, which is exactly the path that needs a valid checkout token for target-only cross-repo operations.
A tighter regression test here should also assert the compiled safe_outputs job requests permission-contents: read for these tokens; otherwise this test will stay green while the write path is still broken.
There was a problem hiding this comment.
Fixed in bf54249: buildSharedPRCheckoutSteps now mints both checkout-app-token-* and checkout-safe-output-app-token-* with resolveCheckoutAppTokenPermissions, and a new regression test (TestCheckoutDisabledWithSafeOutputsAppTargetUsesContentsReadForMintedToken) compiles a target-only workflow with create-pull-request and asserts permission-contents: read in the safe_outputs job.
There was a problem hiding this comment.
Reviewed with Impeccable harden/audit modes (bug-fix category: checkout permission resolution for GitHub App token minting).
The two substantive gaps in this fix are already flagged by existing Copilot review comments on this PR and remain unaddressed as of this review:
resolveCheckoutAppTokenPermissionsis only wired into the agent-job caller (compiler_yaml_checkout.go:96);buildSharedPRCheckoutStepsincompiler_safe_outputs_steps.gostill calls the unfixedresolveCheckoutPermissionsfor the same token-minting generator, so the same regression persists for thesafe_outputsjob path (comment on line 131).- The elevation to
contents: readis applied unconditionally to every app-authenticated checkout entry, including ones that back the (skipped) default checkout, rather than only entries needed forneedsCheckout-independent target checkouts (comment on line 96).
No new actionable issues found beyond what's already tracked in the open review thread.
Warning
Firewall blocked 2 domains
The following domains were blocked by the firewall during workflow execution:
api.github.comgithub.com
[!TIP]
api.github.com is blocked because GitHub API access uses the built-in GitHub tools by default. Instead of adding api.github.com to network.allowed, use tools.github.mode: gh-proxy for direct pre-authenticated GitHub CLI access without requiring network access to api.github.com:
tools:
github:
mode: gh-proxySee GitHub Tools for more information on gh-proxy mode.
To allow these domains, add them to the network.allowed list in your workflow frontmatter:
network:
allowed:
- defaults
- "api.github.com"
- "github.com"See Network Configuration for more information.
🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · copilot · sonnet50 · 126.7 AIC · ⌖ 13.6 AIC · ⊞ 8.4K
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs — requesting changes: the root cause is only partially fixed.
📋 Key Themes & Highlights
Key Themes
- Root-cause fix is scoped to one of two call sites. The bug (
permissions.contents: noneleaking intoactions/create-github-app-tokenfor checkout tokens) is fixed for the agent job (generateAppTokenAndDefaultCheckoutStepsincompiler_yaml_checkout.go) but the sameCheckoutManagergenerators are reused bybuildSharedPRCheckoutStepsincompiler_safe_outputs_steps.go, which still calls the un-elevatedresolveCheckoutPermissions. Any workflow combiningpermissions.contents: none, agithub-app-authenticated checkout, and acreate_pull_request/push_to_pull_request_branchsafe output will still mint an invalidpermission-contents: nonetoken — in the safe_outputs job instead of the agent job. This is a regression-fix PR, so per/diagnosing-bugsthe fix should cover every path that reaches the buggy behavior, not just the one exercised by the new test. - Regression test only covers the agent job.
TestCheckoutDisabledWithGitHubAppTargetUsesContentsReadForMintedTokenis a solid, well-structured regression test, but it doesn't reachbuildSharedPRCheckoutSteps/compiler_safe_outputs_steps.go, so the gap above has no test coverage and would ship silently. - Existing Copilot review comments on this PR (lines 96 and 131 of
compiler_yaml_checkout.go) already flag closely related concerns — worth resolving together.
Positive Highlights
- ✅
resolveCheckoutAppTokenPermissionsis a clean, minimal, well-documented wrapper that keeps the "none skips default checkout" behavior separate from "minted tokens need contents:read" — good separation of concerns. - ✅ The new regression test asserts both directions (
permission-contents: readpresent,permission-contents: noneabsent) and checks the target checkout is still emitted — good test shape for a regression fix.
@copilot please address the review comments above.
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
github.com
To allow these domains, add them to the network.allowed list in your workflow frontmatter:
network:
allowed:
- defaults
- "github.com"See Network Configuration for more information.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 213.9 AIC · ⌖ 15.2 AIC · ⊞ 10.4K
Comment /matt to run again
|
@copilot please address the outstanding review feedback before running the Outstanding unresolved review threads:
Please also refresh the branch if needed and then run the
|
… suppressed default mints Co-authored-by: gh-aw-bot <[email protected]>
|
Category: bug | Risk: medium | Score: 62/100 (impact 32/50, urgency 17/30, quality 13/20) | Action: batch_review | Reason: focused checkout permission fix with good regression coverage; best handled as part of the auth/checkout batch.
|
|
@copilot please address the remaining review feedback, refresh the branch if needed, and then run the Outstanding review feedback:
|
Ran
Branch is already up to date ( Two hand-offs I can't do from here: the four review threads still show unresolved (I can reply but have no thread-resolve permission), and CI needs a maintainer re-trigger since agent pushes don't start workflows. Not merging, per skill rules. |
|
🎉 This pull request is included in a new release. Release: |
permissions.contents: nonecorrectly suppresses the workflow-repo default checkout, but it also propagatedpermission-contents: noneintoactions/create-github-app-tokenfor explicit target checkouts. That makes token minting invalid for GitHub App installs and breaks target-only checkout flows.Permission resolution for checkout app-token minting
contents: readminimum when minting checkout GitHub App tokens.permissions.contents: noneto skip default checkout.Compiler wiring update
Regression coverage
github-appand workflow-levelpermissions.contents: none, asserting:permission-contents: read(notnone)Run: https://github.com/github/gh-aw/actions/runs/34390852001