Skip to content

tests: tests for scope inheritance in rules/policies v1 - #3323

Closed
lukashino wants to merge 1 commit into
OISF:masterfrom
lukashino:bug/8954-action-scope-verify-v1
Closed

tests: tests for scope inheritance in rules/policies v1#3323
lukashino wants to merge 1 commit into
OISF:masterfrom
lukashino:bug/8954-action-scope-verify-v1

Conversation

@lukashino

Copy link
Copy Markdown
Contributor

Copilot AI lite review requested due to automatic review settings August 26, 2026 14:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Adds regression tests for firewall rule/policy action scope inheritance validation (Suricata v9+), covering both valid inherited scopes and expected failures when an inherited scope is incompatible with a secondary action.

Changes:

  • Added a “valid” test ensuring inherited scopes don’t incorrectly reject rules.
  • Added an “invalid rule” test where pass inherits an unsupported hook scope and must fail.
  • Added an “invalid policies” test where default policy scope inheritance triggers the same validation failure.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/firewall/firewall-action-scope-inherited-valid/test.yaml New test asserting all rules load successfully under inherited-scope validation
tests/firewall/firewall-action-scope-inherited-valid/suricata.yaml Enables engine analysis and logs to suricata.log for assertions
tests/firewall/firewall-action-scope-inherited-valid/firewall.rules Adds rules that rely on scope inheritance being accepted for supported cases
tests/firewall/firewall-action-scope-inherited-rule-invalid/test.yaml New negative test asserting Suricata exits non-zero and logs the expected validation error
tests/firewall/firewall-action-scope-inherited-rule-invalid/suricata.yaml Minimal config for the negative test logging
tests/firewall/firewall-action-scope-inherited-rule-invalid/firewall.rules Single rule designed to fail due to invalid inherited scope for pass
tests/firewall/firewall-action-scope-inherited-policies-invalid/test.yaml New negative test asserting invalid inherited scope via default policy config
tests/firewall/firewall-action-scope-inherited-policies-invalid/suricata.yaml Adds firewall.policies.default-policy configuration to trigger failure
tests/firewall/firewall-action-scope-inherited-policies-invalid/firewall.rules Placeholder rules file (none required for policy-only validation)

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

- file:
enabled: yes
filename: suricata.log

- file:
enabled: yes
filename: suricata.log

Comment on lines +8 to +11
logging:
outputs:
- file:
enabled: yes
@lukashino

Copy link
Copy Markdown
Contributor Author

continues in #3329

@lukashino lukashino closed this Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants