SQL tool invoke filters "attach" in the text of the value being inserted
- 主要语言
- Shell
- 星标
- 11.2k
- 派生
- 1.9k
- 平均合并
- 14 小时 16 分钟
- 30 天内合并 PR
- 6
描述
### Describe the bug
```
✗ Store identify review results (sql)
│ INSERT INTO trace_reviews (trace, function_name, file, status, finding) VALUES
└ Blocked SQL statement: "attach" is not allowed for security reasons.
```
I saw the above error in the trace of my agent using sql to track the status of a code review.
The model said this:
```
● The word "attach" in data triggers the filter. Let me split the inserts:
```
Looks like there needs to be some better filtering of commands versus values when evaluating the safety of sql statements. Maybe ask sqlite-ast-parser to parse the statement first and then evaluate the different parts of the statement? Or use `sqlite3_set_authorizer` to inspect commands as they execute.
### Affected version
GitHub Copilot CLI 1.0.10
### Steps to reproduce the behavior
I asked for a trace-by-trace code review of a codebase via claude opus 4.6. It chose to use a sqlite database to track status of review. the codebase contains the word attach in its functions.
### Expected behavior
_No response_
### Additional context
_No response_
贡献指南
调研方向
首先重现 issue 中的 INSERT 示例,并找到 CLI 使用的 SQL 安全过滤器。比较它如何处理插入值中的单词 "attach" 与 ATTACH 命令;完成后应保留对不安全命令的阻止,同时不拒绝这个有效的 INSERT。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- shell, sql, sqlite
- 领域
- cli, database, security
- Issue 类型
- 缺陷
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 冷清
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100