Security
GeoBrix is an open-source Databricks Labs project. Because the published artifacts run inside customer clusters and read data from a wide range of formats, we treat supply-chain hygiene as a first-class concern. This page describes what we do upstream to keep the package trustworthy, and what you can do on your side to build on that foundation.
For private vulnerability disclosure, see
SECURITY.md —
email labs@databricks.com or reach out via your Databricks representative.
Please do not open a public issue for a suspected vulnerability.
How we secure the package
These controls live in the GeoBrix repository itself — they apply to every release we publish.
Pinned third-party GitHub Actions
Every third-party Action referenced under .github/ is locked to a full commit
SHA, rather than a movable
tag like @v3. The SHA is the commit of a release that was public for at least 7 days before it was pinned. Tag names are kept inline as comments for readability, but the
SHA is what GitHub resolves. This means a compromised upstream Action repo
cannot retroactively change what runs in our CI.
First-party (databricks* / databrickslabs*) Actions are exempt and
continue to use tag references.
PGP-verified Maven dependencies
Every Maven artifact pulled by the build — direct dependency, transitive
dependency, plugin, plugin dependency — is checked against a PGP key
allowlist maintained in the repository
(.maven-keys.list).
The
pgpverify-maven-plugin
runs as the first Maven step in every CI build, so verification happens before
any compile, test, or install. CI Maven invocations also pass -C
(strict-checksums), so any checksum mismatch from the registry aborts the
build instead of warning.
Maven itself is pinned too. CI runs every Maven call through the Maven wrapper
(./mvnw), whose
properties file
fixes the version, the download URL and the SHA-256 of the distribution. The
wrapper refuses a download that does not match, wherever it came from. The
development container installs the same version with a pinned SHA-512, and a
test fails if the two versions differ. pom.xml requires that version as a
minimum, so an older Maven stops at the first build step with a message that
names ./mvnw.
The one Maven fetch outside the project build is for the open-source Delta Lake
jars (delta-spark and delta-storage). The Python CI job and the
development container use them to test the Zarr manifest locally. They are test-only
and are never part of a shipped artifact. The PGP step runs inside the
project build, so it does not cover them. Instead,
scripts/ci/fetch-delta-test-jars.sh
pins the Maven plugin version, runs Maven with -C, and checks each jar against
a fixed sha256. The script repeats that check every time it runs, including when
the jars are already present, and fails on any mismatch. CI and the development
container's test command both run it before the Zarr tests. The tests themselves
only locate the jars and do not re-hash them. A test run started without the
script is therefore not covered by the check.
Hash-pinned Python dependencies
Every Python install path that we control — CI, the development container,
and the notebook test harness — uses a lockfile generated with
uv pip compile --generate-hashes and installed via
pip install --require-hashes. pip refuses to install any wheel whose
sha256 doesn't match what was recorded at lock time. A compromised mirror
serving a same-version-but-different-bytes wheel therefore fails closed.
| Path | Lockfile |
|---|---|
| CI (Scala + Python build) | python/geobrix/requirements-ci.txt |
| CI (Python build) | python/geobrix/requirements-light-env6-ci.txt |
| Dev container (x86_64 and arm64) | python/geobrix/requirements-dev-container.txt, python/geobrix/requirements-dev-container-aarch64.txt |
| Notebook test harness | examples/tests/requirements.txt |
The native GDAL stack is the documented exception: it is not a Python package. It is built
from pinned sources and shipped inside the env wheel, as the next section describes. The
Python build path in CI uses the env wheel's rasterio, which is hash-pinned in
requirements-light-env6-ci.txt like every other dependency.
Controlled dependency updates
Version bumps are proposed automatically (Dependabot) but never land on the bump alone.
Each is accepted only after its uv pip compile --generate-hashes lockfiles are
regenerated across every install path we control: CI, the development container, and the
notebook test harness. The new sha256 for each wheel is then recorded and re-verified before
anything installs it. A bump that edits a version constraint without refreshing the hashed
lockfile is rejected, keeping the two in lock-step.
All of this resolution flows through a single controlled artifact mirror: uv and pip
use it as their index, Maven and npm as their proxy. Neither a routine build nor a
dependency update ever fetches from a public registry directly. The mirror is therefore the one
place trust is anchored. The --generate-hashes / --require-hashes chain above also means
even the mirror cannot serve same-version-but-different-bytes without failing closed.
Pinned native GDAL stack and its trust chain
The env wheels carry GDAL, PROJ, GEOS and the libraries they need, built in CI from pinned sources. Nothing is fetched or compiled on a cluster at start. The trust chain has four layers:
-
Pinned, hashed sources. One file,
scripts/native/pins.conf, pins every library by version and by the sha256 of its source archive. Where a library has a second origin, both downloads must give that same sha256. The build fails on a mismatch. A licence check also fails the build if a library is GPL-family or a driver with a closed licence is present. -
A verified build. The build ends with checks of the GDAL driver set, the library closure and the licence files. Every shared library is in the payload or in the manylinux set. Each library carries a hashed name (
libgdal-<sha256[:8]>.so), so it shares no name with a system library. -
A per-file manifest. The payload's
MANIFEST.jsonrecords the version of each library and the sha256 of every file. Each GeoBrix release attaches the wheels and the JAR, and GitHub records a digest for each release asset. Compare it with the file you stage. -
Unity Catalog Volume ACL (your environment). The Volume's write permission is the boundary that lets a cluster trust the staged wheel and JAR. Only the release or operator process should be able to write to the staging Volume; read access is broader (clusters need it). This is the only layer of the chain that lives in your workspace — keep write access tightly scoped.
Hardened, ephemeral CI runners
All CI jobs run on Databricks-managed hardened runner groups registered for
the databrickslabs org. Each job gets a fresh, ephemeral VM that is
destroyed at the end of the run. Nothing persists between jobs, and no
state can be carried forward by a malicious step. Org-level allowlisting
controls which workflows can request those runners and which secrets they
can see.
Short-lived registry tokens (JFrog OIDC)
Pip, Maven, and npm in CI authenticate to our artifact mirror via short-lived OIDC tokens minted per run. They do not use long-lived registry credentials checked into GitHub secrets. The token's lifetime is the workflow run; there is nothing durable to leak.
Gated deploy environment
Workflows that need elevated tokens (pushing back to PR branches, deploying
docs) run under a GitHub Environment.
The environment has deployment-branch restrictions
(main only), required CODEOWNER review, and the environment-scoped
REPO_ACCESS_TOKEN, a fine-grained PAT limited to contents:write on this
repository. Secrets are not released until those gates pass.
How you can build on this foundation
The upstream controls above protect the artifacts we ship. The controls below are what you can do at install time and at runtime to keep the same guarantees in your environment.
1. Take the wheel and the JAR from the same release
Each GeoBrix release attaches the env wheels and the JAR. Take both from one release, so the native stack, the Python code and the JVM code are paired. The wheel carries the GDAL stack. Do not add a second GDAL to the cluster, such as a system package.
2. Stage the wheel and the JAR in a Volume you control
Both files belong in a Unity Catalog Volume whose write ACL you've restricted to the release/operator process. The cluster only needs read access. The recommended flow is:
- Download the env wheel for your runtime and
geobrix-<version>-jar-with-dependencies.jarfrom the GitHub release page. - Compare each file's sha256 with the digest GitHub shows for the release asset.
- Upload both files to the Volume.
- Refresh on a controlled cadence (when bumping GeoBrix versions or applying a security patch), not automatically.
3. Pin the GeoBrix version in your cluster libraries
GeoBrix APIs may change to stabilize, and there are no function aliases — one canonical name per function. Pin the exact wheel and JAR version in your cluster configuration and only bump deliberately. See the Release Notes, the 0.6.0 changes and Release Notes: 0.5.x and earlier for the change list per version.
4. Restrict GDAL drivers for untrusted inputs
GeoBrix wraps GDAL/OGR, which can read a very large number of raster and
vector formats. When you ingest data from third-party sources, narrow the
driver list with GDAL_SKIP or the per-format options described in the
Readers and Writers sections.
Do not leave every driver enabled by default. The smaller the
allowlist, the smaller the attack surface from a malicious input file.
The policy covers the whole process
The driver policy (see section 7) applies to every GDAL use in the Python process.
It is not limited to GeoBrix functions. GeoBrix adds the refused drivers to GDAL_SKIP and removes them from each GDAL that the process has loaded.
A direct from osgeo import gdal or a rasterio call in the same process therefore lacks them too.
The policy starts when databricks.labs.gbx is imported, and the first GeoBrix use of GDAL completes it.
The env wheel's startup file only prepares the native libraries. It does not start the policy.
To opt in, set GBX_GDAL_DRIVER_POLICY=off before that import, in each Python process. A value set after the import has no effect.
- Cluster or job: set it in the cluster's environment variables, or the job cluster's. This reaches the driver and every executor.
- Notebook: set
os.environ["GBX_GDAL_DRIVER_POLICY"] = "off"before the import. This reaches the driver only. A worker still applies the policy. - JVM: set
spark.databricks.labs.gbx.gdal.driver_policy=offin the Spark config, or the same variable in the cluster's environment.
Opting in removes the whole defence for that process. You then own the risk of the refused drivers. They reach network services, run stored pipelines, or act on what a file names. Prefer a separate process or job, and use it only for data you trust. The GeoBrix Opt-In Drivers list names each driver and why it is off by default.
5. Report suspected vulnerabilities privately
If you find something that looks like a security issue in GeoBrix itself,
contact labs@databricks.com or your Databricks representative before
publishing details. See
SECURITY.md
for what to include in the report.
6. VRT Python pixel functions: off by default by design
GDAL's VRT Python pixel function API
lets a <PixelFunctionCode> element in a VRT file run Python in the process that reads the band.
With the driver policy on (§ 7), GeoBrix sets GDAL_VRT_ENABLE_PYTHON=NO for the whole process.
A value you set does not apply. A VRT from a table or a Volume does not run its Python code.
gbx_rst_derivedband and gbx_rst_derivedband_agg take Python source from you. They do not use GDAL's pixel function API.
They run your source with exec in the Python process of the query, and call your function on the band arrays.
That code has the permissions of that process, as any Python you run does. GeoBrix adds no sandbox around it.
- Write the code yourself. Pass
python_funcas a literal in your query. Never pass a column of code from a table that others can write. - Unity Catalog does not run it. Neither function is a working UC function, because UC does not run caller-supplied Python. An optional stub for the scalar raises and names the session route.
If your own code reads Python-pixel VRTs from less-trusted sources, keep the option NO and pre-translate to GTiff.
For example, the VRT XML may come from object storage that other principals can write to.
GDAL_VRT_ENABLE_PYTHON=TRUSTED_MODULES with a narrow GDAL_VRT_PYTHON_TRUSTED_MODULES allowlist works only with the policy switched off.
See RasterX Function Reference § VRT Python pixel functions
for the full how-to.
7. Raster data other principals can write
GeoBrix reads rasters that anyone who can write a table or a Volume can name. A raster file can name more. A VRT names its sources, and a tile index names its tiles. A pipeline names its inputs, and a super-overlay names the documents it links. GDAL opens all of them. So GeoBrix applies a driver policy to each process, on both tiers, before any raster is opened:
-
The refused drivers are removed from GDAL. They are the stored-pipeline driver (
GDALG), and the tile indexes and catalogs that open other rasters (GTI,STACTA,STACIT). They are also the service drivers (WMS,WMTS,WCS,OGCAPI,HTTP), and the network APIs (PLMOSAIC,PLSCENES,EEDAI,DAAS,NGW, and the OGR network driversWFS,CSW,EEDA). Last are three drivers that act on what a file names. TheKMLSUPEROVERLAYdriver fetches aNetworkLinkorIconhrefover HTTP. TheESRICdriver fetches a coordinate reference system that itsconf.xmlgives as an http(s) URL. TheMRFdriver opens a source its file names and, on a read, writes cache files at paths its file names. None of the refused drivers is registered, so GDAL cannot open them at any depth. -
The VRT settings that read a file's bytes as pixels, or run code, are off (
GDAL_VRT_ENABLE_RAWRASTERBAND=NO,GDAL_VRT_ENABLE_PYTHON=NO). -
Every raster GeoBrix reads from data is opened with the allowed drivers only. The allowed drivers are the ones GeoBrix has classified as allowed; drivers GeoBrix has not classified for the GDAL in use are refused. GDAL is given that list on every read of a raster file and of a tile's bytes. This includes the rasters GeoBrix hands to rio-tiler or copies to a COG. The only other reads are of two kinds. One is scratch files GeoBrix writes and reads back itself. The other is the files the development-only sample-data generator downloads and converts. A source that a VRT or an index names is opened through GDAL's own registry, from which the refused drivers are removed. Where the full defence applies (below), a named file is also identified first, with the allowed drivers, and opened with the driver identified.
-
Tile bytes that hold a VRT, or another format that names other files, are refused. A tile's bytes are data, and the remote-path check below never sees what a VRT's sources name. The Python level names the driver from a tile's bytes first and refuses these before it opens them:
VRTandDERIVED, and the formats that name other datasets:DIMAP,SAFE,PDS4,ECRGTOC,RPFTOC,TIL,MEMandNUMPY.- Label and header formats that name their data file:
PDS,ISIS2,ISIS3,VICAR,ENVI,EHdr,GenBin,ERS,PAux,MFF,MFF2,RST,ILWIS,SAGA,ISCEandROI_PAC. - Product directories:
CEOS,SAR_CEOS,AirSAR,RS2,RCM,TSX,COSAR,SENTINEL2,AIG,DOQ1,DOQ2,FASTandESAT.
The error names the format and gives a fix: store the tile as a GeoTIFF, or pass the VRT as a virtual tile (a path). A format that finds its header in a separate file is named only if the tile's own bytes identify it. The data file of an
ENVIorEHdrraster has no signature without its.hdr, so it is not named. It is not opened either, and fails with the reader's own "not recognized" error. netCDF, HDF5, HFA, JP2 and GPKG bytes still open. At the JVM level,gbx_rst_transformcrs,gbx_rst_slopeandgbx_rst_mapalgebraopen a tile's non-TIFF bytes only with a short list of single-file drivers. They therefore refuse the same formats and more.
gbx_rst_gdal runs only listed GDAL steps. The command takes no file, format, option or /vsi name. GeoBrix writes the read and write steps itself. The input is the tile and the output is a tile.
Each step and argument must be on the allowlist. Each value must have the grammar of its argument. Each CRS goes through the CRS resolver.
Remote paths that come from data. At the Python level, a path from data is
opened only when it names a local or Volume path (/Volumes/…, /Workspace/…), a cloud object
store, or /vsimem/. The cloud object store forms are
s3://, s3a://, abfss://, abfs://, az://, gs://, wasbs://, or /vsis3/,
/vsiaz/, /vsiadls/, /vsigs/ and their /vsis3_streaming/, /vsiaz_streaming/,
/vsigs_streaming/ forms. A wrapper of /vsizip/, /vsitar/ or /vsigzip/ around one of these counts too.
The check covers a virtual tile's path and the path rst_fromfile is given (a
column's value is data). It also covers the rows of a manifest or a tile index, and the sources of a .vrt that
raster_gbx reads. Finally, it covers the path column that vector_file_read reads from a table, and a virtual
tile that a vizx plot opens. A path that names /vsicurl/, /vsicurl_streaming/, http://,
https://, ftp:// or another GDAL virtual file system, directly or inside a wrapper such as
/vsizip//vsicurl/…, raises an error that names it. The error comes before anything is opened: for
rst_fromfile, at its first evaluation. A scheme counts as rasterio and pyogrio read it, so
https:host/a.tif, written without //, is the URL they would open. The check runs in every
open GeoBrix makes of a raster or a vector file, so a path from data is never opened without it.
A path you pass yourself to a call that runs on the driver is your own choice and is not checked.
Examples are StacClient(catalog=url), and the path you give plot_file, plot_cog, plot_mosaic, a map
layer or segment_raster.
To open remote paths from data you trust, set GBX_ALLOW_REMOTE_PATHS=true in the driver's
environment before
register() and before the column or the read is built. In the notebook, that is os.environ["GBX_ALLOW_REMOTE_PATHS"] = "true". The workers never read it: the SQL
functions and readers that register() installs, rst_fromfile and vector_file_read take the
driver's value to them, so it works on Serverless too. After you change it, call register()
again. The other Python column functions, called without the SQL functions, do not carry it: on a
worker they refuse a remote path. The sources GDAL opens by itself are outside this check. These are the
sources of a VRT that a virtual tile's path names, and the netCDF CRS URL below. A VRT held as tile
bytes is refused, as listed above.
Hrefs that come from data. StacClient.download and repair, and the Overture downloader's HTTP
fallback, fetch hrefs that a catalog or a table names. Each href must be an http(s) URL whose host resolves only to
public addresses. These addresses are always refused, even for a host you list: a cloud metadata address (169.254.169.254, fd00:ec2::254, 100.100.100.200), and a loopback,
link-local or unspecified one. Any other address that is not public is also always refused (the documentation and benchmark ranges,
multicast, reserved). A private (RFC 1918, fc00::/7) or
carrier-grade NAT (100.64.0.0/10) address is refused unless you name the host in allowed_hosts= (an internal
catalog). An allowed_hosts= list, when you pass one, refuses any other host. Azure's WireServer address
(168.63.129.16), a platform endpoint, is refused with the cloud metadata addresses. A 6to4 address (2002::/16) is
refused too, whatever IPv4 address it embeds. The host checked is the one the HTTP client
connects to. An href whose host the client reads differently from the check (a backslash in it, for example) is
refused. The fetch connects to an address the check approved, with the host's name in the request and in TLS. A
DNS answer that changes after the check is therefore never used. Each redirect hop is checked the same way, and no
~/.netrc is read. See STAC § Constructor.
Spark's GDAL settings on the JVM. A spark.gdal.* or spark.databricks.labs.gbx.gdal.* setting applies to the
whole executor JVM. On dedicated compute, the first GDAL use in each JVM applies it for every job that JVM then runs.
The JVM level runs on dedicated compute only, and is refused on standard access mode.
GeoBrix sets the policy when it is imported, in the environment GDAL reads when it registers
its drivers. It completes the policy at its first GDAL use. With the policy on, importing GeoBrix
changes the process environment. It adds the refused drivers to GDAL_SKIP (a value you set
stays, with the refused names added). It sets GDAL_VRT_ENABLE_PYTHON and
GDAL_VRT_ENABLE_RAWRASTERBAND to NO, replacing a value you set. Subprocesses the process
starts inherit these values. With GBX_GDAL_DRIVER_POLICY=off set before the import, the
environment is left as it is.
Known limitation: behind a proxy, the proxy picks the address. With HTTP_PROXY or
HTTPS_PROXY set (and the host not in NO_PROXY), the proxy resolves the href's host and
connects to it. The address checks above therefore do not bound where it goes. A host that does not
resolve on the node is left to the proxy. The proxy is your egress control there: name the hosts you
trust in allowed_hosts=, which still applies.
Known limitation: GDAL connects on its own on a windowed read. With bbox, GeoBrix follows the
href's redirects itself, each hop checked, and GDAL opens the URL they end at. GDAL then resolves
the host again for its range reads (a DNS answer that changes after the check is used there).
A redirect the server returns to one of those reads is followed by GDAL without the checks.
Download without bbox (the fetch connects to the checked address, and each hop is checked) and
window the file afterwards, or name the hosts in allowed_hosts=.
Known limitation: a netCDF CRS given as a URL. A netCDF variable whose crs attribute is
an http(s) URL makes GDAL fetch that URL when the file is opened. No GDAL setting turns that
off. GeoBrix's netCDF readers need GDAL's netCDF driver, so it stays allowed. A netCDF file
another principal wrote can make the reading process send a request to a URL the file names.
Full and partial defence. Which one a Python process gets depends on the GDAL its rasterio runs.
- The full defence is the env wheel's. Its vendored rasterio and osgeo share one GDAL. GeoBrix therefore also deregisters any refused driver that was registered before it ran, and identifies a file before it opens it.
- The partial defence is a process whose rasterio brings its own GDAL (the PyPI wheel). The
refused drivers are kept out of GDAL's registration and every open uses the allowed drivers
only. A binding can register them before GeoBrix is imported. This happens at its first open for rasterio, and at its import
for a PyPI pyogrio (which bundles a GDAL of its own). On Linux GeoBrix removes them
then from each GDAL the process has loaded. Elsewhere it cannot, and warns once, naming each
binding and the drivers it keeps. To avoid it, import
databricks.labs.gbxbefore rasterio opens anything and before pyogrio is imported, or install the env wheel.
| Install path | Python GDAL | Defence |
|---|---|---|
The env wheel for the runtime, installed by file: geobrix-<version>+env6-py3-none-any.whl (Serverless environment 6, DBR 19) or geobrix-<version>+env5-py3-none-any.whl (Serverless environment 5, DBR 17.3 and 18) | the wheel's vendored rasterio and osgeo | full |
The DCS image: the env6 wheel with [vizx] | the wheel's GDAL, through GeoBrix's rasterio build | full (by construction; untested on DCS) |
The env wheel with [vizx]: the wheel vendors geopandas and contextily, so no PyPI rasterio, pyogrio, pyproj or shapely is installed | the wheel's vendored rasterio and osgeo | full |
| A partial path where rasterio or pyogrio registered GDAL's drivers before GeoBrix was imported | the binding's own GDAL | partial: on Linux the refused drivers are removed at the import, elsewhere with the warning |
The JVM side is the same on every install path. The GeoBrix JAR skips the refused drivers and sets the two VRT settings when the JVM's GDAL starts, whichever GDAL it loads. A JVM runs one GDAL, the build the JAR's GDAL classes come from. An older GDAL JNI (a system GDAL from an earlier release) is refused at the first GDAL use. So is a second GDAL on the JVM's library path. The error names it and the fix, and comes before any GDAL call.
A spark.gdal.GDAL_SKIP value adds to the refused drivers; it cannot remove one. In a Python
process a GDAL_SKIP environment value adds to them the same way. Neither
spark.gdal.GDAL_VRT_ENABLE_RAWRASTERBAND nor spark.gdal.GDAL_VRT_ENABLE_PYTHON turns
those settings back on. The switch below is the one way to turn the policy off.
A refused raster raises an error (a query error on a read, an error tile on a virtual tile). The message names what was refused and says why GeoBrix does not open it.
The policy is process-wide, as it is on the JVM. Once GeoBrix runs in a Python process (on the driver and on each executor), that process no longer finds the refused drivers. This holds for any code in it. On the JVM the same drivers are skipped when GDAL starts, as on the raster reader page.
To turn the policy off, set one switch, on either tier, before the process's first GDAL
use. A change later in the session has no effect. In a Python process, set
GBX_GDAL_DRIVER_POLICY=off in the environment before GeoBrix is imported. On the JVM, set
spark.databricks.labs.gbx.gdal.driver_policy=off in the cluster's Spark config, or
GBX_GDAL_DRIVER_POLICY=off in the cluster's environment. Off means GDAL is left as GDAL has
it, with no refused driver removed and no VRT setting changed.
Only turn it off for data you trust. A virtual tile or a raster from another principal can then
run a stored pipeline or read a raw band.
Next steps
- Installation — the env wheel and the JAR as cluster libraries.
- Databricks Container Service — the same native GDAL stack, built into a cluster image.
- Readers overview — configuration knobs for narrowing the GDAL driver surface.
- SECURITY.md — vulnerability reporting policy.