Skip to content

Conversation

@meiji163
Copy link
Contributor

Description

This PR fixes the query in ReadLastCheckpoint introduced in #1595 by properly escaping the table name. Thanks to @smartinec for catching this!

In case this PR introduced Go code changes:

  • contributed code is using same conventions as original code
  • script/cibuild returns with no formatting errors, build errors or unit test errors.

Copilot AI review requested due to automatic review settings November 23, 2025 23:37
Copilot finished reviewing on behalf of meiji163 November 23, 2025 23:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a SQL injection vulnerability in the ReadLastCheckpoint function by adding proper escaping to the database and table names in the query, bringing it in line with the security practices already established throughout the codebase.

  • Adds sql.EscapeName() calls for both database name and checkpoint table name
  • Addresses security concern identified in PR #1595
  • Maintains consistency with escaping patterns used in all other SQL queries in the file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@meiji163 meiji163 mentioned this pull request Nov 23, 2025
2 tasks
@meiji163 meiji163 merged commit 215dee4 into master Nov 24, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants