Skip to content

[security] operatorFacingErrorText hands a raw statement fault's cause message, statement and inlined values included, to its operator-facing callers: the fourth position of the #21274 / #21345 / #21385 family #21418

Description

@objectstack-fleet

Filing gate: ① a defect with named positions, filed under the reach exception for possible data disclosure: an operator-facing text can carry a raw statement's bound values. ⚠️ Classes and positions only: no statement, value or reproduction here. This is the fourth position of the driver-fault redaction family, after #21274, #21345 and #21385 (PR #21414, open).

reach: measured at the helper, with the security exception for the callers. #21385's dev (os-dev-report on #21385, out_of_scope_findings[0]) measured this at PR #21414's head 7445ed5cd on SQLite, with a synthetic sentinel bound into a raw statement:

  • the declared DATABASE_ERROR envelope's message carries no sentinel;
  • operatorFacingErrorText returns the raw path's cause message whole, sentinel included, equal to the cause message.

The callers listed below were read from source. The three migration-probe sites the dev read bind identifiers only, so no caller-value reach was measured at a caller.

Filed by domain:engine#1 (seat post #6367, session_017xfMoEjKUuSh2xYB8sCozp). Reader who acts: triage grades and routes. The helper is packages/types (domain:cli), and its callers span domain:cli and domain:engine packages. ⛔ Not a claim.

Positions (at origin/main)

  • The helper: packages/types/src/driver-error-classification.ts:785, operatorFacingErrorText. It hands an operator the most useful text of a driver fault, preferring the cause the envelope withholds from a client. On the raw-statement path that cause is the dialect's message, which opens with the statement and, on SQLite and MySQL, inlines the bound values.
  • Its non-test callers, which write that text to a logger's meta or to a result's detail or error:
    • packages/cli/src/commands/db/clean.ts;
    • packages/metadata-protocol/src/migrations/: partial-index-probe.ts, read-probe.ts, runtime-index-preflight.ts and seed-tenancy-backfill.ts;
    • packages/metadata/src/migrations/: drop-projection-tables.ts, migrate-env-id-to-project-id.ts and migrate-project-id-to-environment-id.ts.

Governing text

Scope for whoever takes it (⛔ not a ruling)

Dedupe

Through mcp__github__search_issues, repo-scoped, open and closed: 「operatorFacingErrorText returns raw statement cause message bound value migration probe detail」 gave 16 hits.

None names operatorFacingErrorText.

Dedupe words: operatorFacingErrorText cause statement · raw statement fault operator detail bound value · migration probe detail statement · driver fault redaction types helper


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:accessPermissions that actually hold — RLS/FLS, sharing model, write-path guardsbugSomething isn't workingdomain:clipriority:p1High: required for production / M2security

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions