Repository navigation
fix: authorize resolved issue relationship repositories - #73882
Conversation
Validate resolved sub-issue repositories and blocked-by references before privileged API access. Cover allowed policies, temporary IDs, deferred retries, and target semantics. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ 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: 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.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: 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.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Ponytail Reviewer completed successfully! 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. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
There was a problem hiding this comment.
Review result
No actionable issues found in the changed lines. Repository validation is performed after temporary-ID and target resolution and before the relevant API calls; the added tests cover deferred, staged, wildcard, and cross-repository cases.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.7K
Comment /review to run again
There was a problem hiding this comment.
🟡 Changes recommended
The repository-policy wording needs clarification in two places because validation accepts a match in either target-repo or allowed-repos, rather than requiring both.
1 open issue
What changed in this PR
This PR closes repository-authorization gaps in gh-aw’s safe-output issue relationship handlers, preventing resolved references from accessing repositories outside the configured policy.
Changes:
- Validate the effective sub-issue repository after temporary-ID resolution and parent selection.
- Validate resolved blockers before per-item API calls or issue creation, while preserving permitted references and deferred behavior.
- Document the repository boundary and add regression tests for denied and permitted configurations.
| File | Description |
|---|---|
docs/src/content/docs/reference/safe-outputs.md |
Documents repository restrictions for blockers and sub-issue links. |
actions/setup/js/link_sub_issue.test.cjs |
Tests denied targets, deferred resolution, permitted policies, and parent selection. |
actions/setup/js/link_sub_issue.cjs |
Authorizes the effective repository before issue reads or linking. |
actions/setup/js/create_issue.test.cjs |
Tests blocker authorization, retries, staged mode, and permitted references. |
actions/setup/js/create_issue.cjs |
Authorizes resolved blockers before mention resolution and issue creation. |
Review effort: Max (auto)
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /tdd and /codebase-design. The core fix is sound: every repo that a blocked_by reference or a temporary ID resolves to is now checked against the same allowed_repos policy before any API call. The link_sub_issue effective-repo check also runs before any issue read or mutation. No blocking issues found.
📋 Key Themes & Highlights
Key Themes
- Case-sensitive repo matching: blocker repo comparison is exact, while the dedupe key is lowercased. This fails closed, but it may reject valid mixed-case references (inline comment on
create_issue.cjs:904). - Ordering change: mention resolution moved after
blocked_byvalidation. This is correct, but nothing enforces it yet (inline comment oncreate_issue.cjs:911).
Positive Highlights
- ✅ Validation runs before any API call, and the tests assert zero API calls for disallowed blockers.
- ✅ Staged mode rejects disallowed previews, and deferred revalidation is covered.
- ✅ The
link_sub_issuechange keeps the parent and sub-issue in the same repo, so it cannot be used to cross repos. - ✅ Docs for the blocked-by policy match the code.
Verification Limits
Vitest could not run in this sandbox (npm registry TLS failure), so I could not reproduce the 158 test results claimed in the PR. I reviewed the logic statically and syntax-checked both changed files with node --check. Please confirm the test suite in CI.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~7 AIC · ⌖ ~1 AIC · ⊞ 5.4K
Comment /matt to run again
Clarify target-or-allowlist documentation and existing case-sensitive matching. Add non-vacuous mention lookup ordering and mixed-case rejection regressions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
In response to #73882 (comment): No change needed for this completion notice or the associated review, which reported no actionable issues. The follow-up batch in a2b7df6 passes 161 focused tests, type checking, and the build/lint gate. |
|
In response to #73882 (comment): No change needed because the design gate provided no actionable design request or ADR draft. Kept this batch scoped to documentation clarity and regression coverage without changing the shared authorization semantics. |
|
In response to #73882 (comment): No change needed for this no-action completion notice. Independently added non-vacuous mention-ordering and mixed-case rejection regressions in a2b7df6; the combined focused suites now pass 161 tests. |
|
In response to #73882 (comment): Addressed both associated skills-review comments in a2b7df6 with an active mention-lookup regression and mixed-case fail-closed tests, documenting the existing exact-case policy. Local validation passes 161 focused tests, type checking, and the build/lint gate; the pre-batch CI JavaScript shards and type check also passed. |
|
In response to #73882 (comment): No change needed because this reviewer reported no actionable request. The separate actionable inline feedback has been addressed and all three threads resolved. |
Specify target-or-allowlist authorization for blocked-by references and sub-issue links, including deferred and staged behavior. Add a bounded TLA+ model with negative controls and reachability witnesses to the checksum-pinned checker. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🎉 This pull request is included in a new release. Release: |

Summary
Fixes CWE-863 code scanning alerts 1055 and 1056. Agent-controlled temporary IDs and cross-repository blocker references could reach repositories outside the configured policy using the privileged safe-output client.
link_sub_issuerepository after temporary-ID resolution and parent target selection, before issue reads or linking.create_issue.blocked_byrepository before per-item API work or issue creation using the existingtarget-repoandallowed-repospolicy.Validation
make fmt-cjsandmake lint-cjspassed.make agent-report-progresspassed, including build and impacted JavaScript tests; no changed Go files required Go tests.create_issue.cjs:304; no lint errors.Alerts have not been dismissed.