Conversation
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
|
@copilot remove support for the deprecated "repos", error should suggest using "allowed-repos" |
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
|
✅ PR Specification Reviewer completed successfully!
|
|
✅ PR Code Quality Reviewer completed the code quality review. Agent messagesNo-op message Completed PR #84375 review: submitted one request-changes review with 3 inline findings and recorded the outcome. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. The
|
|
✅ Test Quality Sentinel completed test quality analysis.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Ponytail Reviewer completed successfully! Agent messagesNo-op message Lean already. Ship. Ponytail ReviewerOutcome: 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. The
|
There was a problem hiding this comment.
Overview
Reviewed PR head 492e4f6ca458198027a3370021797f528a291257 against the guard-policy, compiler-threat, and security-architecture contracts.
Key issue
The intentional removal of the tools.github.repos alias is not synchronized with the authoritative specs/security-architecture-spec-validation.md Trigger #3 decision log, which still states that the alias is accepted and tested identically, and treats the matter as terminology-only. Related threat wording should also be checked. The inline finding requests those formal contract records be updated or explicitly justified; scratchpad changes alone are insufficient.
Static review only; no tests or conformance scripts were run.
References:
Generated by PR Specification Reviewer for #84375 · copilot · gpt-5 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.9K
Comment /review-specs to run again
| if allowedRepos, ok := configMap["allowed-repos"]; ok { | ||
| // Parse guard policy fields directly under github. | ||
| if _, ok := configMap["repos"]; ok { | ||
| config.reposParseErr = errors.New("'tools.github.repos' is no longer supported; use 'tools.github.allowed-repos' instead") |
There was a problem hiding this comment.
Contract synchronization required
This parser change removes the repos alias, but the authoritative specs/security-architecture-spec-validation.md §Trigger #3 decision log still says the alias is accepted, validated identically, and covered by tests, and classifies the issue as a non-behavioral terminology clarification. That is now false and can mislead future security reviews. Please update that validation record (and any affected normative threat wording, including specs/compiler-threat-detection-spec.md CTR-039) in this PR, or document why those references intentionally retain historical semantics. The scratchpad update alone does not synchronize the formal contracts.
There was a problem hiding this comment.
Updated the decision log and CTR-039 wording in c912bd6; the earlier decision is explicitly historical.
Comment MemoryPeek at saved memory (pr-code-quality-reviewer)Note This comment is managed by comment memory.Expand the saved memory block to view or edit the persistent context for this thread.
|
There was a problem hiding this comment.
Found three blocking issues in the changed behavior:
- A raw
reposkey can be ignored by gateway policy derivation and widen the effective scope toalloutside the parser path. - The workflow schema now accepts arbitrary values for the unsupported
reposproperty instead of rejecting it. - The updated lockdown test no longer covers the warning path it previously exercised.
Please address the inline comments before merging.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt-5 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.8K
Comment /review to run again
| }, | ||
| }, | ||
| shouldError: false, | ||
| shouldError: true, |
There was a problem hiding this comment.
This change makes the case fail during parsing because repos is now rejected, so it no longer exercises the lockdown/guard-policy warning path it was intended to cover. Please retain a separate allowed-repos + min-integrity under lockdown: true case (with shouldError: false) to preserve coverage of that warning behavior, while keeping the new rejection test separate.
There was a problem hiding this comment.
The separate allowed-repos + min-integrity lockdown warning case is retained in 492e4f6 and passes.
| "minItems": 1 | ||
| } | ||
| ] | ||
| "x-deprecation-message": "'tools.github.repos' is no longer supported. Use 'tools.github.allowed-repos' instead. Run 'gh aw fix' to automatically migrate." |
There was a problem hiding this comment.
Removing the oneOf leaves repos with no type, not, or equivalent constraint, so schema-based validators and editors accept any value for this now-unsupported field. That makes the published schema disagree with the compiler rejection behavior and weakens early validation. Add a schema that rejects the property outright (or otherwise makes its unsupported status machine-enforceable).
There was a problem hiding this comment.
The schema now rejects every repos value, with compiler migration guidance and schema tests in c912bd6.
| hasToolCallLimits := len(toolCallLimits) > 0 | ||
|
|
||
| // Support both 'allowed-repos' (preferred) and deprecated 'repos' | ||
| repos, hasRepos := githubTool["allowed-repos"] |
There was a problem hiding this comment.
getGitHubGuardPolicies now ignores a repos key if it receives a raw tool map that bypasses parseGitHubTool. With min-integrity present, the code then defaults policy["repos"] to "all", widening the configured scope from a specific repository or pattern. Please fail closed when repos is present (or ensure this function returns an error) rather than silently treating it as absent.
There was a problem hiding this comment.
Raw legacy keys now produce an empty repository scope rather than defaulting to all; coverage is in c912bd6.
Comment MemoryPeek at saved memory (spec-review-history)History |
Comment MemoryPeek at saved memory (review-history)History |
🧪 Test Quality Sentinel Report🟡 Test Quality Score: 79/100 — Acceptable
📊 Metrics (5 tests)
Score: 40 × 5/5 + 30 × 4/5 + (20 − 5) + 0 (inflation) = 79.
|
There was a problem hiding this comment.
✅ Test Quality Sentinel: 79/100. 0% implementation tests (threshold: 30%).
🧪 Test quality analysis by Test Quality Sentinel · copilot · requested: claude-haiku-5.5 · routed: claude-haiku-5.5 xhigh · ~6 AIC · ⌖ ~2 AIC · ⊞ 4.7K
Comment /review to run again
There was a problem hiding this comment.
🟡 Changes recommended
Removing repos breaks supported configurations without breaking-change documentation and leaves existing positive fixtures producing incorrect guard policies and failing assertions.
2 open issues
What changed in this PR
Updates gh-aw’s GitHub repository-scope handling and specification status notes. The implementation rejects repos entirely, including standalone use, rather than only conflicting scopes.
Changes:
- Rejects legacy
reposinput and removes alias handling. - Updates validation tests, dry-run reporting, and migration documentation.
- Clarifies specification enforcement, schema differences, and advisory status.
| File | Description |
|---|---|
| specs/intent-attribution-agent-governance.md | Marks drift escalation as planned. |
| specs/go-dependency-advisories.md | Records advisory and dependency checks. |
| specs/compiler-threat-detection-changelog.md | Defines unreleased-row dates. |
| scratchpad/guard-policies-specification.md | Documents alias removal and schema differences. |
| scratchpad/github-mcp-access-control-specification.md | Separates deferred-field statuses. |
| pkg/workflow/tools_validation_test.go | Adds legacy-field rejection tests. |
| pkg/workflow/tools_validation_github.go | Removes alias normalization. |
| pkg/workflow/tools_validation_github_test.go | Uses supported repository scopes. |
| pkg/workflow/tools_types.go | Removes the legacy struct field. |
| pkg/workflow/tools_parser.go | Rejects repos during parsing. |
| pkg/workflow/mcp_github_config.go | Removes legacy scope fallback. |
| pkg/parser/schemas/main_workflow_schema.json | Marks repos unsupported. |
| pkg/cli/compile_guard_policy_report.go | Reports only supported scopes. |
| pkg/cli/compile_guard_policy_report_test.go | Updates scope-reporting coverage. |
| docs/src/content/docs/reference/github-tools.md | Explains migration from repos. |
Review effort: Balanced (adaptive)
| hasToolCallLimits := len(toolCallLimits) > 0 | ||
|
|
||
| // Support both 'allowed-repos' (preferred) and deprecated 'repos' | ||
| repos, hasRepos := githubTool["allowed-repos"] |
There was a problem hiding this comment.
Migrated the positive fixtures and retained rejection coverage in c912bd6; targeted and integration tests pass.
| if _, ok := configMap["repos"]; ok { | ||
| config.reposParseErr = errors.New("'tools.github.repos' is no longer supported; use 'tools.github.allowed-repos' instead") |
There was a problem hiding this comment.
Documented the breaking removal and migration in the unreleased changelog in c912bd6. Existing pending major changesets mark the next release as major.
There was a problem hiding this comment.
The parser-level rejection of tools.github.repos is the right gate, and the schema, spec, and docs updates are consistent. Two issues need fixing before merge:
- Failing tests. Targeted runs fail in
TestGuardPolicyMinIntegrityOnly(CLI fixtures still userepos),TestGitHubGuardPolicyRepositoryScopes/*/repos/gateway, andTestDeriveSafeOutputsGuardPolicyFromGitHub(fixtures still userepos). The safeoutputs failures come from fixtures, not from the code. - Stale
reposreaders. The DIFC proxy and lockdown-step builders still fall back torepos, so the gateway, DIFC proxy, and CLI proxy builders disagree about the key.
Not verified: whether the stale fallbacks are reachable on every compile path, since validation runs first in compiler_orchestrator_workflow.go. I did not run the full suite or confirm failures against the base commit, because the base fetch failed in this sandbox.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · requested: claude-haiku-5.5 · routed: claude-haiku-5.5 xhigh · ~11 AIC · ⌖ ~2 AIC · ⊞ 4.4K
Comment /matt to run again
| if allowedRepos, ok := configMap["allowed-repos"]; ok { | ||
| // Parse guard policy fields directly under github. | ||
| if _, ok := configMap["repos"]; ok { | ||
| config.reposParseErr = errors.New("'tools.github.repos' is no longer supported; use 'tools.github.allowed-repos' instead") |
There was a problem hiding this comment.
[/codebase-design] The parse-time rejection covers repos, but raw-map readers still fall back to it: getDIFCProxyPolicyJSON (compiler_difc_proxy.go ~175) and githubLockdownStepConfiguredGuardValues (compiler_github_mcp_steps.go ~66), which this PR leaves in place. The /DIFC proxy and /CLI proxy subtests of TestGitHubGuardPolicyRepositoryScopes still pass repos and succeed, while the /gateway subtests now fail because getGitHubGuardPolicies dropped it, so the three builders now disagree. Remove these fallbacks so every reader matches the parser, or delete the dead branches. @copilot please address this.
There was a problem hiding this comment.
All policy builders now share fail-closed handling for the removed field; legacy fallback values are no longer used. Added cross-builder tests in c912bd6.
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "492e4f6ca458198027a3370021797f528a291257",
"kind": "requested",
"schema_version": "1",
"state": "87fb74a692c6175ec1463f17364ac7b2ace0be17f3d1f9600148dae3fee0d1b1",
"work": [
"0352453e44b92ccc4e33c8a821673be2db826339fbb2a913e61ce19509dea69b",
"2f8dbbb3107e0d3637e2dd5192e41d80d208a6a32ff94162d6a16905de44f453",
"42e5d572d9d75b7168fe7d0aeda0717cc07e65ed240f6d299e6fec661214f1ac",
"44e8b7907ca61dd76653b157e7d2c9041b2158715745ef76f9b040032e55e525",
"515fe9a9842366e70b9601d7be2e17e725472520cde469f93f0dda60b41a2259",
"54d2b8a96c1f5112ac7f81ccc2b8dac45dd466647ce192e7834f0321c64e4e6c",
"6d0383b1e3be4ff57d5e7cc705248d63a2f43930f74ba581c9e90275297a563f",
"a448324bc92b71ad235367e1a0349a581c8c1e18a223ca441d9a7240a5f229aa",
"dd979d5b2c0bbab60e31f9a75903742ef913ff40953aed274d98e8791ea13c15",
"e144a0fca4e8e6880ec33f3ffb0ba50241e208b420f9b4e99916afeae26ab1fc",
"fe4834f7e8619d467be835252753a8d08bd55bfefe1839d8d8659fa92044ca9c"
],
"workflow": "pr-sous-chef"
}
|
…-gp-s004-handling Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Merged main in 30f6e8a and addressed the linked feedback and failing fixtures in c912bd6. Targeted tests, integration tests, and Go lint pass. CodeQL timed out twice while calculating the post-merge diff. |
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>


The GitHub tool parser silently ignored the deprecated
reposfield whenallowed-reposwas also set. Several specification status and synchronization notes also needed clarification.repos.