Repository navigation
feat: add startup option to skip SQL table checks - #1463
Merged
Merged
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
增加启动参数
SQLBOT_SKIP_TABLE_CHECK,默认false。仅显式设为true时跳过生成 SQL 的表名提取、无法提取表名时的拒绝及表白名单检查。参数在启动时读取,修改后重启生效,不增加配置页面或运行时修改;补充配置说明及安全约定。Evidence
ca069c51无条件执行表检查,没有启动配置可以跳过。After: 默认及显式 false 保留检查;显式 true 跳过提取和拦截,仍执行后续权限处理和数据库执行检查。
backend/执行,复用结果:LOG_FORMAT='%(levelname)s %(message)s' uv run --no-sync pytest -q tests/test_table_check.py tests/test_postgres_denylist.py tests/test_cwe89_escape_fix.py→ 62 passed。
051857e0(文件树ec1d1115);提交仅固化已验证内容,未重复运行测试。使用已有 Python 3.11.18 / pytest 7.4.4 / sqlglot 30.14.0 环境,未同步依赖;uv 提示环境创建时的 Python 补丁版本与当前不同。Merge Danger
Door: two-way
关闭跳过参数并重启即可恢复默认检查,无迁移或依赖变更。单提交基于最新
main,无 merge commit,可按 Rebase and merge 重放。Blast Radius: deployment
默认行为不变。显式开启时影响该部署内共用问数流程的入口,可能允许查询数据源账号可读取的未勾选表;只读、危险函数、元数据查询控制及既有权限处理仍照常执行。