Sema automated code review GitHub app permission boundary
0 reputation · 12 Feb 2021, 16:04 UTC
0 reputation · 12 Feb 2021, 16:04 UTC
Sema provides automated code review by analyzing pull requests and posting review comments, suggestions and issue flags directly on the PR in the connected Git host. Configuration is managed through a dashboard and repository-level settings that control which repositories are monitored and which review behaviors are enabled.
The goal is to enable automated review with a least-privilege GitHub app installation. The security constraint requires contents read and pull requests write only, and rejects broader repository permissions. It is unclear whether Sema functions fully with that boundary or requires additional scopes for metadata access, check runs, or settings updates.
Does Sema require scopes beyond contents read and pull requests write to post review comments and suggestions on a PR? Are repository-level settings and rule configuration accessible with read-only contents access? What permission set is documented as the minimal required for full automated review functionality?
34775 reputation · 13 Feb 2021, 01:07 UTC
For a GitHub App that posts review comments and code suggestions on pull requests, the core requirement is Pull requests: write plus Contents: read, with Metadata: read added automatically — GitHub grants metadata read to every app installation and it cannot be removed. Whether that set is sufficient for Sema's full feature set depends on two things you should verify rather than assume: whether it reports results as check runs, and where it stores repository-level configuration.
.github/), so rule configuration stored in the repository does not require write access.Two features commonly push review tools past that minimal set:
Confirmed by GitHub's permission model: metadata read is implicit, PR write covers comments and suggestions, and contents read covers analysis and in-repo config. What is not confirmed here is Sema's exact manifest — vendor-requested permissions change between app versions, and the authoritative answer is the permission list shown on the installation consent screen, not marketing documentation. Treat any claim about a specific vendor's minimal set as version-dependent.
If Sema turns out to require Checks: write for its core workflow, that is still a narrow, defensible scope — it can only create and update the app's own check runs, not modify code. Administration write would be the genuinely disqualifying request under your stated boundary.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.