From 2acc8e5e8768def83568d6e19eb2f869f674f331 Mon Sep 17 00:00:00 2001 From: Gopal Lal Date: Fri, 22 May 2026 08:33:04 +0530 Subject: [PATCH 1/3] chore(ci): align dco-check checkout to v4 with other workflows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `dco-check.yml` was the only workflow using `actions/checkout@v6.0.2` while the other 7 (`pr-checks`, `coverage`, `license-check`, `pyo3-checks`, `rust-e2e`, `close-stale`, plus composites under `.github/actions/`) all use `actions/checkout@v4` at SHA 34e114876b0b11c390a56381ad16ebd13914f8d5. No security delta — both are SHA-pinned. Pure version-drift hygiene so a maintainer reading the workflows sees one consistent version across the repo. Co-authored-by: Isaac Signed-off-by: Gopal Lal --- .github/workflows/dco-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dco-check.yml b/.github/workflows/dco-check.yml index 106925e1..175c6fb9 100644 --- a/.github/workflows/dco-check.yml +++ b/.github/workflows/dco-check.yml @@ -34,7 +34,7 @@ jobs: name: Check DCO Sign-off steps: - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 with: fetch-depth: 0 From 820e69c09b92bc858dc0ea246ea46a2845b8b397 Mon Sep 17 00:00:00 2001 From: Gopal Lal Date: Fri, 22 May 2026 08:33:17 +0530 Subject: [PATCH 2/3] chore(ci): add dependabot config for cargo + github-actions Closes the dependency-hygiene gap by configuring Dependabot to track the two ecosystems the kernel actually uses: `cargo` (Rust crates) and `github-actions` (SHA-pinned actions). `pip` is intentionally excluded. Per go/pinning-python-deps, the kernel is treated as an externally-published library: major-version bounds in `pyo3/pyproject.toml` + `uv sync` re-resolution per CI run, no committed lockfile. Letting Dependabot rewrite pinned pip versions would conflict with that policy. Both ecosystems batch minor + patch updates via groups to reduce PR churn; security advisories still surface as individual PRs. Limits: cargo 10 open PRs, github-actions 5. Co-authored-by: Isaac Signed-off-by: Gopal Lal --- .github/dependabot.yml | 53 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..7951c64f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,53 @@ +# Copyright (c) 2026 Databricks, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Dependabot configuration for the kernel. +# +# Ecosystems intentionally covered: +# - cargo: keeps the Rust crate graph patched, complements +# `cargo-deny` (RustSec advisories already block merges). +# - github-actions: keeps the SHA-pinned actions current. +# +# Ecosystems intentionally NOT covered: +# - pip: per go/pinning-python-deps the kernel is an +# externally-published library; we use major-version bounds in +# pyo3/pyproject.toml + `uv sync` re-resolution per CI run, with +# no committed lockfile. Letting Dependabot rewrite pinned pip +# versions would conflict with that policy. + +version: 2 +updates: + - package-ecosystem: "cargo" + directory: "/" + schedule: + interval: "weekly" + open-pull-requests-limit: 10 + groups: + # Batch patch + minor updates to reduce PR churn; security + # advisories still come through as individual PRs. + cargo-minor-and-patch: + update-types: + - "minor" + - "patch" + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + open-pull-requests-limit: 5 + groups: + gha-minor-and-patch: + update-types: + - "minor" + - "patch" From 732827ba21b280921ed1bd8e885740257b8798be Mon Sep 17 00:00:00 2001 From: Gopal Lal Date: Fri, 22 May 2026 08:55:30 +0530 Subject: [PATCH 3/3] chore(pyo3): correct stale comments in pyproject.toml dependency blocks The dependency-block comments claimed CI uses `uv sync --frozen` with a committed `uv.lock` carrying SHA256 hashes. The actual policy (per `.github/workflows/pyo3-checks.yml` + go/pinning-python- deps externally-published-library rule) is the opposite: no committed lockfile, no `--frozen`, just major-version bounds + the db-pypi JFrog proxy's 7-day age filter. The mismatch was misleading to security reviewers and to future contributors trying to understand the supply-chain story. Audits of dependency pinning flagged the pyarrow dep as "unpinned" partly because the comments suggested hash-locked CI that didn't exist. This commit rewrites both comment blocks to match the actual in-repo policy: - `[project].dependencies` block: explains the major-version bound and points at the workflow + policy doc. - `[dependency-groups].dev` block: explains `uv sync --group dev` (no `--frozen`), JFrog age-filter as baseline protection, uv re-resolution per CI run within the major-version bounds. No behavioural change. Documentation accuracy only. Co-authored-by: Isaac Signed-off-by: Gopal Lal --- pyo3/pyproject.toml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/pyo3/pyproject.toml b/pyo3/pyproject.toml index 81a2cf72..67c2e2ad 100644 --- a/pyo3/pyproject.toml +++ b/pyo3/pyproject.toml @@ -9,16 +9,22 @@ description = "Python bindings for the Databricks SQL Kernel (PyO3)" requires-python = ">=3.9" license = { text = "Apache-2.0" } authors = [{ name = "Databricks" }] -# Runtime dependency for downstream consumers. Loose major-version -# bound per the published-library guidance — exact pins make this -# wheel harder for end-users to install alongside their own pyarrow -# consumers. The CI environment is fully hash-locked via `uv.lock` -# (see below), separately from this contract. +# Runtime dependency for downstream consumers. Major-version bound +# per the go/pinning-python-deps externally-published-library rule: +# exact pins make this wheel harder for end-users to install +# alongside their own pyarrow consumers. The CI environment also +# uses these bounds (no committed lockfile) — see the +# `[dependency-groups].dev` block below + the workflow comment in +# `.github/workflows/pyo3-checks.yml` for the policy rationale. dependencies = ["pyarrow>=14,<19"] # Dev / CI dependencies. PEP 735 standard; uv reads this directly. -# `uv sync --frozen` installs from `uv.lock`, which carries SHA256 -# hashes for every artifact + transitive dep. +# CI runs `uv sync --group dev` (no `--frozen`, no committed +# lockfile) per the externally-published-library policy in +# go/pinning-python-deps. The major-version upper bounds below +# plus the `db-pypi` JFrog proxy's 7-day age filter are the +# baseline supply-chain protection; uv re-resolves on each CI run +# within those bounds. [dependency-groups] dev = [ "maturin>=1.7,<2.0",