Repository navigation
feat(abom): App-only production credentials and role-checked ownership claims - #69
Draft
data-douser wants to merge 4 commits into
Draft
data-douser wants to merge 4 commits into
data-douser wants to merge 4 commits into
Conversation
…p claims A production instance now runs on its GitHub App's credentials alone, and every ownership declaration carries the role that supports it. Implements plans/api/production-credentials.md and retires plans/api/ownership-claims.md, as one change, as #66 planned. Production credentials - Each installation token is minted with only the permissions its kind of call needs (ghapp.PermissionSet, TokenWith), cached per installation and set; a permission the installation has not approved refuses the call before GitHub is asked. - With an App configured, crawl reads, lock verification, the property picker and Copilot sessions use the installation; gh and GITHUB_TOKEN are never read, and token variables are stripped from child processes. - With an App, the identity on record is the App's bot and the accounts it is installed on; nobody's gh session is read. - The manifest requests reads only, plus organization Copilot requests; its trace test ties every grant to a call or an event handler. - A server reading as the App refuses to start with --submit-targets, --enable-targets or --enable-accounts, and Settings says why. - Copilot sessions authenticate with a client-level installation token minted fresh per session, and end before it expires. Where the runtime does not offer the configured model to the credential, the session runs `auto`, and the model each call actually ran on is recorded. - Readiness names the credential sessions use. Ownership claims - An account is eligible through an owner or admin role, a security manager role (organization roles API, legacy fallback; needs admin:org), or the App's installation; a repository admin or maintainer may declare an include. - The role check is recorded beside each declaration (abom_repository_role), the installer from the installation's created delivery (abom_app_installer), and includes the installation does not cover are marked. Settings shows the check; it never changes a declaration. Docs, plans and the architecture instructions describe the eligibility and credential rules. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Nov 23, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The C# self-audit started failing on unchanged code in mid-November with three findings in Razor components: identical values compared at ActionVersions.razor:115 and two fields "missing" readonly in DiscoveryControls.razor that are reassigned elsewhere. Both are artifacts of the database, not of the code. Build-mode none fetches every referenced package that has no compile assets again, at its newest version, and takes the assemblies inside as references. DevServer is such a package; its newest release now carries ASP.NET Core 11 assemblies, which outranked the 10.0 ones the app and MudBlazor build against. Template contexts went untyped, so `onLines.Analyzed` and `onLines.Commits` both became accesses to an unknown member. - Drop the DevServer reference. Nothing runs `dotnet run` or `dotnet watch`; `abom serve` hosts the published interface. - State `@namespace Abom.WebAssembly` in _Imports.razor. CodeQL runs the Razor generator without the project file, so components landed in ASP.Shared and every `@using Abom.WebAssembly.*` failed; the real build's generated code is unchanged. Reproduced with CodeQL 2.27.3 on Linux: 1,882 compiler errors and the false positive before, 30 errors and no findings after. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> (cherry picked from commit 7e8b656)
With the interface's own references fixed, the C# self-audit still reported two missed readonly modifiers in DiscoveryControls.razor that the code does not have. The 2026-11-16 runner image carries .NET SDK 11.0.100 beside 10.0.404, and build-mode none generates Razor components with the newest SDK it finds. .NET 11's generator writes a <Component>_razor.decl.g.cs beside each component holding the whole @code block; the extractor compiles every file the generator wrote, so each field is declared twice and the copy nothing binds to reads as assigned only by its initializer. setup-dotnet now installs into a directory of its own, holding only the SDK the interface builds with. Reproduced on Linux with CodeQL 2.27.3: 10.0.404 and 11.0.100 together give the two findings; 10.0.404 alone gives none. CodeQL 2.27.4 and 2.27.5 note no change here. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> (cherry picked from commit 93a7dd2)
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Let a production ABOM instance run on its GitHub App's credentials alone, with no person's token, and record the role that supports every ownership declaration.
This implements production-credentials.md and retires
plans/api/ownership-claims.md.Important changes
Credentials
Scoped tokens. Each kind of call gets an installation token carrying only the permissions it needs (
ghapp.PermissionSet,TokenWith). A permission the installation hasn't approved is refused before GitHub is asked.The App instead of a person. With an App configured, these use the installation:
ghandGITHUB_TOKENare never read, and token variables are stripped from child processes.Read-only App. The manifest asks for reads only, plus
organization_copilot_requests: read, the one new permission. A test ties every grant to the call or webhook handler that needs it.No writes through the App. A server reading as the App refuses
--submit-targets,--enable-targetsand--enable-accountsat startup, and Settings says why.Copilot sessions. Each one gets a fresh client-level installation token and ends before it expires. Where the configured model isn't offered to that credential, the session runs
auto, and the model each call ran on is recorded.Ownership claims
admin:org), or the App's installation.abom_repository_role);createdevent (abom_app_installer);Docs: architecture, configuration, vocabulary and the architecture instructions describe the credential and eligibility rules.
Notes