Skip to content

Refuse SQLite database connectors on Cloud - #1246

Merged
helpcodeai merged 1 commit into
mainfrom
fix/cloud-block-sqlite
Oct 24, 2026
Merged

helpcodeai merged 1 commit into
mainfrom
fix/cloud-block-sqlite

Conversation

@helpcodeai

Copy link
Copy Markdown
Contributor

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 throws SsrfBlockedError with a message pointing to network databases. Covers execute and testConnection.
  • Spec for the cloud case; the existing self-hosted SQLite test still passes.

Cloud: SQLite connectors refused. Self-hosted: unchanged. Checked the cloud database first: 23 database connectors, none SQLite.

Type

  • Bug fix

Testing

  • Added/updated unit tests
  • npx jest src/connectors/engines/database.engine (packages/backend): 3 suites, 69 tests passed
  • npx tsc --noEmit -p tsconfig.json: passed

Checklist

  • My code follows the existing code style
  • I have tested my changes locally
  • All existing tests pass (npm test)
  • This PR has a descriptive title

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).
@helpcodeai
helpcodeai enabled auto-merge (squash) October 24, 2026 18:49
@helpcodeai
helpcodeai merged commit ee68934 into main Oct 24, 2026
15 checks passed
@helpcodeai
helpcodeai deleted the fix/cloud-block-sqlite branch October 24, 2026 18:55
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant