Skip to content

fix: improve sql table name validation  #3933

Closed
@terriko

Description

@terriko

@harshittiwariii has re-enabled bandit rule B608 in our bandit config. We've got a few places it's being triggered because we're constructing a query with a table name as variable, and there's no correct way to handle this construction in sqlite3. For now, they've been marked as # nosec and we reviewed them manually, but it would be nice to have a function that validates table names before they're used in this way, since we know in advance what our valid table names are.

I'm opening this issue specifically for @harshittiwariii to finish the work begun in #3885 . It's not available to anyone else unless @harshittiwariii gets busy and wants to put it back in the general pool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions