{"uuid": "71ae7d0b-70f9-4bb6-8ce7-e94ecbd41d31", "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/3e72b3c9227027b891536a54bffaac83", "content": "diff --git a/README.md b/README.md\nindex 57102d1..4698ff1 100644\n--- a/README.md\n+++ b/README.md\n@@ -163,6 +163,7 @@ Vuls has some options to detect the vulnerabilities\n   - Vuls works well with Continuous Integration since tests can be run every day. This allows you to find vulnerabilities very quickly.\n - Auto-generation of configuration file template\n   - Auto-detection of servers set using CIDR, generate configuration file template\n+  - See `config.toml.example` in the repository for a synthetic placeholder configuration with KEVs support.\n - Email and Slack notification is possible (supports Japanese language)\n - Scan result is viewable on accessory software, TUI Viewer in a terminal or Web UI ([VulsRepo](https://github.com/ishiDACo/vulsrepo)).\n \ndiff --git a/config.toml.example b/config.toml.example\nnew file mode 100644\nindex 0000000..7a67843\n--- /dev/null\n+++ b/config.toml.example\n@@ -0,0 +1,37 @@\n+[default]\n+# This is a synthetic redacted example configuration for Vuls with KEV reporting enabled\n+# Only placeholder values are used in this configuration.\n+\n+cveDict = { type = \"sqlite3\", SQLite3Path = \"/path/to/cve.sqlite3\" }\n+ovalDict = { type = \"sqlite3\", SQLite3Path = \"/path/to/oval.sqlite3\" }\n+gostDict = { type = \"sqlite3\", SQLite3Path = \"/path/to/gost.sqlite3\" }\n+exploitDict = { type = \"sqlite3\", SQLite3Path = \"/path/to/go-exploitdb.sqlite3\" }\n+msfDict = { type = \"sqlite3\", SQLite3Path = \"/path/to/go-msfdb.sqlite3\" }\n+kevDict = { type = \"sqlite3\", SQLite3Path = \"/path/to/go-kev.sqlite3\" } # Enable KEV data here\n+\n+[servers]\n+\n+[servers.example-host]\n+host = \"192.168.0.1\"\n+port = \"22\"\n+user = \"vuls\"\n+sshConfigPath = \"/home/vuls/.ssh/config\"\n+keyPath = \"/home/vuls/.ssh/id_rsa\"\n+# passphrase = \"PLACEHOLDER_PASSPHRASE\" # Redacted\n+\n+[slack]\n+hookURL = \"https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX\" # Redacted\n+channel = \"#vuls\"\n+authUser = \"vuls-bot\"\n+\n+[chatwork]\n+apiToken = \"PLACEHOLDER_CHATWORK_TOKEN\" # Redacted\n+room = \"12345678\"\n+\n+[email]\n+smtpServer = \"smtp.example.com\"\n+smtpPort = \"587\"\n+user = \"alert@example.com\"\n+# password = \"PLACEHOLDER_SMTP_PASSWORD\" # Redacted\n+from = \"vuls@example.com\"\n+to = [\"admin@example.com\"]\ndiff --git a/detector/kevuln.go b/detector/kevuln.go\nindex 41afdfe..c78b3f0 100644\n--- a/detector/kevuln.go\n+++ b/detector/kevuln.go\n@@ -79,18 +79,26 @@ func FillWithKEVuln(r *models.ScanResult, cnf config.KEVulnConf, logOpts logging\n \t\t\t\treturn err\n \t\t\t}\n \n-\t\t\talerts := []models.Alert{}\n-\t\t\tif len(kevulns) &gt; 0 {\n-\t\t\t\talerts = append(alerts, models.Alert{\n-\t\t\t\t\tTitle: \"Known Exploited Vulnerabilities Catalog\",\n-\t\t\t\t\tURL:   \"https://www.cisa.gov/known-exploited-vulnerabilities-catalog\",\n-\t\t\t\t\tTeam:  \"cisa\",\n-\t\t\t\t})\n-\t\t\t}\n-\n \t\t\tv, ok := r.ScannedCves[res.request.cveID]\n \t\t\tif ok {\n-\t\t\t\tv.AlertDict.CISA = alerts\n+\t\t\t\tvar dueDate *time.Time\n+\t\t\t\tif !kevulns[0].DueDate.IsZero() {\n+\t\t\t\t\tdueDate = &amp;kevulns[0].DueDate\n+\t\t\t\t}\n+\t\t\t\tv.KEVs = append(v.KEVs, models.KEV{\n+\t\t\t\t\tType:                       models.CISAKEVType,\n+\t\t\t\t\tVendorProject:              kevulns[0].VendorProject,\n+\t\t\t\t\tProduct:                    kevulns[0].Product,\n+\t\t\t\t\tVulnerabilityName:          kevulns[0].VulnerabilityName,\n+\t\t\t\t\tShortDescription:           kevulns[0].ShortDescription,\n+\t\t\t\t\tRequiredAction:             kevulns[0].RequiredAction,\n+\t\t\t\t\tKnownRansomwareCampaignUse: kevulns[0].KnownRansomwareCampaignUse,\n+\t\t\t\t\tDateAdded:                  kevulns[0].DateAdded,\n+\t\t\t\t\tDueDate:                    dueDate,\n+\t\t\t\t\tCISA: &amp;models.CISAKEV{\n+\t\t\t\t\t\tNote: kevulns[0].Notes,\n+\t\t\t\t\t},\n+\t\t\t\t})\n \t\t\t\tnKEV++\n \t\t\t}\n \t\t\tr.ScannedCves[res.request.cveID] = v\n@@ -108,16 +116,24 @@ func FillWithKEVuln(r *models.ScanResult, cnf config.KEVulnConf, logOpts logging\n \t\t\t\tcontinue\n \t\t\t}\n \n-\t\t\talerts := []models.Alert{}\n-\t\t\tif len(kevulns) &gt; 0 {\n-\t\t\t\talerts = append(alerts, models.Alert{\n-\t\t\t\t\tTitle: \"Known Exploited Vulnerabilities Catalog\",\n-\t\t\t\t\tURL:   \"https://www.cisa.gov/known-exploited-vulnerabilities-catalog\",\n-\t\t\t\t\tTeam:  \"cisa\",\n-\t\t\t\t})\n+\t\t\tvar dueDate *time.Time\n+\t\t\tif !kevulns[0].DueDate.IsZero() {\n+\t\t\t\tdueDate = &amp;kevulns[0].DueDate\n \t\t\t}\n-\n-\t\t\tvuln.AlertDict.CISA = alerts\n+\t\t\tvuln.KEVs = append(vuln.KEVs, models.KEV{\n+\t\t\t\tType:                       models.CISAKEVType,\n+\t\t\t\tVendorProject:              kevulns[0].VendorProject,\n+\t\t\t\tProduct:                    kevulns[0].Product,\n+\t\t\t\tVulnerabilityName:          kevulns[0].VulnerabilityName,\n+\t\t\t\tShortDescription:           kevulns[0].ShortDescription,\n+\t\t\t\tRequiredAction:             kevulns[0].RequiredAction,\n+\t\t\t\tKnownRansomwareCampaignUse: kevulns[0].KnownRansomwareCampaignUse,\n+\t\t\t\tDateAdded:                  kevulns[0].DateAdded,\n+\t\t\t\tDueDate:                    dueDate,\n+\t\t\t\tCISA: &amp;models.CISAKEV{\n+\t\t\t\t\tNote: kevulns[0].Notes,\n+\t\t\t\t},\n+\t\t\t})\n \t\t\tnKEV++\n \t\t\tr.ScannedCves[cveID] = vuln\n \t\t}\ndiff --git a/docs/example-scan-result.json b/docs/example-scan-result.json\nnew file mode 100644\nindex 0000000..920deb4\n--- /dev/null\n+++ b/docs/example-scan-result.json\n@@ -0,0 +1,63 @@\n+{\n+  \"serverName\": \"example-host\",\n+  \"family\": \"ubuntu\",\n+  \"release\": \"20.04\",\n+  \"container\": {},\n+  \"platform\": {\n+    \"Name\": \"\"\n+  },\n+  \"scannedCves\": {\n+    \"CVE-0000-0000\": {\n+      \"cveID\": \"CVE-0000-0000\",\n+      \"confidences\": [\n+        {\n+          \"score\": 100,\n+          \"detectionMethod\": \"ChangelogExactMatch\"\n+        }\n+      ],\n+      \"affectedPackages\": [\n+        {\n+          \"name\": \"example-package\",\n+          \"notFixedYet\": false,\n+          \"fixedIn\": \"1.2.3-1\"\n+        }\n+      ],\n+      \"cveContents\": {\n+        \"nvd\": [\n+          {\n+            \"type\": \"nvd\",\n+            \"cveID\": \"CVE-0000-0000\",\n+            \"title\": \"Example Vulnerability\",\n+            \"summary\": \"This is an example vulnerability for demonstration purposes.\",\n+            \"cvss3Score\": 9.8,\n+            \"cvss3Vector\": \"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H\",\n+            \"cvss3Severity\": \"CRITICAL\"\n+          }\n+        ]\n+      },\n+      \"kevs\": [\n+        {\n+          \"type\": \"cisa\",\n+          \"vendorProject\": \"ExampleVendor\",\n+          \"product\": \"ExampleProduct\",\n+          \"vulnerabilityName\": \"Example Vulnerability\",\n+          \"shortDescription\": \"This is an example CISA KEV entry.\",\n+          \"requiredAction\": \"Apply updates per vendor instructions.\",\n+          \"knownRansomwareCampaignUse\": \"Unknown\",\n+          \"dateAdded\": \"2024-01-01T00:00:00Z\",\n+          \"cisa\": {\n+            \"note\": \"Example note.\"\n+          }\n+        },\n+        {\n+          \"type\": \"vulncheck\",\n+          \"vendorProject\": \"ExampleVendor\",\n+          \"product\": \"ExampleProduct\",\n+          \"vulnerabilityName\": \"Example Vulnerability\",\n+          \"shortDescription\": \"This is an example VulnCheck KEV entry.\",\n+          \"dateAdded\": \"2024-01-02T00:00:00Z\"\n+        }\n+      ]\n+    }\n+  }\n+}\ndiff --git a/models/scanresults.go b/models/scanresults.go\nindex 508b992..4d8b76b 100644\n--- a/models/scanresults.go\n+++ b/models/scanresults.go\n@@ -197,7 +197,7 @@ 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@@ -205,6 +205,7 @@ func (r ScanResult) FormatTextReportHeader() string {\n \t\tr.FormatExploitCveSummary(),\n \t\tr.FormatMetasploitCveSummary(),\n \t\tr.FormatAlertSummary(),\n+\t\tr.FormatKEVCveSummary(),\n \t\tpkgs)\n }\n \n@@ -251,15 +252,22 @@ func (r ScanResult) FormatMetasploitCveSummary() string {\n \treturn fmt.Sprintf(\"%d exploits\", nMetasploitCve)\n }\n \n+// FormatKEVCveSummary returns a summary of KEVs\n+func (r ScanResult) FormatKEVCveSummary() string {\n+\tkevCnt := 0\n+\tfor _, vuln := range r.ScannedCves {\n+\t\tif len(vuln.KEVs) &gt; 0 {\n+\t\t\tkevCnt++\n+\t\t}\n+\t}\n+\treturn fmt.Sprintf(\"%d kevs\", kevCnt)\n+}\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..46517f8\n--- /dev/null\n+++ b/models/scanresults_kev_test.go\n@@ -0,0 +1,95 @@\n+package models\n+\n+import (\n+\t\"reflect\"\n+\t\"testing\"\n+)\n+\n+func TestScanResult_FormatKEVCveSummary(t *testing.T) {\n+\ttests := []struct {\n+\t\tname string\n+\t\tr    ScanResult\n+\t\twant string\n+\t}{\n+\t\t{\n+\t\t\tname: \"no kevs\",\n+\t\t\tr: ScanResult{\n+\t\t\t\tScannedCves: VulnInfos{\n+\t\t\t\t\t\"CVE-1\": VulnInfo{},\n+\t\t\t\t},\n+\t\t\t},\n+\t\t\twant: \"0 kevs\",\n+\t\t},\n+\t\t{\n+\t\t\tname: \"some kevs\",\n+\t\t\tr: ScanResult{\n+\t\t\t\tScannedCves: VulnInfos{\n+\t\t\t\t\t\"CVE-1\": VulnInfo{\n+\t\t\t\t\t\tKEVs: []KEV{\n+\t\t\t\t\t\t\t{Type: CISAKEVType},\n+\t\t\t\t\t\t},\n+\t\t\t\t\t},\n+\t\t\t\t\t\"CVE-2\": VulnInfo{\n+\t\t\t\t\t\tKEVs: []KEV{\n+\t\t\t\t\t\t\t{Type: VulnCheckKEVType},\n+\t\t\t\t\t\t},\n+\t\t\t\t\t},\n+\t\t\t\t\t\"CVE-3\": VulnInfo{},\n+\t\t\t\t},\n+\t\t\t},\n+\t\t\twant: \"2 kevs\",\n+\t\t},\n+\t}\n+\tfor _, tt := range tests {\n+\t\tt.Run(tt.name, func(t *testing.T) {\n+\t\t\tif got := tt.r.FormatKEVCveSummary(); got != tt.want {\n+\t\t\t\tt.Errorf(\"ScanResult.FormatKEVCveSummary() = %v, want %v\", got, tt.want)\n+\t\t\t}\n+\t\t})\n+\t}\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 and VulnerabilityName\",\n+\t\t\tfields: ScanResult{\n+\t\t\t\tScannedCves: VulnInfos{\n+\t\t\t\t\t\"CVE-2014-3591\": VulnInfo{\n+\t\t\t\t\t\tKEVs: []KEV{\n+\t\t\t\t\t\t\t{Type: VulnCheckKEVType, VulnerabilityName: \"B\"},\n+\t\t\t\t\t\t\t{Type: CISAKEVType, VulnerabilityName: \"B\"},\n+\t\t\t\t\t\t\t{Type: VulnCheckKEVType, VulnerabilityName: \"A\"},\n+\t\t\t\t\t\t\t{Type: CISAKEVType, VulnerabilityName: \"A\"},\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-2014-3591\": VulnInfo{\n+\t\t\t\t\t\tKEVs: []KEV{\n+\t\t\t\t\t\t\t{Type: CISAKEVType, VulnerabilityName: \"A\"},\n+\t\t\t\t\t\t\t{Type: CISAKEVType, VulnerabilityName: \"B\"},\n+\t\t\t\t\t\t\t{Type: VulnCheckKEVType, VulnerabilityName: \"A\"},\n+\t\t\t\t\t\t\t{Type: VulnCheckKEVType, VulnerabilityName: \"B\"},\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 := 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..241cd4c 100644\n--- a/models/vulninfos.go\n+++ b/models/vulninfos.go\n@@ -268,6 +268,7 @@ type VulnInfo struct {\n \tMitigations          []Mitigation         `json:\"mitigations,omitempty\"`\n \tCtis                 []string             `json:\"ctis,omitempty\"`\n \tAlertDict            AlertDict            `json:\"alertDict,omitempty\"`\n+\tKEVs                 []KEV                `json:\"kevs,omitempty\"`\n \tCpeURIs              []string             `json:\"cpeURIs,omitempty\"` // CpeURIs related to this CVE defined in config.toml\n \tGitHubSecurityAlerts GitHubSecurityAlerts `json:\"gitHubSecurityAlerts,omitempty\"`\n \tWpPackageFixStats    WpPackageFixStats    `json:\"wpPackageFixStats,omitempty\"`\n@@ -910,24 +911,66 @@ type Mitigation struct {\n \tURL            string         `json:\"url,omitempty\"`\n }\n \n+// KEVType is the type of KEV\n+type KEVType string\n+\n+const (\n+\tCISAKEVType      KEVType = \"cisa\"\n+\tVulnCheckKEVType KEVType = \"vulncheck\"\n+)\n+\n+// KEV represents Known Exploited Vulnerabilities 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+type CISAKEV struct {\n+\tNote string `json:\"note,omitempty\"`\n+}\n+\n+type VulnCheckKEV struct {\n+\tXDB                  []VulnCheckXDB                  `json:\"xdb,omitempty\"`\n+\tReportedExploitation []VulnCheckReportedExploitation `json:\"reportedExploitation,omitempty\"`\n+}\n+\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+type VulnCheckReportedExploitation struct {\n+\tURL       string    `json:\"url,omitempty\"`\n+\tDateAdded time.Time `json:\"dateAdded,omitempty\"`\n+}\n+\n // AlertDict has target cve JPCERT, USCERT and CISA alert data\n type AlertDict struct {\n-\tCISA   []Alert `json:\"cisa\"`\n+\tCISA   []Alert `json:\"-\"`\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..5b8697f 100644\n--- a/reporter/util.go\n+++ b/reporter/util.go\n@@ -205,6 +205,7 @@ func formatOneLineSummary(rs ...models.ScanResult) string {\n \t\t\t\tr.FormatExploitCveSummary(),\n \t\t\t\tr.FormatMetasploitCveSummary(),\n \t\t\t\tr.FormatAlertSummary(),\n+\t\t\t\tr.FormatKEVCveSummary(),\n \t\t\t}\n \t\t} else {\n \t\t\tcols = []interface{}{\n@@ -565,10 +566,6 @@ 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\t}\n-\n \t\tfor _, alert := range vuln.AlertDict.JPCERT {\n \t\t\tdata = append(data, []string{\"JPCERT Alert\", alert.URL})\n \t\t}\ndiff --git a/test_kev.go b/test_kev.go\nnew file mode 100644\nindex 0000000..415dfba\n--- /dev/null\n+++ b/test_kev.go\n@@ -0,0 +1,15 @@\n+package main\n+\n+import (\n+\t\"fmt\"\n+\t\"reflect\"\n+\n+\tkevulnmodels \"github.com/vulsio/go-kev/models\"\n+)\n+\n+func main() {\n+\tt := reflect.TypeOf(kevulnmodels.KEVuln{})\n+\tfor i := 0; i &lt; t.NumField(); i++ {\n+\t\tfmt.Printf(\"Field: %s (%v)\\n\", t.Field(i).Name, t.Field(i).Type)\n+\t}\n+}\ndiff --git a/test_kev2.go b/test_kev2.go\nnew file mode 100644\nindex 0000000..e78b8d3\n--- /dev/null\n+++ b/test_kev2.go\n@@ -0,0 +1,42 @@\n+package main\n+\n+import (\n+\t\"fmt\"\n+\t\"go/ast\"\n+\t\"go/parser\"\n+\t\"go/token\"\n+\t\"os\"\n+\t\"path/filepath\"\n+)\n+\n+func main() {\n+\tgopath := os.Getenv(\"GOPATH\")\n+\tif gopath == \"\" {\n+\t\tgopath = \"/root/go\"\n+\t}\n+\terr := filepath.Walk(gopath+\"/pkg/mod/github.com/vulsio/go-kev@v0.1.4-0.20240318121733-b3386e67d3fb/models\", func(path string, info os.FileInfo, err error) error {\n+\t\tif err != nil {\n+\t\t\treturn err\n+\t\t}\n+\t\tif !info.IsDir() &amp;&amp; filepath.Ext(path) == \".go\" {\n+\t\t\tfset := token.NewFileSet()\n+\t\t\tf, err := parser.ParseFile(fset, path, nil, 0)\n+\t\t\tif err != nil {\n+\t\t\t\treturn err\n+\t\t\t}\n+\t\t\tfor _, decl := range f.Decls {\n+\t\t\t\tif gen, ok := decl.(*ast.GenDecl); ok &amp;&amp; gen.Tok == token.TYPE {\n+\t\t\t\t\tfor _, spec := range gen.Specs {\n+\t\t\t\t\t\tif typeSpec, ok := spec.(*ast.TypeSpec); ok {\n+\t\t\t\t\t\t\tfmt.Printf(\"Found Type: %s\\n\", typeSpec.Name.Name)\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\treturn nil\n+\t})\n+\tif err != nil {\n+\t\tfmt.Println(\"Error:\", err)\n+\t}\n+}\n", "creation_timestamp": "2026-07-03T15:14:59.115947Z"}