Files
tamabox/templates/mail/security-alert.html
T
tamakyi e94c2b57ce 新增:安全告警邮件展示来源 IP 网络归属(CDN/云厂商/WAF)
- 新增 internal/security/ipinfo:基于 projectdiscovery/cdncheck v1.3.0
  (离线指纹、零外部请求)识别来源 IP 归属,识别失败折叠为展示标签,
  不中断告警链路
- autoban 告警回调注入归属识别;告警邮件新增「网络归属」行,
  命中 CDN/代理网络时提示「封禁可能无法拦截真实来源」
- 新增邮件模板渲染回归测试 internal/mail/mail_alert_test.go
- dev/s3stub:webp(cgo) 本地类型检查桩,替换 s3.go 做全模块编译验证,
  生产 Linux 构建不受影响;dev/overlay.json 指向该桩
- go mod tidy 顺带升级共享依赖(lipgloss/xid/testify 等),
  全模块类型检查与相关包测试通过
2026-09-08 13:25:20 +08:00

71 lines
4.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta name="format-detection" content="email=no"/>
<meta name="format-detection" content="date=no"/>
</head>
<body style="margin: 0; padding: 0;" bgcolor="#FFFFFF">
<table width="100%" height="100%" style="min-width: 348px;" border="0" cellspacing="0" cellpadding="0" lang="zh-CN">
<tbody>
<tr height="32" style="height: 32px;">
<td></td>
</tr>
<tr align="center">
<td>
<table border="0" cellspacing="0" cellpadding="0"
style="padding-bottom: 20px;max-width: 516px;min-width: 220px;">
<tbody>
<tr>
<td width="8" style="width: 8px;"></td>
<td>
<div style="border-style: solid; border-width: thin; border-color:#dadce0; border-radius: 8px; padding: 40px 20px;"
align="center">
<div style="font-family: 'Google Sans',Roboto,RobotoDraft,Helvetica,Arial,sans-serif;border-bottom: thin solid #dadce0; color: rgba(0,0,0,0.87); line-height: 32px; padding-bottom: 24px;text-align: center; word-break: break-word;">
<div style="font-size: 24px;">
检测到疑似批量扫描
</div>
<div style="font-size: 13px; color: rgba(0,0,0,0.54); margin-top: 6px;">
{{.time}}
</div>
</div>
<div style="font-family: Roboto-Regular,Helvetica,Arial,sans-serif; font-size: 14px; color: rgba(0,0,0,0.87); line-height: 22px; padding-top: 20px; text-align: left;">
<div style="padding: 12px 14px; border-radius: 6px; background-color: #fdecea; border: 1px solid #f5c6cb; margin-bottom: 14px;">
<div><b>来源 IP:</b>{{.ip}}</div>
<div style="margin-top: 4px;"><b>网络归属:</b>{{.provider}}</div>
<div style="margin-top: 4px;"><b>处置:</b>已自动临时封禁 <b>{{.duration}}</b> 分钟,到期自动解除</div>
{{if .proxy_hint}}
<div style="margin-top: 8px; font-size: 13px; color: #b71c1c;">⚠️ 该 IP 属于 CDN / 代理网络,攻击者可随时更换出口 IP,本次封禁可能无法拦截真实来源。</div>
{{end}}
</div>
<div style="font-size: 13px; color: rgba(0,0,0,0.54);">命中路径样本:</div>
<div style="font-family: monospace; font-size: 12px; color: #333; background-color: #f7f7f7; padding: 10px 12px; border-radius: 6px; margin-top: 6px; word-break: break-all;">
{{.paths}}
</div>
<div style="font-size: 12px; color: rgba(0,0,0,0.54); margin-top: 12px;">
该 IP 在统计窗口内频繁访问后台/敏感路径或产生大量 404,已自动加入临时封禁名单。如属误报,请检查服务器访问日志确认。
</div>
</div>
</div>
<div style="text-align: left;">
<div style="font-family: Roboto-Regular,Helvetica,Arial,sans-serif;color: rgba(0,0,0,0.54);font-size: 11px; line-height: 18px; padding-top: 12px; text-align: center;">
<div>
此邮件由系统自动发送,请勿直接回复。<br/>
{{ .year }} 狼的提问箱
</div>
</div>
</div>
</td>
<td width="8" style="width: 8px;"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr height="32" style="height: 32px;">
<td></td>
</tr>
</tbody>
</table>
</body>
</html>