codebee 0.1.57 → 0.1.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -70,13 +70,17 @@ def scan_text(text, max_findings=12):
70
70
  def risk_label(findings):
71
71
  """发现列表 → 风险标签(装前提示行用)。
72
72
 
73
- 高危(代码执行/敏感文件/可疑意图)任一命中 = 高风险;否则有发现 = 注意;
74
- 空 = 干净。"""
73
+ 三级:高危(代码执行/敏感文件/可疑意图/数据外发/base64 解码)任一
74
+ 命中 = 高风险;中危类(网络请求/环境读取/提示注入/越权人格)≥2 类
75
+ 同时命中 = 中风险;有发现 = 注意;空 = 干净。"""
75
76
  if not findings:
76
77
  return ""
77
78
  cats = {f["category"] for f in findings}
78
79
  if cats & {"代码执行", "敏感文件", "可疑意图", "数据外发"}:
79
80
  return "⚠ 高风险"
81
+ medium_cats = cats & {"网络请求", "环境读取", "提示注入", "越权人格"}
82
+ if len(medium_cats) >= 2:
83
+ return "⚠ 中风险"
80
84
  return "△ 注意"
81
85
 
82
86