Skip to content

feat(modules): add eureka and spring boot admin exposure modules#263

Open
TBX3D wants to merge 1 commit into
vmfunc:mainfrom
TBX3D:feat/service-registry-exposure-modules
Open

feat(modules): add eureka and spring boot admin exposure modules#263
TBX3D wants to merge 1 commit into
vmfunc:mainfrom
TBX3D:feat/service-registry-exposure-modules

Conversation

@TBX3D

@TBX3D TBX3D commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

modules/recon/eureka-registry-exposure.yaml flags an exposed netflix eureka registry over /eureka/apps, keyed on the apps__hashcode, versions__delta and applications envelope keys (the codec renders the single _ as __ in both the xml and json forms), then extracts the first instance ip from either form; eureka ships no auth, so the open registry leaks every instance's internal hostname, ip and ports and accepts rogue registrations. modules/recon/spring-boot-admin-exposure.yaml flags an exposed spring boot admin server over /instances, keyed on the registration, healthUrl and statusInfo fields, then extracts the first health url; the codecentric server ships no security, so the open registry leaks every app's internal management and health actuator urls (a pivot), and a secured one answers 401 or redirects to login.

build/vet/lint clean, go test ./internal/modules/ green (the two modules end to end via ExecuteHTTPModule, real-hit and near-miss cases).

add two recon modules detecting anon-by-design service registries that leak the internal service map:

- eureka-registry-exposure (medium): probes /eureka/apps and matches the registry envelope markers apps__hashcode and versions__delta (the EurekaJacksonCodec formats them with a default '_' -> '__' replacement, so they appear verbatim in both the xml and json forms); eureka has no auth, so an open registry discloses every instance's internal hostname, ip and ports and accepts rogue registrations, while a spring-security-secured eureka returns 401; extracts the first instance ip from either form

- spring-boot-admin-exposure (medium): probes /instances and matches the registration/healthUrl/statusInfo shape; the codecentric server ships no security, so an open one discloses every registered app's internal management and health urls (a pivot to their actuators), while a secured one returns 401 or redirects to login; extracts the first internal health url

both modules carry hard-test coverage: eureka is proven on both its xml and json forms, with an N-1 trap (an apps__hashcode-less envelope stays quiet) and a prose trap (a page that merely mentions the word applications stays quiet); sba has an N-1 statusInfo trap; both have 401 secured-instance cases and cross false-positive guards both ways.
@TBX3D TBX3D requested a review from vmfunc as a code owner June 26, 2026 08:27
@github-actions github-actions Bot added size/l <500 lines changed modules changes to scan modules tests test changes labels Jun 26, 2026
@github-actions

Copy link
Copy Markdown

pr summary

3 files changed (+225 -0)

category files
go source 1
tests 1

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@96092da). Learn more about missing BASE report.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #263   +/-   ##
=======================================
  Coverage        ?   53.23%           
=======================================
  Files           ?       81           
  Lines           ?     6852           
  Branches        ?        0           
=======================================
  Hits            ?     3648           
  Misses          ?     2937           
  Partials        ?      267           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

modules changes to scan modules size/l <500 lines changed tests test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants