Summary
When syncing rules from clawker.yaml to egress-rules.yaml, the additive merge deduplicates by dst:proto:port. If a rule for the same domain/proto/port already exists in the store, the new rule is silently dropped — even if it has different or additional path_rules.
This means updating path_rules in clawker.yaml has no effect until the old rule is manually removed with clawker firewall remove.
Two related issues
1. path_rules not updated on sync
# clawker.yaml — updated to add new path prefixes
- dst: raw.githubusercontent.com
proto: tls
port: 443
path_default: deny
path_rules:
- path: /anchore/syft/main/
action: allow
- path: /schmitthub/clawker/ # NEW
action: allow
- path: /envoyproxy/ # NEW
action: allow
After clawker firewall reload, egress-rules.yaml still only has /anchore/syft/main/. The new path prefixes are silently dropped because the dst:proto:port key already exists.
2. Multiple rules for same domain produce unreachable filter chains
Before the user merged into one rule, three separate rules for raw.githubusercontent.com:tls:443 each generated a separate Envoy filter chain with the same SNI. Envoy matches the first filter chain and stops — making the 2nd and 3rd rules' path_rules unreachable (always 403).
Fix: GenerateEnvoyConfig should merge path_rules from same-domain TLS rules before generating filter chains. Defense-in-depth against users who define multiple rules for the same domain.
Expected Behavior
- Sync should merge
path_rules when dst:proto:port matches an existing rule
- Multiple rules for the same
dst:proto:port in clawker.yaml should be merged into one before writing to the store
GenerateEnvoyConfig should also merge same-domain rules as defense-in-depth
Workaround
clawker firewall remove <domain>
- Edit
clawker.yaml to combine path_rules into a single rule
clawker firewall reload
Summary
When syncing rules from
clawker.yamltoegress-rules.yaml, the additive merge deduplicates bydst:proto:port. If a rule for the same domain/proto/port already exists in the store, the new rule is silently dropped — even if it has different or additionalpath_rules.This means updating
path_rulesinclawker.yamlhas no effect until the old rule is manually removed withclawker firewall remove.Two related issues
1. path_rules not updated on sync
After
clawker firewall reload,egress-rules.yamlstill only has/anchore/syft/main/. The new path prefixes are silently dropped because thedst:proto:portkey already exists.2. Multiple rules for same domain produce unreachable filter chains
Before the user merged into one rule, three separate rules for
raw.githubusercontent.com:tls:443each generated a separate Envoy filter chain with the same SNI. Envoy matches the first filter chain and stops — making the 2nd and 3rd rules' path_rules unreachable (always 403).Fix:
GenerateEnvoyConfigshould merge path_rules from same-domain TLS rules before generating filter chains. Defense-in-depth against users who define multiple rules for the same domain.Expected Behavior
path_ruleswhendst:proto:portmatches an existing ruledst:proto:portinclawker.yamlshould be merged into one before writing to the storeGenerateEnvoyConfigshould also merge same-domain rules as defense-in-depthWorkaround
clawker firewall remove <domain>clawker.yamlto combine path_rules into a single ruleclawker firewall reload