-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathconfig.yaml
More file actions
55 lines (47 loc) · 2.11 KB
/
config.yaml
File metadata and controls
55 lines (47 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# AIMergeBot 配置
# 监听端口,格式如 :8080
listen: ":8080" # 监听的 HTTP 服务端口
gitlab:
token: "xxxxxxxxxxxxxxxxxxxxx" # GitLab 访问 Token,需有项目读权限
url: "https://gitlab.com" # GitLab 实例地址,支持自建/私有
openai:
api_key: "sk-xxxxxxxxxxxxxxxxxxxxx" # OpenAI 或兼容大模型 API Key
url: "https://api.openai.com/v1" # OpenAI API 地址,可自定义
model: "gpt-4o-mini" # 使用的大模型名称
projects:
- id: 12345678 # GitLab 项目 ID(数字),可在项目设置页面底部查看
name: "group/project" # GitLab 项目名称(group/project 格式),仅用于展示
# 是否启用主动轮询模式(定时扫描所有 MR)
enable_polling: true
# 是否启用 Webhook 模式(推荐,实时响应 MR 事件)
enable_webhook: true
# 是否自动在 MR 下添加安全审查评论
enable_mr_comment: true
# 是否全量扫描历史 MR(true=全量,false=只扫新/增量 MR)
scan_existing_mrs: true # true=全量扫描,false=只扫增量MR
# 检测文件白名单,命中这些扩展名的文件将不进行检测
whitelist_extensions: ["txt", "md", "xlsx", "xls", "csv","zip"]
# MCP和ReAct配置
mcp:
# 是否启用MCP功能(核心代码搜索和分析工具)
enabled: true
# MCP工具模式选择
# "simplified" - 简化版(推荐,只保留通用工具,让模型自由发挥,避免预设偏见)
# "full" - 完整版(包含所有安全强相关工具,可能有预设偏见)
# 如需切换到完整版,将下面这行改为: mode: "full"
mode: "simplified" # 推荐使用简化模式,让模型基于代码逻辑自主判断
# 最大推理步骤数
max_steps: 15 # 增加步骤数以支持更深入的分析
# 是否启用详细日志
verbose_logging: true
react:
# 是否启用ReAct审计(替代传统AI分析)
enabled: true
# ReAct模型配置
model: "deepseek-chat"
# 温度参数(0.0-1.0)
temperature: 0.1
# 最大重试次数
max_retries: 3
# 最大推理步骤数
max_steps: 15