feat: --from-nuclei adapter with response-body ingestion#2
Merged
Conversation
Ingest nuclei JSONL: re-type each extracted value with geiger's recognizer, use matched-at as provenance (title, cross-URL dedup/correlation, and a new "internet-exposed endpoint" exposure class). Also parse the response body when present so multi-field credentials (AWS key+secret, connection strings) reassemble — the flat extracted-results array can only carry one value. - internal/pipeline/batch.go: FromNuclei + nucleiBody - internal/pipeline/exposure.go: http(s) URL exposure class - cmd/geiger/main.go: --from-nuclei flag wiring - tests + README
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.
What
Adds
geiger --from-nuclei -, a third scanner-ingest adapter alongside--from-gitleaks/--from-trufflehog. It reads nuclei JSONL output, re-types each value with geiger's own recognizer, and ranks by blast radius — closing the loop with thegeiger-nuclei-templatesextract-template pack:nuclei -t templates/ -l targets.txt -j -irr | geiger --live --from-nuclei -How it works
matched-atas the source label drives three things for free: title provenance (from https://host/.env), cross-URL dedup + "also exposed in" correlation (one key exposed at N URLs collapses to one finding), and a newinternet-exposed endpointexposure class (FlagWarn).-irr), geiger parses it through its existing.env/JSON/INI parsers, reassembling multi-field credentials — an AWS key+secret pair, a connection string — that the flatextracted-resultsarray can't represent. Verified end-to-end: a.envexposing both AWS halves yields a fully SigV4-signable credential, not a lone access key.Changes
internal/pipeline/batch.go—FromNuclei+nucleiBodyinternal/pipeline/exposure.go—http(s)://→internet-exposed endpointclasscmd/geiger/main.go—--from-nucleiflag,readSourcesbranch, header casebatch_test.go,exposure_test.go) + READMETests
go test ./...passes. New coverage: value typing, multi-URL correlation, response-body AWS-pair reassembly, non-body extracted values, and the URL exposure class.Known follow-on (not in this PR)
The AWS instance-metadata creds JSON shape (
AccessKeyId/SecretAccessKey/Token) isn't reassembled by the generic path — only the live--metadataharvester maps it. Closing the SSRF-to-IMDS case fully would reuseimds.awsCredFromJSONas a recognizer.