Skip to content

Comments

Next/20230530/v6#8941

Closed
victorjulien wants to merge 12 commits intoOISF:masterfrom
victorjulien:next/20230530/v6
Closed

Next/20230530/v6#8941
victorjulien wants to merge 12 commits intoOISF:masterfrom
victorjulien:next/20230530/v6

Conversation

victorjulien and others added 12 commits May 25, 2023 17:18
Instead of using flags to indicate a rule type, use an explicit `type`
field.

This will make it more clean in code paths what paths a rule is taking,
and will allow easier debugging as well as analyzer output.

Define the following fields:

- SIG_TYPE_IPONLY: sig meets IP-only criteria and is handled by the IP-only
  engine.
- SIG_TYPE_PDONLY: sig inspects protocol detection results only.
- SIG_TYPE_DEONLY: sig inspects decoder events only.
- SIG_TYPE_PKT:    sig is inspected per packet.
- SIG_TYPE_PKT_STREAM: sig is inspected against either packet payload or
  stream payload.
- SIG_TYPE_STREAM: sig is inspected against the reassembled stream
- SIG_TYPE_APPLAYER: sig is inspected against an app-layer property, but not
  against a tx engine.
- SIG_TYPE_APP_TX: sig is inspected the tx aware inspection engine(s).

Ticket: OISF#6085.
Per rule type record properties of the type.

Example output:

    {
        "raw": "alert udp any any -> any any (msg:\"UDP with flow direction\"; flow:to_server; sid:1001;)",
        "id": 1001,
        "gid": 1,
        "rev": 0,
        "msg": "UDP with flow direction",
        "app_proto": "unknown",
        "requirements": [],
        "type": "pkt",
        "flags": [
            "src_any",
            "dst_any",
            "sp_any",
            "dp_any",
            "toserver"
        ],
        "pkt_engines": [],
        "frame_engines": [],
        "lists": {}
    }

Ticket: OISF#6085.
Some very minor changes to formatting.
Use try_reserve before growing the internal buffer, and the internal
state vector. This allows allocation errors to be caught and an error
returned instead of just aborting the process.

Ticket: OISF#6057
For 7.0 multiple includes are allowed, but marked as
deprecated. Update the example to show the new way of pulling in
multiple includes.
Two "Logging changes" sections existed, merge.
Document how to use include files, plus add a deprecation notice on
the use of multiple "include" statements.
@victorjulien victorjulien requested review from a team, jasonish and jufajardini as code owners May 30, 2023 10:36
@victorjulien victorjulien mentioned this pull request May 30, 2023
@codecov
Copy link

codecov bot commented May 30, 2023

Codecov Report

Merging #8941 (2bfe7b7) into master (afef35b) will increase coverage by 0.02%.
The diff coverage is 81.01%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8941      +/-   ##
==========================================
+ Coverage   82.34%   82.37%   +0.02%     
==========================================
  Files         969      969              
  Lines      273336   273486     +150     
==========================================
+ Hits       225090   225290     +200     
+ Misses      48246    48196      -50     
Flag Coverage Δ
fuzzcorpus 64.84% <65.71%> (+0.08%) ⬆️
suricata-verify 60.46% <75.55%> (-0.02%) ⬇️
unittests 62.96% <60.96%> (+0.01%) ⬆️

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

@suricata-qa
Copy link

ERROR:

ERROR: QA failed on SURI_TLPW1_files_sha256.

Pipeline 14145

@victorjulien
Copy link
Member Author

replaced by #8942

@victorjulien victorjulien deleted the next/20230530/v6 branch June 16, 2023 07:06
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.

4 participants