Tie stored data to the GitHub App installation and split dashboard view and act permissions
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- github, java
- Domain
- authentication, authorization, backend, database, security
Research direction
Start by tracing the verified installation webhook payload and the models and repository queries for ReviewSession, PausedPr, and FindingFeedback; then read DashboardAccessChecker and ManualReviewAuthorizer. Map the migrations, access checks, dashboard actions, and existing tests before making changes. Done means installation and repository scoped reads, the specified view and act permissions, lifecycle handling, documentation, and the acceptance tests all work.
Written by the indexing model from the issue text.
Description
Background
ThrillhouseBot can be installed by several organizations on one deployment (a shared GitHub App), but its data is not tied to an installation:
- Only
ReviewLearningstoresinstallationId.ReviewSession,PausedPrandFindingFeedbackare keyed by an"owner/repo"string, so a renamed, transferred or re-created repository can surface another tenant's rows, and nothing at the query layer prevents a scope mistake from mixing organizations. - The dashboard serves one configured account (
DashboardAccessChecker.accountOwner()), so a second installation's organization cannot use it at all, and access is "account owner or collaborator" with no distinction between viewing and acting.
Change required
- Scope every row. Add
installation_idand GitHub's numeric repository id (stable across renames and transfers) toReviewSession,PausedPrandFindingFeedback, populated from the verified webhook payload. A Flyway migration backfills existing rows from the current installation snapshot; rows that cannot be matched stay hidden (never shown to anyone). - No unscoped reads. Repository/query methods take an
(installationId, repositoryId)scope as a required argument; remove or restrict the unscoped finders. A test asserts that a row from installation A is never returned for installation B, including for a repository with the sameowner/reponame. - Viewing (dashboard read): a user may view an installation's repository data when they can read that repository on GitHub: collaborators with any role (read, triage, write, maintain, admin), team access, or organization membership through the organization's base permission. Installation-wide views (skip counters, totals) require membership in the installation's organization (or being the installation's personal account). The installations a user may see are
GET /user/installations∩ this app's installations. Replaces the single configured account. - Acting: every state-changing dashboard action (pause/resume, re-run, deleting or editing a learning, feedback) requires write, maintain or admin on that repository, the same rule
ManualReviewAuthorizerapplies to comment commands. Addmaintainto its permission set (today onlyadminandwrite). - Outside contributors (fork PR authors without a repository role, even with merged PRs) have no dashboard access; they see the bot's review on the PR itself.
- Lifecycle: on
installation.deletedor a repository removed from an installation, its data stops being served immediately; purging is an operator action, documented. - Keep the existing caching so the dashboard makes no GitHub call per row; every check fails closed.
Constraints
- The webhook payload's installation id (HMAC-verified) is the only source of the scope; never derive it from text.
- No change for single-installation deployments beyond the migration.
- Document the access model (view = read and above / org members; act = write and above) in the configuration and security docs, and in the CHANGELOG.
Acceptance criteria
- Cross-tenant isolation tests (same repository name under two installations; renamed and transferred repository).
- Access tests: read collaborator and org member can view, cannot act; write/maintain/admin can act; outside contributor and non-member cannot view; private repository not readable by an org member whose base permission is none is not shown.
- Migration test with backfill and an unmatched row.
- Unknown or uninstalled installation fails closed.
- Dominant language
- Java
- Stars
- 35
- Forks
- 7
- Avg merge
- 9h 32m
- Merged PRs (30d)
- 144
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from devops-thiago/ThrillhouseBot
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
devops-thiago/ThrillhouseBot#1093 ·
Maintainers usually reply within 1 day
-
documentation enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
devops-thiago/ThrillhouseBot#321 ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
devops-thiago/ThrillhouseBot#46 ·
Maintainers usually reply within 1 day
-
fix(review): preserve tilde-fenced code during path screeningPossibly taken @devops-thiago claimed this today. Openbug java
Difficulty 4/5 1-2 days Newbie friendliness 35/100
devops-thiago/ThrillhouseBot#1111 · 1 comment ·
Maintainers usually reply within 1 day
-
fix(review): exclude TAP TODO and SKIP results from CI failuresPossibly taken @devops-thiago claimed this today. Openbug java
Difficulty 3/5 1-2 days Newbie friendliness 35/100
devops-thiago/ThrillhouseBot#1110 · 1 comment ·
Maintainers usually reply within 1 day
All issues in devops-thiago/ThrillhouseBot
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
objectionary/lints#1556 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
wildfly/wildfly-launcher#99 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
apache/rocketmq#11427 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day