81 lines
2.5 KiB
YAML
81 lines
2.5 KiB
YAML
# serialization-schema-checker 内置默认配置
|
||
# 业务仓库通过 --config 指定的配置会与本文件深度合并(业务配置优先)。
|
||
|
||
# 总开关:false 时不执行检测、不发通知、流水线直接通过
|
||
enabled: true
|
||
|
||
# 运行模式:notify(仅通知)| block(检测到结构变更即阻断,exit 1)
|
||
mode: notify
|
||
|
||
# 是否扫描测试代码(第一版固定 false)
|
||
scan_test_sources: false
|
||
|
||
# 源码扫描根目录(相对被检测模块)
|
||
source_roots:
|
||
- "src/main/java"
|
||
|
||
# 通知配置
|
||
notify:
|
||
enabled: true
|
||
webhook_url: ""
|
||
notify_on_clean: false
|
||
title_prefix: "[序列化结构变更]"
|
||
|
||
# 忽略规则
|
||
ignore:
|
||
# 忽略的 key 模式(glob:* 单层,** 多层)
|
||
key_patterns:
|
||
- "*:lock"
|
||
- "*:lock:*"
|
||
- "*lock*"
|
||
- "loginCount:*"
|
||
- "Authorization:*"
|
||
# 忽略的文件路径模式
|
||
file_patterns:
|
||
- "**/test/**"
|
||
# 忽略的写入方法(类全名#方法名)
|
||
writer_methods: []
|
||
# 忽略的 MQ destination(topic 或 topic:tag,glob)
|
||
mq_destinations: []
|
||
|
||
# 检测规则
|
||
detection:
|
||
patterns:
|
||
- W01 # redisUtil.insert(key, JSON.toJSONString(x), ttl)
|
||
- W02 # redisTemplate.opsForValue().set(key, JSON.toJSONString(x), ...)
|
||
- W03 # stringRedisTemplate.opsForValue().set(key, JsonUtil.getObjectToString(x), ...)
|
||
- W04 # redisTemplate.opsForValue().set(key, obj, ...)
|
||
- W05 # redisTemplate.opsForHash().put(key, field, obj)
|
||
# MQ 生产侧投递检测(Phase M1 + M2)
|
||
mq_patterns:
|
||
- MQ01 # rocketMQTemplate.syncSend(dest, payload)
|
||
- MQ02 # asyncSend / syncSendOrderly / sendOneWay
|
||
- MQ03 # convertAndSend(dest, payload)
|
||
- MQ04 # MessageBuilder.withPayload / Message<T>
|
||
- MQ05 # 先 toJSONString 再 send String
|
||
- MQ-K01 # kafkaTemplate.send(topic, payload)
|
||
- MQ-K02 # kafkaTemplate.send(topic, key, payload)
|
||
- MQ-K03 # kafkaTemplate.send(ProducerRecord)
|
||
- MQ-K04 # 先 JSON 序列化为 String 再 send
|
||
# W06 读侧辅助:用 parseObject / getJsonToBean 等补强写入点 value 类型(非写入模式)
|
||
read_hints_enabled: true
|
||
# MQ-R 读侧补强(Listener / parseObject)
|
||
mq_read_hints_enabled: true
|
||
# 类型推断最低置信度,低于此值标记为低置信度提示
|
||
min_confidence: 0.6
|
||
# 字段展开最大深度(防止循环引用)
|
||
max_field_depth: 8
|
||
|
||
# 严重级别覆盖
|
||
severity_overrides: {}
|
||
|
||
# 人工补充映射
|
||
manual_mappings: []
|
||
|
||
# 抑制规则(已知误报)
|
||
suppressions: []
|
||
|
||
# 模块过滤(空表示全部模块)
|
||
include_modules: []
|
||
exclude_modules: []
|