{"uuid": "9502ac19-1d59-4c6b-8f83-4d9ddeb5aac8", "vulnerability_lookup_origin": "1a89b78e-f703-45f3-bb86-59eb712668bd", "author": "9f56dd64-161d-43a6-b9c3-555944290a09", "vulnerability": "CVE-0000-0000", "type": "seen", "source": "https://gist.github.com/tu-trinh-scale/715187891d31dbc85c22921d3f7b0317", "content": "diff --git a/README.md b/README.md\nindex 57102d1..5262391 100644\n--- a/README.md\n+++ b/README.md\n@@ -93,6 +93,11 @@ Vuls is a tool created to solve the problems listed above. It has the following\n - CISA(Cybersecurity &amp; Infrastructure Security Agency)\n   - [Known Exploited Vulnerabilities Catalog](https://www.cisa.gov/known-exploited-vulnerabilities-catalog)\n \n+- VulnCheck\n+  - Known Exploited Vulnerabilities\n+\n+&gt; **Note**: To enable CISA and VulnCheck KEV reporting, see the [config.toml.example](config.toml.example) file for a complete sample configuration.\n+\n - Cyber Threat Intelligence(MITRE ATT&amp;CK and CAPEC)\n   - [mitre/cti](https://github.com/mitre/cti)\n \ndiff --git a/config.toml.example b/config.toml.example\nnew file mode 100644\nindex 0000000..adfac66\n--- /dev/null\n+++ b/config.toml.example\n@@ -0,0 +1,43 @@\n+[cveDict]\n+type = \"sqlite3\"\n+SQLite3Path = \"/path/to/cve.sqlite3\"\n+\n+[ovalDict]\n+type = \"sqlite3\"\n+SQLite3Path = \"/path/to/oval.sqlite3\"\n+\n+[gost]\n+type = \"sqlite3\"\n+SQLite3Path = \"/path/to/gost.sqlite3\"\n+\n+[kev]\n+# Enable KEV (Known Exploited Vulnerabilities) reporting\n+cisa = true\n+vulncheck = true\n+\n+[servers]\n+[servers.example-server]\n+host = \"192.168.1.100\" # Placeholder IP\n+port = \"22\"\n+user = \"vuls-user\"\n+sshConfigPath = \"/path/to/.ssh/config\"\n+keyPath = \"/path/to/.ssh/id_rsa\"\n+# SSH passphrase must be redacted/omitted or use a placeholder\n+# keyPassphrase = \"PLACEHOLDER_PASSPHRASE\"\n+\n+[email]\n+smtpServer = \"smtp.example.com\"\n+smtpPort = \"587\"\n+user = \"smtp-user\"\n+# password = \"PLACEHOLDER_SMTP_PASSWORD\"\n+from = \"vuls@example.com\"\n+to = [\"security-team@example.com\"]\n+\n+[slack]\n+hookURL = \"https://hooks.slack.com/services/PLACEHOLDER/WEBHOOK/URL\"\n+channel = \"#vuls-alerts\"\n+authUser = \"vuls-bot\"\n+\n+[chatwork]\n+apiToken = \"PLACEHOLDER_CHATWORK_TOKEN\"\n+room = \"123456\"\n\\ No newline at end of file\ndiff --git a/models/scanresults.go b/models/scanresults.go\nindex 508b992..c29c8e6 100644\n--- a/models/scanresults.go\n+++ b/models/scanresults.go\n@@ -197,17 +197,29 @@ func (r ScanResult) FormatTextReportHeader() string {\n \t\tpkgs = fmt.Sprintf(\"%s, %d libs\", pkgs, r.LibraryScanners.Total())\n \t}\n \n-\treturn fmt.Sprintf(\"%s\\n%s\\n%s\\n%s, %s, %s, %s\\n%s\\n\",\n+\treturn fmt.Sprintf(\"%s\\n%s\\n%s\\n%s, %s, %s, %s, %s\\n%s\\n\",\n \t\tr.ServerInfo(),\n \t\tbuf.String(),\n \t\tr.ScannedCves.FormatCveSummary(),\n \t\tr.ScannedCves.FormatFixedStatus(r.Packages),\n+\t\tr.FormatKEVCveSummary(),\n \t\tr.FormatExploitCveSummary(),\n \t\tr.FormatMetasploitCveSummary(),\n \t\tr.FormatAlertSummary(),\n \t\tpkgs)\n }\n \n+// FormatKEVCveSummary returns a summary of KEV cves\n+func (r ScanResult) FormatKEVCveSummary() string {\n+\tnKEVCve := 0\n+\tfor _, vuln := range r.ScannedCves {\n+\t\tif 0 &lt; len(vuln.KEVs) {\n+\t\t\tnKEVCve++\n+\t\t}\n+\t}\n+\treturn fmt.Sprintf(\"%d kevs\", nKEVCve)\n+}\n+\n // FormatUpdatablePkgsSummary returns a summary of updatable packages\n func (r ScanResult) FormatUpdatablePkgsSummary() string {\n \tmode := r.Config.Scan.Servers[r.ServerName].Mode\n@@ -253,13 +265,9 @@ func (r ScanResult) FormatMetasploitCveSummary() string {\n \n // FormatAlertSummary returns a summary of CERT alerts\n func (r ScanResult) FormatAlertSummary() string {\n-\tcisaCnt := 0\n \tuscertCnt := 0\n \tjpcertCnt := 0\n \tfor _, vuln := range r.ScannedCves {\n-\t\tif len(vuln.AlertDict.CISA) &gt; 0 {\n-\t\t\tcisaCnt += len(vuln.AlertDict.CISA)\n-\t\t}\n \t\tif len(vuln.AlertDict.USCERT) &gt; 0 {\n \t\t\tuscertCnt += len(vuln.AlertDict.USCERT)\n \t\t}\n@@ -267,7 +275,7 @@ func (r ScanResult) FormatAlertSummary() string {\n \t\t\tjpcertCnt += len(vuln.AlertDict.JPCERT)\n \t\t}\n \t}\n-\treturn fmt.Sprintf(\"cisa: %d, uscert: %d, jpcert: %d alerts\", cisaCnt, uscertCnt, jpcertCnt)\n+\treturn fmt.Sprintf(\"uscert: %d, jpcert: %d alerts\", uscertCnt, jpcertCnt)\n }\n \n func (r ScanResult) isDisplayUpdatableNum(mode config.ScanMode) bool {\n@@ -437,6 +445,12 @@ func (r *ScanResult) SortForJSONOutput() {\n \t\tsort.Slice(v.AlertDict.CISA, func(i, j int) bool {\n \t\t\treturn v.AlertDict.CISA[i].Title &lt; v.AlertDict.CISA[j].Title\n \t\t})\n+\t\tsort.Slice(v.KEVs, func(i, j int) bool {\n+\t\t\tif v.KEVs[i].Type != v.KEVs[j].Type {\n+\t\t\t\treturn v.KEVs[i].Type &lt; v.KEVs[j].Type\n+\t\t\t}\n+\t\t\treturn v.KEVs[i].VulnerabilityName &lt; v.KEVs[j].VulnerabilityName\n+\t\t})\n \t\tr.ScannedCves[k] = v\n \t}\n }\ndiff --git a/models/scanresults_kev_test.go b/models/scanresults_kev_test.go\nnew file mode 100644\nindex 0000000..e10605c\n--- /dev/null\n+++ b/models/scanresults_kev_test.go\n@@ -0,0 +1,51 @@\n+package models\n+\n+import (\n+\t\"reflect\"\n+\t\"testing\"\n+)\n+\n+func TestScanResult_Sort_KEV(t *testing.T) {\n+\ttests := []struct {\n+\t\tname     string\n+\t\tfields   ScanResult\n+\t\texpected ScanResult\n+\t}{\n+\t\t{\n+\t\t\tname: \"sort KEVs by Type then VulnerabilityName\",\n+\t\t\tfields: ScanResult{\n+\t\t\t\tScannedCves: VulnInfos{\n+\t\t\t\t\t\"CVE-2023-0001\": VulnInfo{\n+\t\t\t\t\t\tKEVs: []KEV{\n+\t\t\t\t\t\t\t{Type: VulnCheckKEVType, VulnerabilityName: \"B VulnCheck\"},\n+\t\t\t\t\t\t\t{Type: CISAKEVType, VulnerabilityName: \"Z CISA\"},\n+\t\t\t\t\t\t\t{Type: VulnCheckKEVType, VulnerabilityName: \"A VulnCheck\"},\n+\t\t\t\t\t\t\t{Type: CISAKEVType, VulnerabilityName: \"A CISA\"},\n+\t\t\t\t\t\t},\n+\t\t\t\t\t},\n+\t\t\t\t},\n+\t\t\t},\n+\t\t\texpected: ScanResult{\n+\t\t\t\tScannedCves: VulnInfos{\n+\t\t\t\t\t\"CVE-2023-0001\": VulnInfo{\n+\t\t\t\t\t\tKEVs: []KEV{\n+\t\t\t\t\t\t\t{Type: CISAKEVType, VulnerabilityName: \"A CISA\"},\n+\t\t\t\t\t\t\t{Type: CISAKEVType, VulnerabilityName: \"Z CISA\"},\n+\t\t\t\t\t\t\t{Type: VulnCheckKEVType, VulnerabilityName: \"A VulnCheck\"},\n+\t\t\t\t\t\t\t{Type: VulnCheckKEVType, VulnerabilityName: \"B VulnCheck\"},\n+\t\t\t\t\t\t},\n+\t\t\t\t\t},\n+\t\t\t\t},\n+\t\t\t},\n+\t\t},\n+\t}\n+\tfor _, tt := range tests {\n+\t\tt.Run(tt.name, func(t *testing.T) {\n+\t\t\tr := &amp;tt.fields\n+\t\t\tr.SortForJSONOutput()\n+\t\t\tif !reflect.DeepEqual(r.ScannedCves, tt.expected.ScannedCves) {\n+\t\t\t\tt.Errorf(\"act %+v, want %+v\", r.ScannedCves, tt.expected.ScannedCves)\n+\t\t\t}\n+\t\t})\n+\t}\n+}\ndiff --git a/models/vulninfos.go b/models/vulninfos.go\nindex 3e85e81..4c7b3a1 100644\n--- a/models/vulninfos.go\n+++ b/models/vulninfos.go\n@@ -275,6 +275,7 @@ type VulnInfo struct {\n \tWindowsKBFixedIns    []string             `json:\"windowsKBFixedIns,omitempty\"`\n \tVulnType             string               `json:\"vulnType,omitempty\"`\n \tDiffStatus           DiffStatus           `json:\"diffStatus,omitempty\"`\n+\tKEVs                 []KEV                `json:\"kevs,omitempty\"`\n }\n \n // Alert has CERT alert information\n@@ -882,6 +883,55 @@ func (p DistroAdvisory) Format() string {\n \treturn strings.Join(buf, \"\\n\")\n }\n \n+// KEVType represents the source of the Known Exploited Vulnerability data\n+type KEVType string\n+\n+const (\n+\tCISAKEVType      KEVType = \"cisa\"\n+\tVulnCheckKEVType KEVType = \"vulncheck\"\n+)\n+\n+// KEV has Known Exploited Vulnerability information\n+type KEV struct {\n+\tType                       KEVType        `json:\"type\"`\n+\tVendorProject              string         `json:\"vendorProject,omitempty\"`\n+\tProduct                    string         `json:\"product,omitempty\"`\n+\tVulnerabilityName          string         `json:\"vulnerabilityName,omitempty\"`\n+\tShortDescription           string         `json:\"shortDescription,omitempty\"`\n+\tRequiredAction             string         `json:\"requiredAction,omitempty\"`\n+\tKnownRansomwareCampaignUse string         `json:\"knownRansomwareCampaignUse,omitempty\"`\n+\tDateAdded                  time.Time      `json:\"dateAdded,omitempty\"`\n+\tDueDate                    *time.Time     `json:\"dueDate,omitempty\"`\n+\tCISA                       *CISAKEV       `json:\"cisa,omitempty\"`\n+\tVulnCheck                  *VulnCheckKEV  `json:\"vulncheck,omitempty\"`\n+}\n+\n+// CISAKEV has CISA specific KEV information\n+type CISAKEV struct {\n+\tNote string `json:\"note,omitempty\"`\n+}\n+\n+// VulnCheckKEV has VulnCheck specific KEV information\n+type VulnCheckKEV struct {\n+\tXDB                  []VulnCheckXDB                  `json:\"xdb,omitempty\"`\n+\tReportedExploitation []VulnCheckReportedExploitation `json:\"reportedExploitation,omitempty\"`\n+}\n+\n+// VulnCheckXDB has VulnCheck XDB information\n+type VulnCheckXDB struct {\n+\tXDBID       string    `json:\"xdbID,omitempty\"`\n+\tXDBURL      string    `json:\"xdbURL,omitempty\"`\n+\tDateAdded   time.Time `json:\"dateAdded,omitempty\"`\n+\tExploitType string    `json:\"exploitType,omitempty\"`\n+\tCloneSSHURL string    `json:\"cloneSSHURL,omitempty\"`\n+}\n+\n+// VulnCheckReportedExploitation has VulnCheck Reported Exploitation information\n+type VulnCheckReportedExploitation struct {\n+\tURL       string    `json:\"url,omitempty\"`\n+\tDateAdded time.Time `json:\"dateAdded,omitempty\"`\n+}\n+\n // Exploit :\n type Exploit struct {\n \tExploitType  exploitmodels.ExploitType `json:\"exploitType\"`\n@@ -910,24 +960,21 @@ type Mitigation struct {\n \tURL            string         `json:\"url,omitempty\"`\n }\n \n-// AlertDict has target cve JPCERT, USCERT and CISA alert data\n+// AlertDict has target cve JPCERT and USCERT alert data\n type AlertDict struct {\n-\tCISA   []Alert `json:\"cisa\"`\n+\tCISA   []Alert `json:\"cisa\"` // Retained for compatibility with tests\n \tJPCERT []Alert `json:\"jpcert\"`\n \tUSCERT []Alert `json:\"uscert\"`\n }\n \n // IsEmpty checks if the content of AlertDict is empty\n func (a AlertDict) IsEmpty() bool {\n-\treturn len(a.CISA) == 0 &amp;&amp; len(a.JPCERT) == 0 &amp;&amp; len(a.USCERT) == 0\n+\treturn len(a.JPCERT) == 0 &amp;&amp; len(a.USCERT) == 0\n }\n \n // FormatSource returns which source has this alert\n func (a AlertDict) FormatSource() string {\n \tvar s []string\n-\tif len(a.CISA) != 0 {\n-\t\ts = append(s, \"CISA\")\n-\t}\n \tif len(a.USCERT) != 0 || len(a.JPCERT) != 0 {\n \t\ts = append(s, \"CERT\")\n \t}\ndiff --git a/reporter/util.go b/reporter/util.go\nindex d9cfdaa..460b5dd 100644\n--- a/reporter/util.go\n+++ b/reporter/util.go\n@@ -202,6 +202,7 @@ func formatOneLineSummary(rs ...models.ScanResult) string {\n \t\t\t\tr.ScannedCves.FormatCveSummary(),\n \t\t\t\tr.ScannedCves.FormatFixedStatus(r.Packages),\n \t\t\t\tr.FormatUpdatablePkgsSummary(),\n+\t\t\t\tr.FormatKEVCveSummary(),\n \t\t\t\tr.FormatExploitCveSummary(),\n \t\t\t\tr.FormatMetasploitCveSummary(),\n \t\t\t\tr.FormatAlertSummary(),\n@@ -565,8 +566,12 @@ No CVE-IDs are found in updatable packages.\n \t\t})\n \t\tdata = append(data, ds...)\n \n-\t\tfor _, alert := range vuln.AlertDict.CISA {\n-\t\t\tdata = append(data, []string{\"CISA Alert\", alert.URL})\n+\t\tfor _, kev := range vuln.KEVs {\n+\t\t\tif kev.Type == models.CISAKEVType &amp;&amp; kev.CISA != nil {\n+\t\t\t\tdata = append(data, []string{\"CISA KEV\", fmt.Sprintf(\"%s (Action: %s, Due: %s)\", kev.VulnerabilityName, kev.RequiredAction, kev.DueDate.Format(\"2006-01-02\"))})\n+\t\t\t} else if kev.Type == models.VulnCheckKEVType &amp;&amp; kev.VulnCheck != nil {\n+\t\t\t\tdata = append(data, []string{\"VulnCheck KEV\", kev.VulnerabilityName})\n+\t\t\t}\n \t\t}\n \n \t\tfor _, alert := range vuln.AlertDict.JPCERT {\ndiff --git a/sample_kev_scan.json b/sample_kev_scan.json\nnew file mode 100644\nindex 0000000..4e765d0\n--- /dev/null\n+++ b/sample_kev_scan.json\n@@ -0,0 +1,38 @@\n+{\n+  \"jsonVersion\": 1,\n+  \"lang\": \"en\",\n+  \"serverUUID\": \"00000000-0000-0000-0000-000000000000\",\n+  \"serverName\": \"example-host\",\n+  \"family\": \"ubuntu\",\n+  \"release\": \"20.04\",\n+  \"scannedAt\": \"2026-07-03T12:00:00Z\",\n+  \"scannedCves\": {\n+    \"CVE-0000-0000\": {\n+      \"cveID\": \"CVE-0000-0000\",\n+      \"kevs\": [\n+        {\n+          \"type\": \"cisa\",\n+          \"vulnerabilityName\": \"Example KEV Vulnerability\",\n+          \"shortDescription\": \"A synthetic example of a known exploited vulnerability.\",\n+          \"requiredAction\": \"Apply updates per vendor instructions.\",\n+          \"dueDate\": \"2026-08-01T00:00:00Z\",\n+          \"cisa\": {\n+            \"note\": \"This is a placeholder CISA note.\"\n+          }\n+        },\n+        {\n+          \"type\": \"vulncheck\",\n+          \"vulnerabilityName\": \"Example KEV Vulnerability\",\n+          \"vulncheck\": {\n+            \"reportedExploitation\": [\n+              {\n+                \"url\": \"https://example.com/report/1\",\n+                \"dateAdded\": \"2026-07-01T00:00:00Z\"\n+              }\n+            ]\n+          }\n+        }\n+      ]\n+    }\n+  }\n+}\n", "creation_timestamp": "2026-07-03T15:14:58.960107Z"}