feat!(detector): replace go-exploitdb with vuls2#2517
Merged
Conversation
19392c0 to
7b74ee9
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates exploit enrichment from the legacy go-exploitdb integration to the vuls2 EnrichVulnInfos pipeline, fully removing the go-exploitdb dependency and related runtime/config behaviors.
Changes:
- Add exploit-source enrichment (ExploitDB/GitHub/InTheWild/Trickest + Nuclei repository) to the vuls2 vendor enrichment path and source allowlist.
- Replace
models.Exploit.ExploitTypedependency on go-exploitdb types with a nativemodels.ExploitTypestring type + constants. - Remove old exploitdb enrichment flow (
FillWithExploitcall sites, exploitdb client implementation/tests) and update module dependencies/fixtures accordingly.
Reviewed changes
Copilot reviewed 23 out of 24 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| server/server.go | Removes legacy exploitdb enrichment from server-mode request handling. |
| models/vulninfos.go | Introduces native ExploitType type/constants and updates Exploit model field type. |
| models/utils.go | Switches NVD exploit tagging to use the new ExploitTypeNVD constant. |
| go.mod | Drops github.com/vulsio/go-exploitdb and bumps several dependencies. |
| go.sum | Updates dependency checksums in line with go.mod changes. |
| detector/vuls2/vuls2.go | Expands vuls2 enrichment query allowlist to include exploit + nuclei sources. |
| detector/vuls2/vuls2_test.go | Adds enrichment tests for exploit-* and nuclei-repository sources. |
| detector/vuls2/vendor.go | Adds enrichExploits() and wires it into enrichVulnerabilities(). |
| detector/vuls2/vendor_test.go | New unit tests for enrichExploits() source-to-model conversion. |
| detector/vuls2/testdata/fixtures/enrich/nuclei-repository/datasource.json | Adds fixture datasource metadata for nuclei repository. |
| detector/vuls2/testdata/fixtures/enrich/nuclei-repository/data/2017/CVE-2017-18565.json | Adds nuclei exploit fixture with verified=true. |
| detector/vuls2/testdata/fixtures/enrich/nuclei-repository/data/2017/CVE-2017-14535.json | Adds nuclei exploit fixture without verified field. |
| detector/vuls2/testdata/fixtures/enrich/exploit-trickest/datasource.json | Adds fixture datasource metadata for trickest source. |
| detector/vuls2/testdata/fixtures/enrich/exploit-trickest/data/2017/CVE-2017-7273.json | Adds trickest exploit fixture data. |
| detector/vuls2/testdata/fixtures/enrich/exploit-inthewild/datasource.json | Adds fixture datasource metadata for inthewild source. |
| detector/vuls2/testdata/fixtures/enrich/exploit-inthewild/data/2017/CVE-2017-16885.json | Adds inthewild exploit fixture data. |
| detector/vuls2/testdata/fixtures/enrich/exploit-github/datasource.json | Adds fixture datasource metadata for github PoC source. |
| detector/vuls2/testdata/fixtures/enrich/exploit-github/data/2017/CVE-2017-9779.json | Adds github exploit fixture data. |
| detector/vuls2/testdata/fixtures/enrich/exploit-exploitdb/datasource.json | Adds fixture datasource metadata for exploit-db source. |
| detector/vuls2/testdata/fixtures/enrich/exploit-exploitdb/data/2017/CVE-2017-3132.json | Adds exploit-db exploit fixture data. |
| detector/util.go | Removes exploitdb DB validation/close logic from ValidateDBs(). |
| detector/detector.go | Removes legacy exploitdb enrichment from the main detect flow. |
| detector/exploitdb.go | Deletes legacy go-exploitdb integration (client + HTTP fetch path). |
| detector/exploitdb_test.go | Deletes tests tied to the removed go-exploitdb conversion logic. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
06ebc6e to
d743a52
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 29 out of 30 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Remove the go-exploitdb dependency entirely and migrate exploit enrichment to vuls2 EnrichVulnInfos pipeline. Changes: - Define models.ExploitType as a native string type with constants (exploitdb, github, inthewild, trickest, nvd) - Add enrichExploits() to enrichVulnerabilities() in vuls2/vendor.go to handle ExploitExploitDB/GitHub/InTheWild/Trickest sources - Remove FillWithExploit() calls from detector.go and server.go - Delete detector/exploitdb.go and detector/exploitdb_test.go - Remove go-exploitdb from go.mod BREAKING CHANGE: The --exploitdb-* CLI flags and [exploit] TOML config section no longer have any effect. Exploit data is now sourced exclusively from the vuls2 database. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
f9163e3 to
e095a2c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If this Pull Request is work in progress, Add a prefix of "[WIP]" in the title.
What did you implement:
Remove the go-exploitdb dependency entirely and migrate exploit enrichment to vuls2 EnrichVulnInfos pipeline.
Changes:
models.ExploitTypeas a native string type with constants matching go-exploitdb values:ExploitTypeExploitDB = "OffensiveSecurity"ExploitTypeGitHub = "GitHub"ExploitTypeInTheWild = "InTheWild"ExploitTypeTrickest = "Trickest"ExploitTypeNuclei = "Nuclei"ExploitTypeNVD = "nvd"enrichExploits()toenrichVulnerabilities()invuls2/vendor.goto handle ExploitExploitDB/GitHub/InTheWild/Trickest/NucleiRepository sourcesenrich()so exploit data is fetched from the vuls2 DBFillWithExploit()calls fromdetector.goandserver.goExploitConfand[exploit]TOML config section (no longer needed)detector/exploitdb.goanddetector/exploitdb_test.gogo-exploitdbfromgo.modBREAKING CHANGE: The
[exploit]TOML config section andEXPLOITDB_*environment variables no longer have any effect. Exploit data is now sourced exclusively from the vuls2 database.Type of change
How Has This Been Tested?
unit test (Test_enrich with fixture data for all 5 exploit sources)
Checklist:
You do not have to satisfy all of the following.
make fmtmake testIs this ready for review?: YES
Reference