GithubHelp home page GithubHelp logo

actiontech / sqle Goto Github PK

View Code? Open in Web Editor NEW
1.3K 33.0 169.0 110.31 MB

一个支持多种不同类型数据库,覆盖事前控制、事后监督、标准发布场景,帮助您建立质量规范的SQL全生命周期质量管理平台

License: Mozilla Public License 2.0

Makefile 0.29% Go 99.36% Shell 0.29% Dockerfile 0.04% Python 0.03%
mysql sql-audit sql audit mybatis optimize advisor suggestion pg postgresql

sqle's Introduction

一个支持多种不同类型数据库,覆盖事前控制、事后监督、标准发布场景,帮助您建立质量规范的SQL全生命周期质量管理平台。

每周发版,快速迭代中

简体中文 | English

Release GitHub license GitHub stars GitHub issues GitHub closed issues Docker Pulls

🔍 SQLE是什么

SQLE 是爱可生自主研发支持多元数据库的 SQL 质量管理平台。应用于开发、测试、上线发布、生产运行阶段的 SQL 质量治理。通过 “建立规范、事前控制、事后监督、标准发布” 的方式,为企业提供 SQL 全生命周期质量管控能力,规避业务 SQL 不规范引起的生产事故,提高业务稳定性,也可推动企业内部开发规范快速落地。

📌 功能特性

更丰富的数据源支持

支持主流商业和开源数据库,包括 MySQL、PostgreSQL、Oracle、SQL Server、DB2、TiDB、OceanBase、ActionDB 等,持续增加新的数据源类型,以满足您不同的需求。

更全面的审核规则

审核规则源自我们经验丰富的 DBA 运维专家团队多年的技术积累。您可以借助我们的审核规则快速达到专家级的 SQL 诊断能力,并且我们的规则库目前已经拥有规则 700+,并在不断增加中。

更智能的 SQL 采集

提供多种智能扫描方式,例如慢日志、JAVA 应用等,以满足您的事前和事后 SQL 采集需求。一旦配置完成,我们的系统会自动持续采集各业务库中的 SQL,极大地减轻了您对 SQL 监督的压力,并及时发现问题 SQL。

更高效的审批流转路径

提供标准化的工作流,化解了在沟通和进度追踪上的难题,从而提升了上线效率。您可以通过与飞书、钉钉等多种消息通道的对接,及时了解更新进度,减少了沟通交流的成本。

更便捷的 SQL 数据操作

集成了在线数据库客户端 CloudBeaver,无需安装,通过可视化界面进行数据库管理和查询,提升了数据操作的易用性和效率。

全生命周期的 SQL 管控

提供 SQL 全流程的管控视角,帮助您统一管理SQL质量。您可以追踪问题SQL的解决进度,并提供快捷的优化功能,以提升 SQL 的效率。

查看更多社区版与企业版对比

💡 使用场景

SQL 太复杂,执行性能低,如何优化?

知识赋能,助您构建质量规范、提升 SQL 质量。提供审核规则及规则知识库,将专家经验赋能开发,快速提升问题 SQL 诊断能力,并支持私有云用户自主沉淀。

  • 从审核结果看 SQL 优化方向

    平台提供丰富的审核规则,用以覆盖不同 SQL 审核场景,您可以根据触发的规则,有针对性地优化 SQL。

  • 从知识库了解问题解决经验

    每个规则包含对应的知识库,是运维专家的经验沉淀,您可以借鉴并强化自身的运维认知。

  • 对知识库做自主沉淀

    除了平台提供的知识库信息,我们还支持私有云用户在知识库中进行自主沉淀,建立您的质量规范。

应用数量多,SQL 采集难,如何摆脱重复劳动?

提供智能扫描任务,可以自动持续采集不同来源的 SQL,帮助您摆脱重复劳动,极大地降低 SQL 采集难度。同时,根据不同业务要求定期巡检和生成审核报告,快速发现问题并提供优化建议。

  • 配置扫描任务,释放 SQL 采集负担

    平台支持十余种扫描任务类型,支持采集不同来源的 SQL,如:JAVA 应用程序、慢日志文件、TopSQL、MyBatis 文件等。

  • 定期持续巡检,提前发现问题 SQL

    平台将根据配置的采集周期,为您自动、持续采集相应 SQL。

    平台将根据配置的审核规则模板,定期巡检和生成审核报告,有助于您及时发现问题 SQL,并提供优化方向。

