Skip to content

Validate sortable and searchable columns against SQL injection #23

Description

@todo-mdx

CRITICAL: While POST/PUT/PATCH columns are validated via isValidColumnName(), the sortable and searchable config arrays in src/conventions/crud.ts are directly interpolated into SQL without validation.

Location: src/conventions/crud.ts lines 18-31 (sortable) and 24-28 (searchable)

TDD Steps:

  • RED: Write test with malicious sortable/searchable config values
  • GREEN: Apply isValidColumnName() validation to sortable/searchable entries at API init or request time
  • REFACTOR: Consider validating all config column arrays in a single initialization pass

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

    P0bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions