Closed GLVSKiriti closed 5 months ago
I'm encountering an issue with my YAML test configuration. When running the following single-test YAML file:
tests:
- rule: WriteBelowRoot
runner: HostRunner
before: ""
steps:
- syscall: "write"
args:
filepath: "/root/created-by-event-generator"
content: ""
after: "rm -f /root/created-by-event-generator"
The rule triggers and the test passes successfully, as shown in the screenshot below:
However, when I use a YAML file with multiple tests, like this:
tests:
- rule: WriteBelowRoot
runner: HostRunner
before: ""
steps:
- syscall: "write"
args:
filepath: "/root/created-by-event-generator"
content: ""
after: "rm -f /root/created-by-event-generator"
- rule: WriteBelowEtc
runner: HostRunner
before: ""
steps:
- syscall: "write"
args:
filepath: "/etc/created-by-event-generator"
content: ""
after: "rm -f /etc/created-by-event-generator"
The tests fail to pass, as shown in this screenshot:
Individually, both tests pass, but they fail when combined in a single YAML file. What could be causing this issue?
cc @jasondellaluce @alacuku
LGTM label has been added.
/approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: alacuku, FedeDP, GLVSKiriti
The full list of commands accepted by this bot can be found here.
The pull request process is described here
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
What this PR does / why we need it: This PR is to add support for testing falco rules using declarative YAML files in event-generator. The implementation idea is here
Which issue(s) this PR fixes:
Part of GSoC 2024 project "Falco: Upgrading event-generator and automating Falco performance testing" https://github.com/falcosecurity/evolution/issues/362 Special notes for your reviewer: cc @jasondellaluce @alacuku