fix(orb): bind enrollment admin checks to immutable GitHub account ids#1393
Open
JSONbored wants to merge 2 commits into
Open
fix(orb): bind enrollment admin checks to immutable GitHub account ids#1393JSONbored wants to merge 2 commits into
JSONbored wants to merge 2 commits into
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1393 +/- ##
==========================================
- Coverage 95.33% 95.33% -0.01%
==========================================
Files 192 192
Lines 20750 20750
Branches 7500 7501 +1
==========================================
- Hits 19783 19782 -1
Misses 383 383
- Partials 584 585 +1
🚀 New features to boost your workflow:
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 34e9f07 | Commit Preview URL Branch Preview URL |
Jun 25 2026, 11:05 PM |
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.
Motivation
account_logincould be abused if a GitHub account/org renames or an attacker reclaims the old login.installation_id.Description
migrations/0070_orb_github_installation_account_id.sqlto persistaccount_idinorb_github_installations.account_idfrom webhook upserts and the App-installation backfill by wiring it throughsrc/orb/installations.tsandsrc/orb/app-auth.ts.src/orb/oauth.tsby threading the OAuthuser.idand storedaccount_idintoverifyInstallationAdminand requiring id-equality for User installs and matchingorganization.idfor Org installs.account_idin the OAuth enrollment flow and pass the authenticateduser.idinto the authorization check, and add a regression test that verifies stale-login reuse is refused; update related tests to exercise the new branches.Testing
npx vitest run test/integration/orb-oauth.test.ts test/integration/orb-installations.test.ts test/unit/orb-app-auth.test.tsand all specified tests passed.npm run db:migrations:checkwhich passed andnpm run typecheckwhich passed with no type errors.npm run test:cibut the run failed during coverage generation withTypeError: jsTokens is not a functionfrom the coverage tooling (failure appears unrelated to the orb change and blocked full CI completion).npm audit --audit-level=moderatecould not complete in this environment (registry audit returned 403).Codex Task