Fix repository-scoped issue trust - #42
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
A moderate unresolved issue weakens fail-closed behavior when no non-deleted authors are present.
Review effort: Lite
Findings: None
What changed in this PR
Updates GitHub issue trust to use current repository collaborators instead of organization membership, with validated author metadata and fail-closed handling.
Changes:
- Adds author validation and collaborator-based trust classification.
- Adds bounded collaborator pagination and malformed-response checks.
- Updates tests and documentation for the repository-scoped policy.
- Moderate unresolved finding: collaborator validation is skipped when no non-deleted authors exist.
| File | Description |
|---|---|
test/issues.test.ts |
Adds trust, pagination, and validation coverage. |
test/issue-ranking.test.ts |
Updates issue fixtures with author identity. |
github/issues.ts |
Implements author validation and collaborator-based trust. |
docs/implementation/issue-prioritization.md |
Documents the corrected trust boundary. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #41
Outcome
Issue trust now follows GitHub's current repository collaborator list instead of treating organization membership as repository access.
author_associationremains validated, visible metadata.Reproduction
On baseline
1e59b7dfda199c8156c09a9cb9a690e5b55f1b5e, the enum-complete fixture failed becauseMEMBERnormalized totrustedwithout repository-specific evidence.Changes
Validation
Validated head:
9bf0c951b2855fdd9fee7b0cfdb7e4350a0ec2b6npm test— 15 files, 341 tests passednpm run typecheck— passedgit diff --check— passed before commit; exact validated head is cleanReview rounds
Findings: None, no inline threads, and only the expected request for final human review of the authorization-sensitive change. Changed: none. Declined: none.Review-lesson audit
AGENTS.md, Guarded external actions).AGENTS.md, Guarded external actions).AGENTS.md, Guarded external actions).MEMBERspecifically means organization membership and therefore cannot itself establish repository access.Deferred scope