Vulnerability Refactor#61
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #61 +/- ##
==========================================
+ Coverage 62.81% 64.47% +1.65%
==========================================
Files 19 15 -4
Lines 944 774 -170
==========================================
- Hits 593 499 -94
+ Misses 303 235 -68
+ Partials 48 40 -8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This pull request migrates TLS vulnerability detection (CCS Injection, Heartbleed, Debian Weak Key) from in-repo implementations to the external github.com/jsandas/tls-vuln-checker module, and simplifies the Docker build by removing the nmap dependency and related resources.
Changes:
- Replaced in-tree vulnerability checker packages with
tls-vuln-checkerimports and updated the scanner’s vulnerability types accordingly. - Removed
nmapfrom the Docker image build and deleted related nmap script resources. - Updated module dependencies and adjusted scanner test expectations.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
pkg/scanner/scanner.go |
Switches vulnerability checker types/imports to the external tls-vuln-checker package. |
pkg/scanner/scanner_test.go |
Updates expectations for supported configuration results. |
go.mod |
Removes nmap dependency; adds tls-vuln-checker and starttls-go. |
go.sum |
Updates checksums to reflect dependency removals/additions. |
Dockerfile |
Removes nmap install and stops copying nmap resources into the runtime image. |
resources/nmap/ssl-ccs-injection.nse |
Deletes the in-repo nmap script used for CCS injection detection. |
pkg/vuln/** |
Removes local vulnerability implementations and their tests/docs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This pull request removes the in-tree implementations and dependencies for TLS vulnerability checks (CCS Injection, Heartbleed, and Debian Weak Key) and replaces them with the new external
github.com/jsandas/tls-vuln-checkerpackage. It also removes thenmapdependency and related resources from the Docker build, simplifying the codebase and build process.Migration to external vulnerability checker:
pkg/vuln/ccs,pkg/vuln/heartbleed,pkg/vuln/weakkey) with imports fromgithub.com/jsandas/tls-vuln-checker, removing local implementations and associated tests. [1] [2] [3] [4] [5] [6] [7] [8]go.modto remove thegithub.com/Ullaakut/nmap/v2and other now-unused dependencies, and addgithub.com/jsandas/tls-vuln-checkerandgithub.com/jsandas/starttls-go.Docker build and resources cleanup:
nmapand copying ofresources/nmapfrom the Dockerfile, as these are no longer required. [1] [2]Test adjustments:
Documentation cleanup:
These changes centralize vulnerability checks in a dedicated external package, streamline dependencies, and simplify the codebase.