You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(db): DB ビューワで入力した SQL を実行できるようにし、VIEW の表示とレコードの表記を直す - #648
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Unresolved critical issues allow whitespace-only selections to execute unselected SQL and psql metacommands to run OS commands outside the database role’s permissions.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Unresolved critical flaws can turn invalid SQL into executable statements, expose client-side files through LOCAL INFILE, and cause unbounded memory growth while buffering logs.
--binary-mode は LOAD DATA LOCAL INFILE によるクライアント側のファイル読み込みを止めません。LOCAL が有効な MySQL/MariaDB では、例えば LOAD DATA LOCAL INFILE '/path/to/file' INTO TABLE t がこの検査を通り、DB の FILE 権限なしでホスト・WSL・コンテナ上のファイルを読み込んでサーバーへ送信できます。DB ユーザーの権限の外でファイルに触れないよう、入力した SQL の実行では --local-infile=0 も明示してください。
Reject unterminated block comments instead of stripping them
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #646
変更点
db_execute)。「実行」かCtrl+Enterで実行し、範囲を選んでいればそこだけを実行する--batch、PostgreSQL はCOPY ... CSVで包む)--table -vv、PostgreSQL は-qを外す)。実行のあとはテーブルの一覧を読み直す--commandに複数の文を渡すと 1 つの暗黙のトランザクションになり、途中の失敗で前の文まで取り消されるため(実測)。コンテナの経路は、exec の環境変数で渡してコンテナのshで流し込む(exec の標準入力を閉じると接続ごと切れるため)COPYが拒む文(RETURNINGの無いWITH ... UPDATE、SELECT ... INTO)は、SQLSTATE と出どころの関数名で見分けてログの形で流し直す(本文はサーバーのlc_messagesで翻訳されるので照合しない)VIEWと出すRedis の対応は #647 に分けた。
確認
just checkCOPYの拒否の判定を確かめた🤖 Generated with Claude Code
https://claude.ai/code/session_01PZw9ixppashkuJvbtNqB54