Skip to content

Systematically sanitize SQL inputs across the codebase #688

@coderabbitai

Description

@coderabbitai

Background

Currently, there are several places in the codebase where trusted data (like table names) is directly interpolated into SQL queries without sanitization. While these inputs are currently from trusted sources, this practice could lead to bugs and potential security vulnerabilities if the trust assumptions change in the future.

Objectives

  1. Review all SQL query construction points in the codebase
  2. Implement proper input sanitization for:
    • Table names
    • Column names
    • Other SQL identifiers
  3. Consider creating utility functions for SQL identifier sanitization

References

Impact

This improvement will:

  • Prevent potential bugs from malformed identifiers
  • Add an extra layer of safety against SQL injection
  • Make the code more robust against future changes in trust assumptions

/cc @gibber9809

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions