portscan module skip tags option#3118
Open
liquidsec wants to merge 1 commit into
Open
Conversation
portscan rejects events whose tags match skip_tags (default empty). speculate fills the gap on a per-event basis: when an active portscan is enabled but would_skip(event) is True, speculate emits its configured ports as if no portscanner were present.
Collaborator
Author
|
supercedes #3075 |
Contributor
🚀 Performance Benchmark Report
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #3118 +/- ##
=====================================
+ Coverage 90% 90% +1%
=====================================
Files 445 445
Lines 38727 38786 +59
=====================================
+ Hits 34653 34706 +53
- Misses 4074 4080 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Summary
Adds a
skip_tagsoption to theportscanmodule. When configured (e.g.cdn,waf), events with matching tags are excluded from masscan, andspeculatefills the gap by emitting its configured ports for those skipped events.Closes the gap that #3075 was reaching for, without putting emission logic inside
filter_eventor makingportscansynthesize ports itself. Design:portscanonly scans; never emits assumed-open ports.speculate's emit decision becomes per-event: it always emits when no active portscanner exists (today's behavior), and additionally emits for events the active portscanner would skip.portscan.would_skip(event), which is a small public method on the portscan module. The relationship is the same shape as today's "is portscan enabled?" check, just sharpened to "is portscan going to scan this event?"Default
skip_tags=""means today's behavior is unchanged.