Skip to content

Session DB uses dynamic column mapping instead of explicit prepared statements #13

Description

@pallyoung

Problem

packages/server/src/server.ts (lines 345-366) — createSessionDatabase maps camelCase keys to snake_case columns at runtime using an ALLOWED_COLS whitelist.

While the whitelist provides some safety, this is more fragile than explicit prepared statements and harder to audit.

Suggested Fix

Use explicit column mapping (same pattern as the workspace repository) instead of runtime key mapping.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions