Repository navigation
fix(cubejs): fourth review of the confinement (MotherDuck and Databricks options) - #106
Merged
Merged
Conversation
…cks options) Found by a fourth adversarial review of the merged confinement (#103), all with default operator config: - MotherDuck: md: connection strings take options (motherduck_host, ports, download URLs) that send the pod's requests to any host -- at instance creation, before the sandbox -- and returned the response body in the error. Only a database name and a token-shaped motherduck_token are accepted; a token can no longer carry options into the URL Cube builds. - Databricks: the in-JVM driver's connection options include ones that read or write pod files (Volume/Staging allowed local paths, SSL key stores) and reach other hosts (proxies). Only the options a connection needs are accepted, in the URL and the properties, whichever JDBC type loads it. - DuckDB: bounded by default (memory 1GB, 2 threads, 4GB spill), raisable with CUBEJS_DB_DUCKDB_MEMORY_LIMIT / _THREADS / _MAX_TEMP_DIRECTORY_SIZE, so one tenant query can't take down the shared process or disk. The review's exploits rerun against this image: refused. 760/760. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Why (urgent)
A fourth adversarial review of the confinement merged in #103 found two critical holes that are exploitable with default config. #103 is deploying to dev now.
md:options (motherduck_host, ports, download URLs)motherduck_tokenare accepted. The token is validated too, since Cube pastes it into the URLVolumeOperationAllowedLocalPaths,StagingAllowedLocalPaths, SSL key stores, proxies)/proc/self/environ, to the tenant's own workspaceCUBEJS_DB_DUCKDB_MEMORY_LIMIT,_THREADSand_MAX_TEMP_DIRECTORY_SIZEVerification
yarn test: 760/760, including new tests for every vector.GET /leak?/extension_version=and its body is returned;🤖 Generated with Claude Code