[task] Enforce private-repository access in Discord channels

Open
#409 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
12/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
github, postgresql, python

Research direction

This is a cross-service authorization design spanning connectors, documentation-system and team-tracking, and it is blocked by #405. Start from the parent plan in docs/GITHUB-RETRIEVAL.md and the related issues #333 and #404 to see the grant chain and the fail-closed rules. Done means the offline fake-provider tests for team combinations, pagination, stale snapshots and revocation pass, and the grant and invalidation HTTP contracts are documented.

Written by the indexing model from the issue text.

Description

area/bot area/deployment area/docs-system area/integration area/observability area/service type/feature
Blocked by

#445, #411

What

Use current GitHub repository grants to decide what private repository evidence a Discord channel can receive.

Why

Membership in a managed team and read access for a Discord destination are different decisions.

Area

bot, deployment, docs-system, integration, observability, service

Done looks like
  • Integrate the grant guard with the retrieval and answer path in #411. Validate trusted channel context and current grants per repository before reading evidence, continuing generation and posting.
  • Document and exercise grant expiry, channel changes, provider outage, disable and recovery. Include the team A/B/C cases and a requester without personal GitHub login.
  • Read complete paginated team/repository grants through connectors, constrained by stable UTMIST organization IDs, active mappings, enrolled repository IDs and App access. Define effective read access and nested-team handling.
  • Documentation-system stores versioned, expiring grant snapshots with completeness and last-success metadata. Missing, stale, retired or incomplete state denies private team retrieval; validate the proposed five-minute maximum age and exact invalidation contract.
  • Resolve configured channel teams from authenticated team-tracking HTTP and trusted channel context, including parent-channel thread policy and configuration version; model-supplied teams/identities cannot grant access.
  • Implement/test the authorization contract: any one configured active team with a current grant suffices, but every repository used must independently pass before ranking limits or model context. A channel grant does not create personal DM access.
  • Require current relevant GitHub-grant checks at admission and delivery, plus mapping/channel-version checks; revocation, transfers out of UTMIST, App access loss and unavailable authorization fail closed. Reserve request budget for these checks.
  • Offline tests cover A/B/C team combinations, multiple repositories, inheritance, pagination/partial reads, stale snapshots, removed grants, retirement and channel changes. Preserve independent public retrieval and existing Google/document authorization behavior.
  • Document the grant result and invalidation HTTP contracts and wire the guard into the GitHub retrieval path when available; record that integration prerequisite explicitly rather than claiming a read adapter alone completes channel authorization.
Design notes

Part of #404. Grant collection can start as soon as team mapping is available. End-to-end delivery uses #411. #408 owns membership writes. Personal private answers in DMs remain separate. Earlier rollout scenarios: #410. Design: #333 / PR #397.

Dominant language
Python
Stars
0
Forks
2
Avg merge
3d 3h
Merged PRs (30d)
31

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from UTMIST/Misty

All issues in UTMIST/Misty

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.