From ae9e2ce5ef0e0b012944f5b6b07d8380090f7ce0 Mon Sep 17 00:00:00 2001 From: fan-tastic-z Date: Mon, 3 Jun 2024 19:50:46 +0800 Subject: [PATCH] refactor: update msg_template --- src/push/msg_template.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/push/msg_template.rs b/src/push/msg_template.rs index 161ae9e..69a50cc 100644 --- a/src/push/msg_template.rs +++ b/src/push/msg_template.rs @@ -8,9 +8,9 @@ const VULN_INFO_MSG_TEMPLATE: &str = r####" - CVE编号: {% if cve %} {{ cve }}{% else %}暂无 {% endif %} - 危害定级: **{{ severity }}** -- 漏洞标签: {% for tag in tags %}**{{ tag }}**{% endfor %} +- 漏洞标签: {{ tags | join(sep=" ") }} - 披露日期: **{{ disclosure }}** -- 推送原因: {% for v in reasons %}{{ v }}{% endfor %} +- 推送原因: {{ reasons | join(sep=" ") }} - 信息来源: [{{ from }}] {% if description %}### **漏洞描述** @@ -90,7 +90,7 @@ mod tests { #[test] fn test_reader_vulninfo() -> Result<()> { - let tags: Vec = Vec::new(); + let tags: Vec = vec!["有漏洞分析".to_string(), "有修复方案".to_string()]; let reasons: Vec = Vec::new(); let v = VulnInfo {