fix(orb): prevent OAuth self-enrollment from re-enabling operator-disabled installs - #1465
Merged
JSONbored merged 1 commit intoJun 26, 2026
Merged
Conversation
Contributor
|
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 #1465 +/- ##
=======================================
Coverage 95.44% 95.44%
=======================================
Files 194 194
Lines 21054 21055 +1
Branches 7619 7621 +2
=======================================
+ Hits 20094 20095 +1
Misses 383 383
Partials 577 577
🚀 New features to boost your workflow:
|
JSONbored
deleted the
codex/propose-fix-for-self-enrollment-vulnerability
branch
June 26, 2026 20:38
JSONbored
added a commit
that referenced
this pull request
Jun 26, 2026
) Both 0074_ai_review_cache (#1462) and 0074_orb_self_enrollment_disabled (#1465) merged and deployed before the duplicate number surfaced. The latter is a bare ALTER TABLE ADD COLUMN, which SQLite cannot guard with IF NOT EXISTS, and D1/self-host track applied migrations by filename — so renaming it now would re-run the ALTER and fail the deploy. Grandfather the pair (same rationale as the pre-existing 0015/0017 entries) so db:migrations:check passes on main again; this unblocks validate on every open PR.
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
registeredback to1and obtaining a new enrollment secret.Description
self_enrollment_disabled(migration0074_orb_self_enrollment_disabled.sql) to separate operator disables from pending/unregistered installs.self_enrollment_disabledin the Orb OAuth callback and block self-enrollment when it is set, returning a 403 and an explanatory landing page instead of auto-registering. (src/orb/oauth.ts)POST /v1/internal/orb/installations/registerendpoint to setself_enrollment_disabled = 1when opting out and clear it when opting back in, so operator actions persist as a distinct state. (src/api/routes.ts)self_enrollment_disabledcorrectly while preserving the zero-touch flow for non-disabled pending installs. (test/integration/orb-oauth.test.ts,test/integration/orb-broker.test.ts)Testing
npx vitest run test/integration/orb-oauth.test.ts test/integration/orb-broker.test.tsand they passed (2 files, 28 tests, 28 passed).npm run db:migrations:checkand TypeScript typecheck withnpm run typecheck, both succeeded.npm run ui:openapi:check, which succeeded on the committed spec check step;npm audit --audit-level=moderatefailed due to the npm audit endpoint returning403 Forbiddenfrom the environment and is thus inconclusive.npm run test:coveragebut it failed outside the changed area due to long-running test timeouts and a coverage remapping error (TypeError: jsTokens is not a function), so full repo coverage could not be verified in this environment; the added integration tests exercise the new branches introduced by this change.Codex Task