harden: production-readiness pass (gold-standard audit)#89
Merged
Conversation
Implements the audit's P0–P2 findings (43.5/50 → closes the actionable gaps). Server / security - RBAC now enforces the full permission lattice: statements map to Read/Write/Ddl; readwrite gains Ddl (behavior-preserving — readwrite/admin keep full access, readonly stays read-only, any role may read). Admin reserved for user mgmt. (handler.rs, role.rs) - Resource-limit errors (sort/join/memory budget) now reach remote clients verbatim instead of being masked to 'query execution error' — same fix class as the unique-violation message. +tests. Release / CI / supply chain - scripts/smoke-release.sh: post-publish durability gate (install → README PowQL flow → kill -9 → restart → assert WAL replay recovered rows + unique still enforced), wired as a required release.yml job. Verified ALL-PASS. - Real MSRV build job (compiles on pinned 1.93, not just a doc grep). - cargo audit: scoped-ignore the 3 postgres DoS advisories confined to the publish=false powdb-compare crate (.cargo/audit.toml + action ignore), with provenance. cargo audit now exits clean; no shipping crate affected. - TS client version drift fixed (CLIENT_VERSION=src=dist=pkg 0.5.0) + a CI job that asserts package.json === CLIENT_VERSION. - Dockerfile dep-cache now copies auth+backup manifests (full closure). Build / hygiene - panic='abort' documented as a deliberate crash-only design (fast exit → supervised restart → WAL replay); every deploy example confirmed under an auto-restart policy + documented in examples/deploy/README.md. - [workspace.lints] clippy::all=deny so clippy fails locally like CI does. - Removed ~190 LOC dead mvcc.rs/tx.rs scaffolding from powdb-storage. - Fixed stale powdb-auth 'not wired in' doc-comments + CLI --help PowQL pipe-operator example that doesn't parse. Verified: cargo build/clippy/fmt clean, full workspace tests 0 failures, smoke-release ALL-PASS, cargo audit clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
zvndev
added a commit
that referenced
this pull request
Jun 14, 2026
Bumps workspace + inter-crate pins 0.4.7 → 0.4.8, moves CHANGELOG [Unreleased] → [0.4.8], updates SECURITY.md supported-versions and the user-facing version pins (cargo install, ghcr image tags, REPL banners). Historical 'since 0.4.7' notes left intact. Ships the gold-standard hardening from #89: full RBAC lattice enforcement (behavior-preserving), resource-limit errors surfaced to remote clients, automated post-publish durability gate, MSRV build job, scoped cargo-audit, crash-only panic documentation, dead-code removal. Verified: build/clippy/fmt clean, full workspace tests 41 suites 0 failures, backward-compat (v0.4.7-created DB + auth.json open cleanly on 0.4.8, both directions), smoke-release ALL-PASS. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
Implements the actionable findings from the gold-standard audit (43.5/50). Closes the real gaps without cargo-culting. Behavior-preserving for existing clients.
Server / security
Read/Write/Ddl;readwritenow explicitly carriesDdl(app users create their own tables), so readwrite/admin keep full access, readonly stays read-only, any authenticated role may still read.Adminreserved for user management. Was previously a binary read/write gate with a defined-but-unenforced lattice. +tests.query execution errorby the wire sanitizer — same bug class as the unique-violation message fixed last release. Now allowlisted (leak no internal state). +tests.Release / CI / supply chain
scripts/smoke-release.sh: install → README PowQL flow →kill -9→ restart → assert WAL replay recovered every row + unique constraint still enforced. Wired as a requiredrelease.ymljob. This is the exact gate whose absence yanked v0.4.1–0.4.3. Verified ALL-PASS locally.cargo auditfixed — scoped-ignore the 3postgresDoS advisories whose entire path is confined to thepublish = falsepowdb-comparebench crate (.cargo/audit.toml+ actionignore:, with provenance). No shipping crate affected;cargo auditnow exits clean instead of failing the gate on dev-only noise.CLIENT_VERSION= src = dist =package.json(0.5.0); README points at npm so it can't restale; new CI job assertspackage.json === CLIENT_VERSION.auth/backupmanifests it was silently missing (full dependency closure cached).Build / hygiene
panic = "abort"documented as a deliberate crash-only design (fast exit → supervised restart → WAL replay → consistent state — safer for a stateful engine than unwinding into a poisonedRwLock). Every deploy example confirmed under an auto-restart policy; requirement documented inexamples/deploy/README.md. (The audit suggested removing abort; verifying against the actual lock model showed keeping it is the correct, safer call — see the Cargo.toml comment.)[workspace.lints](clippy::all = deny) socargo clippyfails locally with the same rules CI enforces. No new failures — mirrors the existing gate.mvcc.rs/tx.rssnapshot-isolation scaffolding shipping inpowdb-storage; the live engine usesRwLock.powdb-auth"not wired in" doc-comments and a CLI--helpexample using a|pipe operator PowQL doesn't have.Verification
cargo build/clippy/fmtclean · full workspace tests 0 failures ·scripts/smoke-release.shALL-PASS ·cargo auditclean · TS-version assert pass.🤖 Generated with Claude Code
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.