feat(modules): add grafana anonymous access exposure module#259
Open
TBX3D wants to merge 1 commit into
Open
Conversation
add a recon module for a grafana with anonymous access enabled: by default grafana requires a login and /api/search returns 401, but when anonymous access is turned on the endpoint lists every dashboard without credentials, exposing the internal metrics, hostnames and queries they contain, and the same anonymous session can reach backend data sources through the data source proxy; a grafana that requires login returns 401 and is not flagged.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #259 +/- ##
=======================================
Coverage ? 53.26%
=======================================
Files ? 81
Lines ? 6852
Branches ? 0
=======================================
Hits ? 3650
Misses ? 2936
Partials ? 266 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
pr summary2 files changed (+134 -0)
|
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.
modules/recon/grafana-anonymous-exposure.yamlflags a grafana with anonymous access enabled over/api/search?type=dash-db, keyed on a"type":"dash-db"entry paired with theuriandisStarredfields, then extracts the dashboard title; default grafana answers 401 here, so a 200 lists every dashboard and the anonymous session can reach backend data sources through the datasource proxy.build/vet/lint clean,
go test ./internal/modules/green (the module module end to end viaExecuteHTTPModule, real-hit and near-miss cases).