Skip to content

Implement layered permission architecture for genesis ecosystem #1

@the-gigi

Description

@the-gigi

Context

Genesis-bootstrapped dev systems currently rely on PATs for cross-org access. This works but has problems:

  • PATs are tied to a person, not a system
  • PATs can't be cleanly scoped per-project
  • No clean audit trail (all actions appear as the PAT owner)
  • If the human revokes the PAT, all projects break simultaneously

Proposed: Three-layer permission model

See BRAINSTORMING.md > Permission Architecture for the full design.

Layer 1: Genesis GitHub App — shared, minimal permissions (read code, write issues). Already exists as genesis-dev-bot.

Layer 2: Per-project GitHub Apps — each dev system gets its own App scoped to its specific needs. repo-guardian would get an App with contents:write, pull_requests:write, security_events:read. Other projects get only what they need.

Layer 3: Bootstrap PAT — human-held, used only for operations Apps can't do (creating other Apps, managing installations). Never used for day-to-day.

Tasks

  • Document exact permissions needed by genesis App (Layer 1) vs current state
  • Define the App creation flow: what does genesis output when a new project needs an App?
  • Create an issue template / checklist for "set up project App" that guides the human
  • Update genesis bootstrapping to include the App request issue in the initial scaffold
  • Migrate repo-guardian from PAT to dedicated App (see Sayfan-AI/repo-guardian tracking issue)
  • Consider org-level secret for bootstrap PAT so all repos can access it
  • Remove "Security boundaries" open question from BRAINSTORMING.md (now answered)

Notes

  • GitHub Apps and PATs cannot be created programmatically — initial setup always needs a human
  • Installation tokens (short-lived, scoped) can be generated programmatically once the App is installed
  • This is infrastructure work that benefits all current and future genesis projects

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions