Skip to content

v2.1.25

Latest

Choose a tag to compare

@madneal madneal released this 23 Aug 01:25
· 6 commits to master since this release
965f747

变更说明

  • 新增规则级本地上下文匹配。GitHub 和 Sourcegraph 仍使用 content 发现候选结果,并可通过可选的 matchPattern(Go/RE2 正则)在结果入库前校验代码片段,减少宽泛关键词带来的误报。
  • 规则管理页面和 CSV 导入模板增加“本地匹配正则”字段;空值保持原有扫描行为,无效正则会停止该规则本轮扫描并记录错误。
  • 修复系统配置保存后运行时配置未同步刷新的问题,配置更新成功后立即对当前进程生效。
  • 已验证相关 Go 服务、GitHub/Sourcegraph 扫描包及前端生产构建。
  • SQL / 数据库结构影响:无 SQL 文件;rule 表新增 match_pattern VARCHAR(200) 字段,由项目现有 GORM AutoMigrate 在启动时自动创建,已有部署无需手工执行 SQL 升级语句。

关联 PR:#351#353

What's Changed

  • Added rule-level local context matching. GitHub and Sourcegraph continue to use content for candidate discovery and can optionally apply a Go/RE2 matchPattern to returned code fragments before persistence, reducing false positives from broad searches.
  • Added the local match regex field to the rule management page and CSV import template. An empty value preserves existing behavior, while an invalid expression stops that rule for the current scan and records an error.
  • Fixed runtime configuration refresh after system settings are saved, so successful updates take effect in the current process immediately.
  • Verified the affected Go service and GitHub/Sourcegraph scanner packages, plus the frontend production build.
  • SQL/database impact: no SQL files are included. The rule table gains a match_pattern VARCHAR(200) column through the existing GORM AutoMigrate startup path, so existing deployments do not need to run a manual SQL migration.

Related PRs: #351, #353

完整变更 / Full Changelog: v2.1.24...v2.1.25