restore cloudcheck tag propagation to URL/OPEN_TCP_PORT children#3309
Open
liquidsec wants to merge 6 commits into
Open
restore cloudcheck tag propagation to URL/OPEN_TCP_PORT children#3309liquidsec wants to merge 6 commits into
liquidsec wants to merge 6 commits into
Conversation
`_minimize()` wiped `_resolved_hosts` on the parent DNS_NAME once its consumers finished, which starved `dnsresolve` line 156 when child URL / OPEN_TCP_PORT events later reached it. Without the parent's IPs on the child, cloudcheck's per-host inheritance filter had nothing to match against and the cloud tags never propagated. Stop wiping `_resolved_hosts` in `_minimize()`: it is a small frozenset that the memory optimization was not really targeting. Also updates the modules still checking the pre-f561bda1e composed tags (`cdn-cloudflare`, `waf-cloudflare`, `cdn-imperva`, `cdn-akamai`, `cdn-cloudfront`) to key off the flat provider name that cloudcheck now emits. Regression tests cover both sides: cloudcheck asserts `_minimize()` preserves resolved_hosts and that URL / OPEN_TCP_PORT children inherit cloud tags; waf_bypass asserts both cloudflare and imperva tags trigger protection detection; virtualhost asserts each of the four flat provider names causes filter_event to skip the URL.
Contributor
📊 Performance Benchmark Report
📈 Detailed Results (All Benchmarks)
🎯 Performance Summary✅ No significant performance changes detected (all changes <10%) 🐍 Python Version 3.11.15 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #3309 +/- ##
=====================================
+ Coverage 90% 90% +1%
=====================================
Files 450 450
Lines 46229 46285 +56
=====================================
+ Hits 41484 41547 +63
+ Misses 4745 4738 -7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
en0f
self-requested a review
July 16, 2026 19:02
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
_minimize()was wiping_resolved_hostson parent events once their consumers finished. That starveddnsresolveline 156 (event._resolved_hosts = main_host_event.resolved_hosts) when child URL / OPEN_TCP_PORT events later reached it, and without the parent's IPs on the child, cloudcheck's per-host inheritance filter had nothing to match against. Cloud tags were never propagating past the DNS_NAME.Fix: stop wiping
_resolved_hostsin_minimize(). It is a small frozenset that the memory optimization was not really targeting.Also updates
waf_bypassandvirtualhost, which still filtered on the pre-f561bda1ecomposed tags (cdn-cloudflare,waf-cloudflare,cdn-imperva,cdn-akamai,cdn-cloudfront). They now key off the flat provider name that cloudcheck emits.Regression tests
test_module_cloudcheck.py:_minimize()preservesresolved_hosts; URL and OPEN_TCP_PORT children inherit cloud tags.test_module_waf_bypass.py: bothcloudflareandimpervatags triggerprotected_domainsdetection; untagged URLs don't.test_module_virtualhost.py: each ofcloudflare,imperva,akamai,cloudfrontcausesfilter_eventto skip; untagged URLs still pass.