ClickHouse / ClickHouse/clickhouse-java

[JDBC-V2] Make `DatabaseMetaDataImpl` use `PreparedStatement`.

Open
#2,739 0 comments 0 reactions 0 assignees View on GitHub
area:jdbc-metadata jdbc-v2
Dominant language
Java
Stars
1.6k
Forks
637
Avg merge
2d 23h
Merged PRs (30d)
29

Description

## Description

There are many places in `DatabaseMetaDataImpl` that construct a dynamic query. It is wrong because leads to a security issue.

- All queries should use `PreparedStatement`
- Where is it no possible - should be reviewed and needed escaping should be added

Contributor guide

Open the contributing guide

Research direction

Start by locating DatabaseMetaDataImpl and inventorying its dynamically constructed queries. Review each query for conversion to PreparedStatement, and identify cases where conversion is not possible and escaping must be addressed. Done means all applicable queries use prepared statements and the remaining cases have the needed escaping.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases, security
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.