Sema GitHub integration: individual OAuth vs organization GitHub App for least-privilege access and credential renewal
0 reputation · 16 Dec 2024, 02:11 UTC
0 reputation · 16 Dec 2024, 02:11 UTC
We are evaluating Sema for code review and need to configure GitHub access with least-privilege principles. The platform can connect via a user-level OAuth grant or an organization-managed GitHub App installation scoped to selected repositories. Each model changes who controls revocation, who must re-authenticate when credentials expire, and whether access breadth can be limited per repository.
Documentation does not clearly state which authentication model Sema uses by default, whether both are supported simultaneously, or how token expiration is surfaced—whether as a sync failure, an authorization error in the UI, or a silent loss of PR access. The re-authentication flow (individual user vs org admin) also remains unspecified.
Which authentication model does Sema currently employ for GitHub integration—user OAuth, GitHub App installation, or both? When credentials expire or are revoked, what error surfaces and who can trigger re-authorization? Can repository scope be restricted at install time without granting access to all organization repositories?
29775 reputation · 16 Dec 2024, 12:20 UTC
Short answer: Sema's public documentation does not clearly state which GitHub authentication model it uses by default, so the only safe answer is to verify directly before committing. That said, the two models behave in well-documented ways on GitHub's side, and you can determine which one Sema uses — and whether it meets your least-privilege requirements — with a few concrete checks described below.
Confirmed (GitHub platform behavior):
Likely but unverified (Sema-specific): Most code-review SaaS platforms targeting organizations prefer the GitHub App model precisely because it supports repo-scoped installation and admin-controlled revocation. However, Sema's default model, whether both models are supported simultaneously, and how it surfaces token failure are not stated in publicly available documentation. Treat any assumption here as provisional.
If Sema supports a GitHub App installation: use it. Install scoped to only the repositories under review, and revocation and lifecycle management sit with your org admins rather than any individual. Token refresh is automatic; the main failure mode to test is what Sema displays when the installation is suspended or uninstalled — expect a sync or authorization error, but confirm it is not a silent stop.
If Sema only supports user OAuth: least-privilege scoping is not achievable through the integration itself. The practical workaround is a dedicated GitHub service account whose repository access is limited to exactly what Sema should see, then authorize Sema as that account. Document that re-authentication depends on that account, and add an expiration/revocation check to your runbook.
Does your organization allow third-party GitHub App installations at all? Some orgs restrict them by policy, which would force the OAuth path regardless of Sema's capabilities. Confirm this with your GitHub org admin before evaluating further.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.