公司规模大,流程周转长,如何有效追踪进度?

提供标准化工作流,帮助提高工作透明度和上线效率。您可以根据实际组织架构配置自定义审批流程模板,化解沟通和进度追踪难题。同时,平台支持与多种消息通道对接,可以及时更新进度,减少沟通成本。

  • 生成您的自定义审批流程

    平台支持您根据自身实际业务,配置SQL审批、上线流程,适配不同业务的上线节奏,提升业务响应效率。

  • 配置消息推送渠道,快捷订阅变更

    平台支持对接多种主流IM应用,您可以将 SQL 审核集成到日常工作流中,协同办公,提升工作效率。

SQL 变更频,审批瓶颈大,如何分散审核压力?

将审核环节灵活嵌入到研发流程,从研发环节入手,减轻 DBA 审核压力。平台支持多种事前审核场景,将 SQL 审核前置到代码阶段,从源头实现降本增效。

  • 使用 IDE 插件,前置规范检查

    可以使用 IDE 审核插件,在代码编写过程中进行实时审核和规范检查,实现编码即审核的效果。

  • 对接 CI/CD 流程,保证应用代码上线无忧

    可以配置 CI/CD 审核流程,自动抓取代码变更中的 SQL,减少人工错误和代码缺陷,提高开发团队的效率和代码质量。

🧩 快速开始

版本说明

目前SQLE提供三个不同形态的版本,以满足不同的使用需求:

在线试用

我们同时提供了 SQLE 社区版 和 SQLE 企业版 的线上 DEMO 环境,登录后您可以轻松体验 SQLE 的丰富功能。

登录信息

user password
admin admin

您可以连接MySQL实例,进行测试

variable value
地址 20.20.20.3
端口 3306
用户 root
密码 test

注意事项

  1. 该服务仅用于在线功能体验,请勿在生产环境使用;
  2. 该测试服务数据会定期清理。

本地安装

SQLE 提供了多种安装部署的方式,用户可以结合自己的环境和现状选择。初次体验或者测试使用的话建议使用docker-compose 或 docker 快速部署。

部署方式:

  1. 源码安装
  2. RPM 部署
  3. Docker 部署
  4. Docker Compose部署

插件开发

目前支持其他种类数据库的审核插件:

更多了解:《功能说明及开发手册

🧑🏻‍💻社区支持

我们感谢您的关注与贡献,社区将引导您了解如何使用和贡献。欢迎以下方式加入社区:

🤗 欢迎将体验中产生的 Bug、问题和需求提交到 SQLE GitHub Issue

📞 商业支持

如果想获得 SQLE 的商业支持, 您可以扫描下方的微信扫描小程序码,进行在线咨询预约: commercial-support

此外,您也可以直接联系我们的商业支持团队获取更多信息,联系方式如下:

400-820-6580 / 13916131869 / 18930110869

sqle's People

Contributors

actiontech-bot avatar agate3cl avatar alextinng avatar bugsguru avatar coldwaterlw avatar cuishuang avatar drivebyer avatar gygkimo95 avatar hasa1k avatar huangweicen avatar iwanghc avatar jessun avatar kid-g avatar loosoo avatar lordofavernus avatar nufy323 avatar re-f avatar rocky114 avatar simplelogic666 avatar sjjian avatar taolx0 avatar waterdrink avatar winfredlin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sqle's Issues

MySQL 回滚语句无法正常生成并展示

SQLe Version
you can find it by exec sqled --help, e.g: main-ee a71e9bcd6c411c13ed71676770956e45ea4760fb

