Skip to content

eve: add rule generation source to alert record - v1#15335

Draft
jasonish wants to merge 1 commit intoOISF:mainfrom
jasonish:source-field/v1
Draft

eve: add rule generation source to alert record - v1#15335
jasonish wants to merge 1 commit intoOISF:mainfrom
jasonish:source-field/v1

Conversation

@jasonish
Copy link
Copy Markdown
Member

@jasonish jasonish commented May 7, 2026

Ticket: https://redmine.openinfosecfoundation.org/issues/8456

SV_BRANCH=OISF/suricata-verify#3072

Draft to see how "alert.engine" feels... Examples:

"alert": {
  "engine": "fw"
}

"alert": {
  "engine": "td"
}

@jasonish jasonish requested review from a team, jufajardini and victorjulien as code owners May 7, 2026 21:41
@jasonish jasonish marked this pull request as draft May 7, 2026 21:41
@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.64%. Comparing base (8968b1c) to head (7463306).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15335      +/-   ##
==========================================
- Coverage   82.66%   82.64%   -0.03%     
==========================================
  Files         995      995              
  Lines      271046   271048       +2     
==========================================
- Hits       224069   224000      -69     
- Misses      46977    47048      +71     
Flag Coverage Δ
fuzzcorpus 61.05% <50.00%> (-0.01%) ⬇️
livemode 18.37% <50.00%> (-0.02%) ⬇️
netns 22.57% <100.00%> (-0.07%) ⬇️
pcap 45.21% <50.00%> (-0.02%) ⬇️
suricata-verify 66.38% <100.00%> (-0.02%) ⬇️
unittests 58.57% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@suricata-qa
Copy link
Copy Markdown

Information: QA ran without warnings.

Pipeline = 31277

@victorjulien
Copy link
Copy Markdown
Member

In other parts of the firewall logic I referred to the IDS/IPS rules as "td" (threat detection). I think it would make sense to use that here as well.

When an alert is generated from firewall context, add an engine value of
"fw", otherwise "td" (for threat detect).

The engine field is only added when firewall mode is enabled.

Ticket: OISF#8456
@jasonish jasonish force-pushed the source-field/v1 branch from 6be1d15 to 7463306 Compare May 8, 2026 18:51
@jasonish
Copy link
Copy Markdown
Member Author

jasonish commented May 8, 2026

In other parts of the firewall logic I referred to the IDS/IPS rules as "td" (threat detection). I think it would make sense to use that here as well.

Makes sense. Updated to be td.

Comment thread etc/schema.json
"fw",
"td"
],
"description": "Engine that generated the alert in firewall mode: fw for firewall rules, td for threat detect rules."
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Suggested change
"description": "Engine that generated the alert in firewall mode: fw for firewall rules, td for threat detect rules."
"description": "Engine that generated the alert in firewall mode: fw for firewall rules, td for threat detection rules."

the signature.

In firewall mode, the ``alert.engine`` field identifies which rule engine
generated the alert: ``fw`` for firewall rules and ``td`` for threat detect
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Suggested change
generated the alert: ``fw`` for firewall rules and ``td`` for threat detect
generated the alert: ``fw`` for firewall rules and ``td`` for threat detection

@jasonish
Copy link
Copy Markdown
Member Author

jasonish commented May 8, 2026

I didn't like engine at first, and didn't have any other ideas. But I think its growing on me.

I could imagine some post-processing engine in the future, or something...

@suricata-qa
Copy link
Copy Markdown

WARNING:

field baseline test %
SURI_TLPW2_single_stats_chk
.uptime 1355 1397 103.1%

Pipeline = 31301

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.

3 participants