feat: add scanmalware search agent - #750
Open
jonaslejon wants to merge 1 commit into
Open
jonaslejon wants to merge 1 commit into
jonaslejon wants to merge 1 commit into
Conversation
ScanMalware searches an archive of sandboxed URL scans. The API is anonymous, so the agent works on a fresh install with no provider config; the query is SMQL, passed through unchanged the way the fofa and shodan agents pass theirs. The archive records what a browser saw, so results carry Host and Url rather than ip:port, which runner.go already handles by falling back to the host field, as it does for nerdydata. shodan-idb was the only keyless engine and was named as a string literal in two places. Those become an anonymousAgents set so a second keyless engine does not need a third and fourth literal.
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
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.
Proposed changes
Adds ScanMalware as a search agent. No API key: the API is
anonymous, so it works on a fresh install with no config. The query is SMQL, ScanMalware's own
syntax, passed through unchanged the way
fofaandshodanpass theirs.Two things for review:
ip:port. The archive records what a browser saw, and ascan resolves several addresses, so there is no single listening service.
HostandUrlareset,
IP/Portleft empty, whichrunner.goalready handles by falling back tohost;nerdydatasets the same subset.shodan-idbwas the only keyless engine and is named as aliteral in two places. I replaced those with an
anonymousAgentsset; happy to use two literalsinstead if you'd rather keep the diff minimal.
Proof
go build,go test ./...andgolangci-lint run --timeout=30m ./...clean ondevwith Go1.24.6, matching what CI installs from
go.mod. Measured from an empty$HOME, no config:Seven tests, each first run against a deliberately broken build to confirm it fails. That is how
the cancellation test got rewritten: the first version drained the channel, so it passed even with
sources.SendResultswapped for a plainresults <- r.Checklist
devbranch-ehelp,-scanmalware/-smflag)Disclosure: I run ScanMalware, so this is a vendor-submitted source. Flagging it up front
rather than leaving it to be found in review.