Skip to content

store: drop bound args from query trace logs; mgmtapi: cache-only module source for read-only validation - #444

Merged
procoduck merged 2 commits into
mainfrom
fix/tracer-args-validate-module-source
Oct 28, 2026
Merged

procoduck merged 2 commits into
mainfrom
fix/tracer-args-validate-module-source

Conversation

@procoduck

Copy link
Copy Markdown
Owner

Two small hardening changes.

Query trace logs omit bound parameters (internal/store/store.go)
The pgx tracer copied every trace-data key into slog, including the values bound to a failed
statement. It now skips the args key; the statement, error and timing are still logged. New spec
internal/store/store_tracer_test.go runs a failing query and checks the bound value never
appears in the log output.

Read-only validation reads pinned modules from the cache (internal/mgmtapi/rpc_pipeline.go)
ValidatePipeline is an org-viewer RPC, but in a strict org it linted import.git blocks with the
fetching module source, which a save uses. The new validationModules gives the fetching source only
to a caller who could save the text (org editor or above, or a writer of one of the org's teams) and
pinnedimport.Cached to everyone else, including on any error. A cached module is linted exactly as
before; an uncached one is reported as not fetched. New spec in
internal/mgmtapi/strict_tenants_test.go covers viewer, org admin and owning-team member.

CHANGELOG: two lines under Unreleased.

Testing: go test ./internal/store/ ./internal/mgmtapi/, make lint (incl. guards).

🤖 Generated with Claude Code

Andre Staats and others added 2 commits October 28, 2026 23:35
…ule source for read-only validation

The pgx tracer forwarded every trace-data key to slog, including the
bound query arguments of a failed statement. The logger now skips the
"args" key; the SQL, error and timing are still logged.

ValidatePipeline (org viewer) linted a strict org's import.git blocks
with the fetching module source. It now fetches only for a caller who
could save the pipeline (org editor or above, or a writer of one of the
org's teams) and reads the module cache for everyone else.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TAAVzyeV4HSSNjU8xVWWtE
@procoduck
procoduck enabled auto-merge (squash) October 28, 2026 22:40
@procoduck
procoduck merged commit f161edc into main Oct 28, 2026
22 checks passed
@procoduck
procoduck deleted the fix/tracer-args-validate-module-source branch October 28, 2026 22:49
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