Repository navigation
Add a dedicated SpamCop expansion module - #934
Merged
Merged
Conversation
adulau
marked this pull request as ready for review
October 15, 2026 07:41
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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 dedicated SpamCop Blocking List (SCBL) expansion and hover module so analysts can query SpamCop directly for an
ip-srcorip-dstattribute. The existing generic RBL module includes SpamCop among many providers; this module offers a focused lookup with explicit response handling.A documented
127.0.0.2A response produces amisp_standardreputation object with a suspicious classification, the SpamCop list name, a lookup URL, and a reference to the original IP attribute. NXDOMAIN reports that the address is not listed, without assigning a benign verdict. DNS failures, missing A answers, and unexpected response codes return separate errors and produce no reputation object.The module validates IPv4 input and supports an optional positive, finite timeout in seconds (default: 5). It requires no API key and uses the existing dnspython dependency. Module metadata, documentation pages, and module indexes are included.
The PR also fixes two existing CI assumptions exposed by its first run. The Spamhaus smoke test now accepts the module's explicit refused-query and unknown-code errors while continuing to reject malformed results. Nine regression cases cover those checks. The workflow waits for a successful health response with bounded connection retries, allowing module imports to take longer than the previous fixed 10-second sleep.
Validation:
pytest -q tests/test_spamcop.py tests/test_dnsbl.py tests/test_expansion_smoke.py: 62 passed.git diff --checkpassed.The local full suite reported 860 passed, 4 skipped, and 4 failures involving external DNS access and unavailable PDF/module runtime components; the complete suite passed in GitHub CI. Live SpamCop DNS lookups were not run. IPv6 is explicitly unsupported.