Describe the bug
在工单页面进行审核后,语句审核通过无法生成回滚语句,1. DDL 语句无法生成;2. DML语句在没有配置规则模板的情况下无法正常生成。
Q@G7$ RULM5KG5N`(6C3G$M

使用命令行参数启动sqle时会爆出空指针

SQLe Version
main e1fafc0

Describe the bug
在sqle启动时如果通过命令行参数启动且有些参数没填会爆出空指针异常
image
image

To Reproduce
在启动时不指定任何参数即可触发, 只指定mysql相关参数也可以触发

Expected behavior

  1. 对于必填的参数期望能在没填的时候给个提示而非运行中抛出空指针
  2. 对于参数的类型期望给到提示, 如mysql密码字段的默认值并非加密的, 但这个字段要求填一个加密后的字段

Support DB Plugin

功能描述

不同的数据库的SQL 审核流程是相同的,但是规则上会有不一样,因此对于不同的数据库支持可通过 Plugin 的形式实现,以实现以下目标

  • 不同的数据库规则相关的功能单独维护
  • DB 种类增删能通过非编译时集成

使用 Mybatis Scanner 扫描的 xml 内包含大 SQL 报错

SQLe Version
v1.2110.pre1

Describe the bug
使用 Mybatis Scanner 扫描的 xml 内包含大 SQL 报错,如图所示
E2 R4_Z_CJZ%VL9_BI}XG C
通过抓包发发现报错如下:
image

Expected behavior

  1. 期望能够提交成功

Suggestion

  1. 能够友好的查看报错信息

ldap类型的用户在sqle使用重置密码功能成功,但是没什么实际意义

SQLe Version
Version:"release-1.2111.x 382da4a"

Describe the bug
ladp账号登录到sqle平台后,sqle对该类型的用户重置密码功能未作限制,可以重置密码,但是实际上登录sqle还是需要ldap配置的密码

To Reproduce
Steps to reproduce the behavior:

  1. ldap配置一个账号
  2. sqle全局配置设置ldap各参数配置,并且开启该功能
  3. 使用ldap创建的账号进行登录sqle,然后切换admin用户,可以看到ldap账号生成的用户
  4. 对ldap的用户进行密码重置,重置密码成功后,使用最新的密码提示ldap的user和密码不一致无法登录。
    image

Expected behavior
期望在sqle平台对ldap类型的用户进行重置密码功能使用的限制,不应该让用户在sqle进行密码修改,应该让用户去ldap上去修改密码

oracle审核规则关闭之后创建工单依旧是可以触发该审核规则的

SQLe Version
"release-1.2111.x 3d69edc"

To Reproduce
Steps to reproduce the behavior:
1.添加一个oracle数据源,然后绑定到oracle默认的审核规则模板上
2.修改oracle默认审核规则模板,关闭审核规则后
3.然后创建工单,使用oracle数据源,使用select * from test.t1;然后点击审核依旧给出了审核规则提示信息
image

image

image

理论我是关闭了该审核规则的,所以我点击审核不应该是有这个审核规则会触发的。所以期望是没有开启对应的审核规则就不会触发审核提示

请问Oracle插件支持的Oracle版本有哪些

Describe
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Suggestion
A clear and concise description of what you want to happen.

Why
Why it can solve your problem.

添加数据源的时候,数据库的ip输入非数字时应当给予明显提示

SQLe Version
sqle-main_3c242384eea4bbf4381ef3f0c893b21512126967

Describe the bug
添加数据源的时候,数据库的ip输入非数字时应当给予提示
To Reproduce
Steps to reproduce the behavior:
1.数据源管理界面,点击添加数据源
2.然后在数据库的ip地址输入框内,输入非数字的参数,然后前端未给到明显提示
image
image

Expected behavior
应该给予前端提示例如爆红提示+提示信息只能允许输入数字之类的,另外应当限制输入非数字的参数

Could not automatically backport #68

Exception occurred when trying to cherry-pick PR #68.
Please cherry-pick it manually.

Traceback (most recent call last):
  File "/action/helpers.py", line 17, in git
    command_run = subprocess.run(["git", *args], stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True)
  File "/usr/local/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['git', 'cherry-pick', '792572135fae2b37fc6568c012b91fefea27b340']' returned non-zero exit status 128.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/action/main.py", line 30, in backport_commits
    git("cherry-pick", commit_hash)
  File "/action/helpers.py", line 26, in git
    raise GitException(output)
helpers.GitException: fatal: bad object 792572135fae2b37fc6568c012b91fefea27b340


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/action/main.py", line 69, in <module>
    entrypoint(
  File "/action/main.py", line 47, in entrypoint
    new_branch = backport_commits(commits_to_backport, base_branch, pr_branch)
  File "/action/main.py", line 33, in backport_commits
    raise RuntimeError("Could not cherry pick at least one commit automatically.")
RuntimeError: Could not cherry pick at least one commit automatically.

SQLE panic when trigger pt-osc suggestion

SQLe Version
main 201d68a

Describe the bug
SQLE panic when trigger pt-osc suggestion

To Reproduce
Steps to reproduce the behavior:

  1. 创建测试库表
CREATE DATABASE `t1`;
CREATE TABLE `t1`.`fruits` (
  `id` bigint(11) NOT NULL,
  `uid` int(11) NOT NULL DEFAULT '0',
  `name` varchar(100) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) 
  1. enable rule "改表时,表空间超过指定大小(MB)审核时输出osc改写建议", 可以将配置最大表空间调小,例如:“0",降低触发条件
  2. 提交审核工单,SQL语句:
alter table fruits add column create_date TIMESTAMP default current_timestamp
  1. 点击审核,SQLE 崩溃
    image

Expected behavior
正常提示 pt-osc 建议

当一个上线失败的工单,点击关闭工单失败

SQLe Version
SQLe Version:
"release-1.2112.x-ee ec268e8"

To Reproduce
1.创建一个工单,审核语句为select * from mysql.test
2.点击审核,然后执行立即上线
3.查看工单状态,显示上线失败,然后进入到该工单内,点击关闭工单,无法关闭
image

Expected behavior
是否考虑对于上线失败的工单可以不提供关闭工单的按钮展示,或者对于上线失败的工单可以使用关闭工单功能是其强制关闭

审核计划的token如果跟jenkins上配置的不一致,实际上还会继续给推送收集的sql语句

SQLe Version
"release-1.2111.x 5d24144"

To Reproduce
Steps to reproduce the behavior:
1.创建审核计划配置jenkins 触发gitlab sqle可以看到审核计划的语句
2.把审核计划给删除,然后重新创建一个新的审核计划,名字保持跟删除的保持一致
3.gitlab触发变更,然后jenkins进行构建,然后成功了
image
image
两边的token明显不一致,但是还可以继续推送收集的sql信息
Expected behavior
期望是审核计划删除之后,对应的token会失效,应该使用最新的token来进行推送

reorganize package relation under driver/mysql

背景:

当前 driver/mysql 包下所有文件都在一个包里。所有功能都糅杂在一起,功能界限模糊,不利于后期维护。

目标:

sqle-mysql-package-relation

方案:

  1. 调整文件所在文件夹,并调整包名
  2. isTableExist isSchemaExist getTableSize 等方法放入 context 包。在审核阶段由 context 提供统一获取库表信息相关的操作的入口,并由自己决定是否缓存相关数据。

使用 Mybatis Scanner 扫描的 xml 为空文件时,Scanner panic

SQLe Version
v1.2110.0.pre1

Describe the bug
使用 Mybatis Scanner 扫描的 xml 为空文件时,Scanner panic:
image

To Reproduce
Steps to reproduce the behavior:

  1. 创建一个空的xml文件,例如:sql.xml,内不含任何内容,放入某个文件夹下;
  2. 创建审核计划,并通过scanner 指定该文件夹上传;
  3. 执行报错

Expected behavior
期望为空时不上传

建议优化一下定时上线任务选择时间的交互方式

Describe
Version:
"release-1.2112.x-ee ec268e8"
1.创建一个工单,然后选择定时上线任务,点击选择时间
image
2.然后点击此刻,直接回到了定时任务时间确认框
image
3.如果此时点击定时上线,那么尤其选择时间是精确到秒,所以导致定时上线不成功
image

Suggestion
所以期望的是点击此刻之后,应该还在选择时间,此刻功能个人理解是快速帮你定位当前时间,所以点击此刻之后可以根据自己工作量安排来设置当前时间之后的几分钟或者几小时之类的,而不是点击此刻之后就立即退出选择时间框
image

Why
容易误导用户点击此刻之后可以直接使用定时上线功能

DBA可配置为默认操作所有数据源,无需单独配置

Describe
当前dba角色依旧需要手动绑定数据源。在数据源比较多的情况下,需要一个一个的绑定,不利于后期维护。

Suggestion
DBA角色默认可以操作所有已配置的数据源

Why
DBA 的权限本身就应该比较大,默认操作所有数据源。这样可以避免在每次新建数据源,还得手动修改dba角色绑定的数据源

使用建议

  1. 登录页优化建议:
    image
    说明:登录页效果有点 low,感觉配不上内部的功能组件,建议整的大气点,可以参考现在的 Jumpserver 那样,不用吝啬广告,把你们的名字搞上去。

  2. 工单名称不支持中文:
    image
    说明:没有明白这个需求,工单名称不是为了更好的描述该工单的用途吗?为啥不能使用中文,而且就算不使用中文,为啥不允许空格呢?全英文通过各种符号连接单词感觉更奇怪。

  3. sql 框建议加入 sql 美化功能,便与更好的查看。

期望在工单列表界面增加sql语句的执行状态

sqle-main_b6d4d6579df07d51145097eaf867
Describe
每次对一个工单审核通过上线之后都无法在工单列表中看到对应的sql语句执行是否成功,都要点击工单查看具体的sql执行情况
image

Suggestion
希望在工单列表中可以增加一个sql执行情况的字段,例如sql执行率。如果是一个sql语句执行完成对应的是100%,如果是0%就代表执行失败,再进入到工单内查看具体报错信息。如果是3个sql语句执行通过2个,只有一个sql执行失败,按百分比进行计算,展示执行率33.3%。

Why
对工单上线之后可以快速获悉sql执行情况

创建审核计划弹窗描述错误

SQLe Version
main

Describe the bug
创建审核计划后弹窗出现的提示信息有错别字
image

Expected behavior
到审核计划列表查看刚刚添加的审核计划

Could not automatically backport #84

Exception occurred when trying to cherry-pick PR #84.
Please cherry-pick it manually.

Traceback (most recent call last):
  File "/action/helpers.py", line 17, in git
    command_run = subprocess.run(["git", *args], stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True)
  File "/usr/local/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['git', 'cherry-pick', 'c6900f7edce50a4a2ef4f1c34ccc62fb6b64a512']' returned non-zero exit status 128.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/action/main.py", line 30, in backport_commits
    git("cherry-pick", commit_hash)
  File "/action/helpers.py", line 26, in git
    raise GitException(output)
helpers.GitException: fatal: bad object c6900f7edce50a4a2ef4f1c34ccc62fb6b64a512


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/action/main.py", line 69, in <module>
    entrypoint(
  File "/action/main.py", line 47, in entrypoint
    new_branch = backport_commits(commits_to_backport, base_branch, pr_branch)
  File "/action/main.py", line 33, in backport_commits
    raise RuntimeError("Could not cherry pick at least one commit automatically.")
RuntimeError: Could not cherry pick at least one commit automatically.

部门结构和权限管理

1:支持导入钉钉、企业微信的部门组织结构和人员信息
2:支持跨部门实例访问的权限申请,如:A部门的员工甲想要访问B部门的某个实例。

在ldap上删除的用户,sqle再次登录,提示的报错信息希望在明确一点

SQLe Version
Version:"release-1.2111.x 382da4a"

Describe the bug
ldap类型的用户已经在sqle生成了,然后在ldap把这个用户删除,再次使用这个用户登录sqle,报错信息不是很明确有点看不明白

To Reproduce
Steps to reproduce the behavior:

  1. 一个ldap的用户已经在sqle平台生成的用户
  2. 在ldap上删除这个用户
  3. 回到sqle上,然后继续使用这个用户登录,给出报错提示
    image

Expected behavior
期望是给到已经在ldap查询过了,该用户不存在这样的报错

support multi-params configuration of rule

背景

  1. #55 中需要新增 3 个配置,层级不同,无法通过 3 条规则友好的表示
  2. 当前规则只支持配置 1 个规则值,无法支持复杂规则的自定义
  3. 当前规则值以字符串的形式展示,用户在修改规则值时,缺少类型限制(用户可能在规则值中填写任何值)

Could not automatically backport #68

Exception occurred when trying to cherry-pick PR #68.
Please cherry-pick it manually.

Traceback (most recent call last):
  File "/action/helpers.py", line 17, in git
    command_run = subprocess.run(["git", *args], stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True)
  File "/usr/local/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['git', 'cherry-pick', '792572135fae2b37fc6568c012b91fefea27b340']' returned non-zero exit status 128.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/action/main.py", line 30, in backport_commits
    git("cherry-pick", commit_hash)
  File "/action/helpers.py", line 26, in git
    raise GitException(output)
helpers.GitException: fatal: bad object 792572135fae2b37fc6568c012b91fefea27b340


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/action/main.py", line 69, in <module>
    entrypoint(
  File "/action/main.py", line 47, in entrypoint
    new_branch = backport_commits(commits_to_backport, base_branch, pr_branch)
  File "/action/main.py", line 33, in backport_commits
    raise RuntimeError("Could not cherry pick at least one commit automatically.")
RuntimeError: Could not cherry pick at least one commit automatically.

postgresql plugin是否支持online ddl功能

因为当前做pgsql ddl会存在锁的问题,每次做都加lock_timeout不是太靠谱,过亿数据通常都要设置大于120s,但此时程序锁执行的sql都被blocked,想咨询当前是否支持,若不支持是否有排期支持

check instance connectable behavior different when driver is build by pkg/driver package

SQLe Version
main a87c83d

Describe the bug
check instance connectable behavior different between pg plugin and oracle plugin

To Reproduce
Steps to reproduce the behavior:

  1. use oracle plugin
  2. fill the instance info with wrong password
  3. check connectable
  4. See: a. HTTP code 500 with Internal Server Error; b. connect success on UI

Expected behavior
a. HTTP code 200 with custom API result
b. connect failed on UI

Suggestion
nil

审核规则数据库对象命名只能使用英文、下划线或数字,首字母必须是英文未触发

SQLe Version
"main-ee 2ba85ea"

Describe the bug
审核规则数据库对象命名只能使用英文、下划线或数字,首字母必须是英文未触发

To Reproduce
Steps to reproduce the behavior:

  1. mysql默认审核模版中开启所有的审核规则
  2. 创建一个工单,选择数据源,该数据源已经绑定了审核模版
  3. 输入create databaset 1test;然后点击审核,未触发数据库对象命名首字符必须为英文提示

Expected behavior
期望给予相应的提示

Suggestion
Add any other context about the problem here.

角色删除后,该角色绑定的用户还能访问绑定的数据源

SQLe Version
main

Describe the bug
角色删除后,该角色绑定的用户还能访问绑定的数据源

To Reproduce

  1. 创建用户1;
  2. 创建数据源1;
  3. 创建角色绑定用户1,数据源1;
  4. 用户1可以对数据源1创建工单;
  5. 删除角色1
  6. 用户1依然能对数据源1创建工单

Expected behavior
用户1无法访问数据源1

期望可以在当前页面看到完整的添加白名单的操作框

Describe
sqle-main_a71e9bcd6c411c13ed7167677095
在白名单页面,打开添加白名单操作框,无法完全展示,需要手动调整,第一张图是14寸笔记本电脑屏幕,第二张图是21寸外接显示屏屏幕
image
image

Suggestion
希望添加白名单的操作框可以完全进行展示

Why
能在当前页面完整的看到添加白名单的操作框

refactor MySQL audit rules to increase usability

背景:

现有的规则中,部分规则使用固定的数值,例如 “普通索引必须要以"idx_"为前缀”,无法通过配置 value 改变“idx_“的数值,导致该规则无法通用,对于不同的公司这个规则可能不一样,有的公司可能是其他前缀。

整改方向

“普通索引必须要以"idx_"为前缀” 改为 “普通索引必须使用固定前缀”,对于value默认为 “idx_”

审核计划创建成功之后还在当前进行编辑,提示信息有误

SQLe Version
sqle-main_f1d3ea532e1d2762f0a351c8c775

Describe the bug
审核计划创建界面填写好信息点击创建,然后再次修改,提示信息有误

To Reproduce
Steps to reproduce the behavior:

  1. 在审核计划界面创建一个审核计划
    image
    2.点击提交,然后创建审核计划成功
    image
    3.dian点击关闭,然后修改该审核计划的执行周期,然后进行提交
    image
    image

Expected behavior
该审核计划在第一步的时候已经创建了,后续还在这个界面进行编辑理论上又是一次新的创建审核计划的动作,但是应该提示该审核计划已经存在,而不是提示审核计划不存在。

Suggestion
Add any other context about the problem here.

scanner服务启动失败

SQLe Version
sqle-main_6ecfd2b39eee16350bd52ea07633

Describe the bug
The sqle-scanner service cannot be started

To Reproduce
Steps to reproduce the behavior:

  1. 在sqle平台上添加一个数据源
  2. 然后登录该数据源对应的数据库,开启慢日志
  3. 使用select sleep(20)语句生成慢日志
  4. 然后启动scanner 慢日志服务,但是失败返回错误信息
    root@1a479f60fae6:/opt# ./scannerd slowquery -H 10.186.62.92 -N test -P 3326 -A eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcG4iOiJ0ZXN0IiwiZXhwIjoxNjY0NDIwNDY1LCJuYW1lIjoiYWRtaW4ifQ.h5p4afWXHPAiUsBrFcAjSeCKK2hWw-0o1NTo9zoWDTk --log-file /var/lib/mysql/1a479f60fae6-slow.log
    INFO[0000] scanner started...
    failed to upload sql: Post “http://10.186.62.92:3326/v1/audit_plans/test/sqls/partial”: net/http: HTTP/1.x transport connection broken: malformed HTTP response “J\x00\x00\x00"

Expected behavior
期望scanner的慢日志功能可以正常启动

Suggestion
Add any other context about the problem here.

审核计划被删除之后再次使用该审核计划名创建成功之后还可以看到之前的收集的sql

SQLe Version
sqle-main_f1d3ea532e1d2762f0a351c8c775

Describe the bug
当一个存在收集的sql语句的审核计划被删除之后,再次创建新的审核计划使用它的名字可以看到之前的sql

To Reproduce
Steps to reproduce the behavior:
1.找到一个存在sql信息的审核计划
image
2.把该审核计划给删除
image
image
3.使用刚刚删除的审核计划名再次创建新的审核计划
image
4.然后点击该审核计划可以看到之前删除审核计划内收集的sql语句
Uploading image.png…

Expected behavior
期望创建新的审核计划不会展示之前的审核计划内收集的sql信息

Suggestion
Add any other context about the problem here.

编辑规则的页面弹窗展示有误

SQLe Version
main f1d3ea5

Describe the bug

To Reproduce

  1. 打开规则模板管理,创建规则
  2. 填写完基本信息,编辑任意一条规则
  3. 编辑规则页面弹窗展示有误
    image

Expected behavior
希望信息带有mysql的那行能正常展示

Suggestion

支持姓名填写,并在工单以姓名显示

  1. 现在用户管理用户名不支持中文,且无法设置姓名,后续过程中也只是以用户名显示,希望可以用姓名来代替用户名的显示在工单流转过程中。

  2. 希望支持手机号码填写功能

Add more code check rule

目前使用的规则不明确目的,且规则偏少

使用 golangci-lint 做静态代码检查。需要启用的 linter 参考: SQLE confluence space(pageid = 32066003).

子任务跟踪:

  • #112
  • makefile add docker_lint #161
  • golangci-lint enables errcheck and fixes the problems found #136
  • golangci-lint enables durationcheck and fixes the problems found #145
  • golangci-lint enables nilerr and fixes the problems found #146
  • golangci-lint enables rowserrcheck and fixes the problems found #149
  • golangci-lint enables staticcheck and fixes the problems found #151
  • golangci-lint enables forcetypeassert and fixes the problems found #153
  • golangci-lint enables prealloc and fixes the problems found #154
  • golangci-lint enables deadcode and fixes the problems found #155
  • golangci-lint enables gosimple and fixes the problems found #156
  • golangci-lint enables unconvert and fixes the problems found #160
  • golangci-lint enables errname and fixes the problems found #159
  • golangci-lint enables dupl and fixes the problems found #162
  • complete execution and problem solving after single task is solved #170

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.