fw: validate scope inheritance in policies and rules v2 - #16132
Closed
lukashino wants to merge 2 commits into
Closed
fw: validate scope inheritance in policies and rules v2#16132lukashino wants to merge 2 commits into
lukashino wants to merge 2 commits into
Conversation
added 2 commits
August 27, 2026 17:45
A secondary action given without an explicit scope inherits the scope of the primary action, but was never validated against the scopes it supports itself. `pass` only supports packet and flow scope but the inheritance was never verified. Ticket: 8954
Previously, hook sequences in both rules and default policies allowed `pass` to be combined with incompatible hooks (e.g. reject or drop). This commit clamps pass to accept only. Ticket: 8954
There was a problem hiding this comment.
Pull request overview
This PR tightens Suricata firewall rule action parsing by adding stricter validation around pass usage and how action scopes are inherited across multi-action firewall rules.
Changes:
- Reject
passas a secondary action unless the rule’s primary action isaccept. - When
passomits an explicit scope, validate that the inherited scope is limited topacketorflow.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #16132 +/- ##
==========================================
- Coverage 83.06% 83.05% -0.01%
==========================================
Files 1004 1004
Lines 277376 277415 +39
==========================================
+ Hits 230389 230420 +31
- Misses 46987 46995 +8
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
lukashino
marked this pull request as draft
August 27, 2026 19:19
|
Information: QA ran without warnings. Pipeline = 33419 |
Contributor
Author
|
Continues in #16138 |
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.
Link to ticket: https://redmine.openinfosecfoundation.org/issues/8954
Describe changes:
v2:
passonly is used next toacceptprimary actionv1:
passonly inherits packet and flow scopesSV_BRANCH=OISF/suricata-verify#3329