Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Sanitize SQL queries

オープン
#6,019 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
42/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
android, java, kotlin, sql, sqlite

調査の方向性

sentry-jdbc と sentry-android-sqlite の計装を、SupportSQLiteOpenHelper と SQLiteDriver のエントリポイントを含めて特定し、先行例として OpenTelemetry Java の SqlSanitizerWithSummary.jflex を確認する。完了の条件は、すべてのステートメントがリテラルやコメントを露出させずに安全な構造的 span 説明を生成し、不正な入力、方言、secret-canary、fuzz/堅牢性、パフォーマンスをカバーしていること。

索引モデルが issue の本文から書いたものです。

説明

Feature Java Platform: Java Spans
Problem Statement

Our JDBC and Android SQLite integrations currently use caller-provided SQL directly as the span description. If a customer interpolates values instead of using placeholders, literals and comments can contain PII, credentials, or other sensitive data and are sent to Sentry. The Java SDK has no SQL sanitizer today.

Solution Brainstorm

Introduce a shared internal SQL analyzer used by sentry-jdbc and sentry-android-sqlite.

Requirements:

  • Sanitize every statement, including prepared-statement text.
  • Replace literal values with placeholders while preserving SQL structure and existing parameter markers.
  • Remove or redact line and block comments.
  • Handle database dialect differences conservatively.
  • Never fall back to, attach, or log the original query if analysis fails; fail closed to safe structural metadata.
  • Use sanitized query text as the transaction-based span description.
  • Cover JDBC, SupportSQLiteOpenHelper, and SQLiteDriver instrumentation.
  • Add malformed-input, dialect, secret-canary, fuzz/robustness, and performance tests.

OpenTelemetry Java's Apache-2.0 JFlex SqlSanitizerWithSummary.jflex is strong prior art and can likely be adapted, but should not be vendored unchanged: OTel preserves comments, may skip sanitization for prepared statements, and preserves unknown fragments. Vendoring requires source attribution and a THIRD_PARTY_NOTICES.md entry.

主要言語
Kotlin
スター
1.4k
フォーク
478
平均マージ
2日 20時間
マージ済み PR(30日)
71

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

getsentry/sentry-java のほかの issue

getsentry/sentry-java の issue をすべて見る

似ている issue

Kotlin の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。