feat: [generate-openfilters-scanners.py] generate scanner warninglists from OpenFilters/internet-scanners - #389
Merged
adulau merged 2 commits intoAug 30, 2026
Conversation
…s from OpenFilters/internet-scanners Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0121gk7vaCXX9bMri7tC9XVd
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.
Adds a generator that builds the internet-wide-scanner warninglists from
OpenFilters/internet-scanners,
and wires it into
generate_all.sh.That repository tracks the ranges scanning organisations themselves publish as
their scan origins, and ships them machine-readable under
cidr/<org>_v4.txtand
cidr/<org>_v6.txt. It is released into the public domain (Unlicense) andis actively maintained (last upstream commit 2026-08-20).
Several MISP scanner lists are currently maintained entirely by hand, and 56
organisations tracked upstream have no published-range list here at all. This
gives all of them a single refresh path.
Design notes
One generator, many lists. Follows the precedent of
generate-microsoft-azure.pyand
generate-vpn.py. The upstream repository is a single snapshot, so onedownload serves every list and they stay mutually consistent.
Fetches the repository tarball, not 130 individual raw files: one request,
an atomic snapshot, and no GitHub raw rate-limiting.
Organisations are mapped explicitly in
ORG_TO_LISTrather than deriving adirectory name from the upstream filename. When upstream adds an organisation
the generator logs a warning naming it and skips it, instead of silently
creating a list nobody named or reviewed.
Existing lists are only ever added to. Entries already committed are merged
in before
consolidate_networks()runs. Several of these lists were curated byhand from sources this one does not cover, and a range an organisation scanned
from in the past is still worth recognising in a false-positive warninglist.
Verified: no existing entry is dropped from any of the six lists this touches.
Pre-existing lists keep their
nameanddescription. MISP keyswarninglists on their name, so renaming one in place would appear server-side as
a second, competing list rather than an update. Only
listandversionchangefor lists that already exist.
Malformed ranges are dropped, not widened. Upstream currently ships one
entry with host bits set (
34.19.127.176/27, undermandiantasm). Accepting itwould mean widening it to its enclosing
/27, which in a warninglist meanssuppressing alerts for 16 addresses the operator never claimed. The generator
rejects it with a logged warning instead; the warning is there so it can be
reported upstream.
Not taken from this source
driftnet,modat,onypheotherinactive/(incl.netsecscan)netsecscan-scanningtherefore stays hand-maintainedAlso note this data has a different provenance from the
*-nt-scanninglists, which come from CIRCL network-telescope observations. Published ranges
and observed ranges legitimately differ, so the two families are kept separate
and this generator never writes to a
-nt-scanninglist.The first generation of the new lists, and the updates to the six existing ones,
are submitted as separate pull requests.
Verified:
./validate_all.shpasses, and the generator exits 0 with a cleangenerators.logapart from the intended malformed-range warning.