Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

output/reference: Include reference information in alert (if configured) #11758

Closed
wants to merge 4 commits into from

Conversation

jlucovsky
Copy link
Contributor

@jlucovsky jlucovsky commented Sep 11, 2024

Continuation of #11668

When configured, include the reference value in the alert. The configuration value is in the alert section: types.alert.reference. The default value is off/no. Set to yes to include the expanded reference from the rule in the alert record.

Link to redmine ticket: 4974

Describe changes:

  • Add reference value to suricata.yaml.in (default no/off)
  • Set flag in output logger if the config setting is on
  • Format the reference as a sequence, e.g., references: [ "ref-1" [, "ref-2" [, ...]]]

Updates:

  • Removed unneeded parameters in output path
  • Unneeded BUG_ON checks when using reference key/values.
  • Rebase
  • When the reference content contains a scheme (e.g., HTTP://), that is used to override the reference's key value.

Provide values to any of the below to override the defaults.

SV_BRANCH=OISF/suricata-verify#2037

jlucovsky and others added 4 commits September 11, 2024 15:52
Issue: 4974

Optionally include rule references with the alert. Since there can be
multiple reference keywords, they are collected into an array.
Issue: 4974

1. Use https instead of http everywhere
2. Organize and annotate references by
    - Referenced by ET/Open and ET/Pro
        - URL resolves and works as intended (to provide supplemental
          information regarding a reference value, e.g., bug id, cve
          value)
        - URL no longer resolves
        - URL resolves but doesn't work as intended (to provide
          supplemental information)
    - Not referenced by ET/Open nor ET/Pro
        - URL resolves and works as intended (to provide supplemental
          information regarding a reference value, e.g., bug id, cve
          value)
        - URL no longer resolves
        - URL resolves but doesn't work as intended (to provide
          supplemental information)
Issue: 4974

Remove unused parameters in output path for
- AlertJsonMetadata
- AlertJsonHeader
Copy link

codecov bot commented Sep 11, 2024

Codecov Report

Attention: Patch coverage is 63.79310% with 21 lines in your changes missing coverage. Please review.

Project coverage is 79.18%. Comparing base (79aa486) to head (d7b8cc6).
Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11758      +/-   ##
==========================================
- Coverage   82.63%   79.18%   -3.46%     
==========================================
  Files         919      919              
  Lines      248943   248830     -113     
==========================================
- Hits       205716   197030    -8686     
- Misses      43227    51800    +8573     
Flag Coverage Δ
fuzzcorpus 60.86% <63.79%> (+<0.01%) ⬆️
livemode 18.71% <12.06%> (-0.04%) ⬇️
pcap 44.11% <56.89%> (-0.06%) ⬇️
suricata-verify ?
unittests 58.98% <48.27%> (-0.03%) ⬇️

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

@suricata-qa
Copy link

Information:

ERROR: QA failed on SURI_TLPR1_alerts_cmp.

field baseline test %
SURI_TLPR1_stats_chk
.app_layer.tx.dcerpc_tcp 5949 6289 105.72%

Pipeline 22553

@victorjulien
Copy link
Member

Lots of failing CI tests :-/

@jlucovsky
Copy link
Contributor Author

Continued in #11767

@jlucovsky jlucovsky closed this Sep 12, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants