Repository navigation
Refuse SQLite database connectors on Cloud - #1246
Merged
Merged
Conversation
A SQLite connector opens a path on the server's file system. On a self-hosted instance that is the operator's own disk, but on the multi-tenant cloud every workspace shares the container, so a workspace could open or create files there. The engine now refuses SQLite when DEPLOYMENT_MODE=cloud (execute and testConnection); self-hosted is unchanged. No cloud connector uses SQLite (23 database connectors checked).
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
A SQLite connector opens a path on the server's file system, and the database engine skipped the outbound guard for it. On a self-hosted instance that is the operator's own disk; on the multi-tenant cloud all workspaces share the container, so a workspace could open or create files there. The engine now refuses SQLite when
DEPLOYMENT_MODE=cloud.Changes
DatabaseEngine.assertSafeDbHost: SQLite on Cloud throwsSsrfBlockedErrorwith a message pointing to network databases. CoversexecuteandtestConnection.Cloud: SQLite connectors refused. Self-hosted: unchanged. Checked the cloud database first: 23 database connectors, none SQLite.
Type
Testing
npx jest src/connectors/engines/database.engine(packages/backend): 3 suites, 69 tests passednpx tsc --noEmit -p tsconfig.json: passedChecklist
npm test)