Skip to content

[CXH-2100] hard failure on getOrgBasePermission failure#179

Open
kans wants to merge 2 commits into
mainfrom
kans/hard-fail-org-base-permission
Open

[CXH-2100] hard failure on getOrgBasePermission failure#179
kans wants to merge 2 commits into
mainfrom
kans/hard-fail-org-base-permission

Conversation

@kans

@kans kans commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

now, with more faulting.

@kans
kans requested a review from a team July 22, 2026 17:42
@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Connector PR Review: hard failure on getOrgBasePermission failure

Blocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0
Criteria: Criteria status: loaded .claude/skills/ci-review.md from trusted base 7b8e75696a7d.
Review mode: full
View review run

Review Summary

Scanned the full PR diff for security and correctness. This change converts the previous silent fail-closed behavior (treating an absent default_repository_permission as none) into a hard PermissionDenied failure whenever direct-collaborators-only is enabled, plus an up-front Validate() probe (validateBasePermissionVisibility) on one confirmed-admin org in both the PAT and GitHub App credential paths. The behavior change is intentional, gated behind the opt-in direct-collaborators-only flag, and well covered by new and updated tests (connector_test.go, repository_test.go) that assert both the missing-field PermissionDenied error (with empty grants) and the base-permission none no-expansion path. The adminFound bool to firstAdminOrg refactor is correct, and the installation-token client (gh.client) is the right one to probe in App mode. No new issues found.

The prior suggestion about documenting the new credential requirement is partly addressed: the optimizeForLargeOrgs config description now states admin:org / Organization Administration read is required, but docs/connector.mdx:455-462 still does not mention it (D3), so that earlier finding stands and is not re-posted here.

Security Issues

None found.

Correctness Issues

None found.

Suggestions

None.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocking issues found.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocking issues found.

@luisina-santos luisina-santos changed the title hard failure on getOrgBasePermission failure [CXH-2100] hard failure on getOrgBasePermission failure Jul 23, 2026
@linear-code

linear-code Bot commented Jul 23, 2026

Copy link
Copy Markdown

CXH-2100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants