Skip to content

fix: verify driver signatures in Client.Install - #544

Draft
zeroshade wants to merge 1 commit into
mainfrom
fix/install-verify-signatures
Draft

zeroshade wants to merge 1 commit into
mainfrom
fix/install-verify-signatures

Conversation

@zeroshade

@zeroshade zeroshade commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

SignedByColumnar's deprecation note says Client.Install verifies signatures, but on main it still doesn't: it calls config.InstallPackage with empty InstallPackageOptions, so library installs (and, via later PRs, npm/Rust installs) accept a driver whose library was modified after signing. Only the CLI verified.

This plugs into #502's transaction hook instead of adding a separate staging step:

  • dbc.VerifyPackageSignature(stagingDir, manifest) matches config.PackageVerifier. It is the check the CLI ran in verifySignatureInStaging, moved into the library; the CLI now delegates to it, with identical error messages.
  • Client.Install passes it as the Verifier unless the caller gives dbc.AllowUnsigned(), the library counterpart of --no-verify.
  • Verification runs on the staged package before publication, so a rejected driver leaves any existing install and registration in place.

Behaviour change: unsigned or tampered drivers installed through the library now fail unless the caller passes AllowUnsigned().

Tests: TestClientInstallVerifiesSignature (new tampered fixture is rejected with no registration; AllowUnsigned installs it) and TestClientInstallFailedVerificationKeepsExistingInstall.

(Archive path-traversal hardening was dropped from this PR: #502's validatePackageFilename already rejects ../, separators and reserved names before anything is written.)

SignedByColumnar's deprecation note says Client.Install verifies signatures,
but Client.Install passes no verifier to config.InstallPackage, so library
installs accept a driver whose library was modified after signing.

VerifyPackageSignature (a config.PackageVerifier) now holds the check the CLI
ran in verifySignatureInStaging; Client.Install passes it unless the caller
opts out with AllowUnsigned, and the CLI delegates to it. Verification runs on
the staged package, so a rejected driver leaves an existing install in place.
@zeroshade
zeroshade force-pushed the fix/install-verify-signatures branch from f9c504b to 04e39d9 Compare October 29, 2026 17:07

This branch was successfully deployed

1 active deployment
snapshot — 04e39d97 Deployed Oct 29, 2026 by zeroshade via snapshot #1083
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant