189 Commits
Author SHA1 Message Date
Philippe Antoine 49aefe7093 ci: check for enum integer keywords
And generic documentation about it

Ticket: 8675
2026-10-08 13:08:20 +00:00
Philippe Antoine b73e441d5a fuzz: script to generate corpus for datasets target
Ticket: 3590
2026-09-29 20:49:53 +00:00
Juliana Fajardini b778e8c06d clang-format: fix commit-filter off-by-one
The filter range excluded $first_commit itself, so the first commit on
the branch was never rewritten and single-commit branches failed.

Ticket: #9097
2026-09-21 23:06:18 +00:00
Juliana Fajardini 4f47e43a33 clang-format: more accurate script reports
Success was decided by matching git-clang-format's stdout against two
known strings. When it fails, e.g. on an invalid revision, it writes to
stderr only and leaves stdout empty, so the check reported a formatting
violation where there is an error.

The reformatting commands had the opposite problem. git-clang-format
exits 1 when it did reformat files, which they treated as a failure, so
branch, commit, cached and rewrite-branch all reported an error whenever
they had work to do.

Keep stderr in its own file and compare against the exit code instead.
Exit code 1 means formatting changes were found or made, 2 and up are
errors.

Ticket: #9097
2026-09-21 23:06:18 +00:00
Juliana Fajardini 6aa97aa8a9 clang-format: handle branch without commits
When a branch has no commits of its own, e.g. when it is the baseline
branch itself, git rev-list returns nothing and first_commit is empty.
The empty value was still used to build "$first_commit^", which git
rejects as a bad revision.

git-clang-format then failed without writing anything to stdout, which
the output check reads as "formatting required". Pushing the baseline
branch therefore failed the CI formatting check, reporting a style
violation that does not exist.

Report that there is nothing to format instead.
git rev-list also returns nothing when the baseline ref does not exist
as it only reports that on stderr, so verify the baseline separately to
keep that case a loud failure rather than a silent pass.

Ticket: #9097
2026-09-21 23:06:18 +00:00
Jason Ish 172204be61 dnp3: allocate variable-length object fields dynamically
Introduce a new code generated type, dynchararray. Use this new
dynamically allocated char array instead of using a 65535 static array.

Ticket: #8827
2026-09-08 20:24:50 +02:00
Jason Ish 99942aa50d dnp3-gen: update generated code to match clang-format 2026-09-08 20:24:50 +02:00
Juliana Fajardini 34b7a9ef82 scripts: check doc rules as TD and FW rules
Previously, a rule that had firewall-only syntax or keywords would fail
the script check.

Since we can't guarantee that a firewall rule will look different than a
detection one, run rule examples against both scenarios before failing
them.
2026-08-22 08:59:18 +00:00
Juliana Fajardini f3e27b0e41 scripts: check-doc-rules tries local bin first
If the point is to check the docs for added changes, it makes sense to
that used binary is the one that comes with the doc changes. Thus, try
using the local binary first, before falling back to usr/bin installed
Suricata.
2026-08-22 08:59:18 +00:00
Jason Ish 6b8c482012 github-ci: break ubuntu/debian script into 2 scripts
Debian 13 ships Rust 1.85 by default, Ubuntu requires installing a
specific patch to get newer then 1.75. So to support a newer MSRV,
these operating systems need different examples.
2026-08-14 11:09:56 +00:00
Jason Ish 05882e7be0 github-ci: cleanups to almalinux minimal build
Don't install extra repo's in the script, do it in CI. These are covered
by the documentation as they vary depending on the version and variant.
2026-08-14 11:09:56 +00:00
Shivani Bhardwaj 35d28272b2 dcerpc: add interface-service name data
This data directly comes from Zeek @d11a8750. It was scriptually
converted to NDJSON ingestible to Suricata using serde and serde_json.
The script used for this conversion lives in
scripts/extract_dce_rpc_interfaces.py.

Part of this data within Zeek codebase comes from the MITRE BZAR
project. Hence, the LICENSE file alongwith this data consists of both
the licenses: Zeek and BZAR.

Feature 2727
Feature 8523
2026-08-12 15:01:53 +00:00
Philippe Antoine 17dc065326 ci: check uint keywords with their size
So, that if a keyword advertises uint16, it can indeed parse
a uint16 and is not just a uint8
2026-06-26 21:50:34 +00:00
Philippe Antoine 399ee1e360 ci: check multi uint keywords
Ticket: 7929
2026-06-26 21:50:34 +00:00
Philippe Antoine 72e9314402 ci: check cargo fmt for whole suricata 2026-06-22 11:12:35 +00:00
Shivani Bhardwaj 3adb975032 misc: rename requirements.txt to bundle.txt
Do not use Python's standard file name to define external packages that
need to be installed. This confuses Dependabot.
2026-06-20 11:02:56 +00:00
Philippe Antoine ca34fba00c rust: format smb files
Ticket: 3836
2026-06-17 19:29:23 +00:00
Philippe Antoine aea9fd73b7 rust: format dcerpc files
Ticket: 3836
2026-06-14 22:19:31 +02:00
Philippe Antoine e0152178da rust: format detect files
Ticket: 3836
2026-06-12 21:04:10 +00:00
Philippe Antoine 762b725e1f ci: check-doc-rules copies data(sets) files into tmpdir
Allows to use datasets load
2026-06-11 14:36:01 +00:00
Philippe Antoine e39075557a rust: check llmnr format
Ticket: 3836
2026-06-10 20:57:36 +00:00
Philippe Antoine 4144d9c709 rust: format snmp files
Ticket: 3836
2026-06-10 20:57:36 +00:00
Philippe Antoine 9318bbfbdb rust: format tftp files
Ticket: 3836
2026-06-05 12:38:56 +00:00
Philippe Antoine 9ec200e834 rust: format x509 files
Ticket: 3836
2026-06-05 12:38:56 +00:00
Philippe Antoine dd66276f82 rust: format telnet files
Ticket: 3836
2026-06-05 12:38:56 +00:00
Philippe Antoine 709ad1bdf4 rust: format sip files
Ticket: 3836
2026-06-05 12:38:56 +00:00
Philippe Antoine 8217c51126 rust: format sdp files
Ticket: 3836
2026-06-02 21:16:52 +00:00
Philippe Antoine 9d9d8df4cd rust: format rdp files
Ticket: 3836
2026-06-02 21:16:52 +00:00
Philippe Antoine c8a86cdffa ci: move rustfmt to a helper script 2026-06-02 21:16:52 +00:00
Victor Julien 781bd5184e clang-format: support clang 17
Update Github CI runner to use it.

Bump to Ubuntu 24.04 as well.
2026-05-29 15:18:50 +00:00
Philippe Antoine 38d41e6fa6 dnp3: fix off-by-one in array sizes
So that we can write a final zero without overflowing the array
and relying on padding to avoid further problems

Ticket: 8448
2026-05-16 20:42:15 +02:00
Philippe Antoine c25ccd299e dnp3: explicit application layer length is bounded in uint16_t
Ticket: 8460
2026-05-16 20:42:15 +02:00
Philippe Antoine 891b17277e ci: check dist rules
So that we catch if we add a typo like
app-layer-event:snmp.version_mismatchZZZ;
2026-05-05 20:56:25 +02:00
Philippe Antoine d84b6789c9 ci: make doc rules validation strict
not finding anymore problems now
2026-05-05 20:56:25 +02:00
Philippe Antoine cce673349a ci/scripts: check for dots and dashes in json schema keys
Ticket: 6502
2026-05-04 20:27:37 +00:00
Philippe Antoine adc0f18463 doc/ci: check keyword links
Ticket: 8257
2026-04-30 05:38:05 +00:00
Philippe Antoine 64f003190d doc: move more rules to dedicated css container
Ticket: 8372

Also remove dead code from script checking the rules
2026-04-26 15:21:01 +00:00
Philippe Antoine e0d10c0513 scripts: remove dead code in check-doc-rules 2026-04-26 15:21:01 +00:00
Philippe Antoine 42a85c37f1 scripts: add script to check rules in doc
Ticket: 8372

and run it in github CI
2026-04-16 05:58:14 +00:00
Philippe Antoine 512bbe4de8 detect/template: merge template and template2
Ticket: 7278

Do a single packet match template merging best of both current
templates
2026-04-13 05:01:53 +00:00
Jason Ish 551f6ded69 github-ci: update almalinux minimal build to use dist archive
Update the AlmaLinux recommended minimal build to use the pre built
distribution archive as this is the type of build the documentation is
targetting.
2026-03-17 06:04:07 +00:00
Jason Ish 87dba92bdd github-ci: update debian/ubuntu minimal build to use dist
Update the Ubuntu/Debian minimal recommended build to use the
pre-built dist archive instead of building from git, as that is the
type of build this documentation targets.

Also use the ubuntu:22.04 container. The GitHub provided Ubuntu 22.04
VM appears to contain some new additions like a newer Rust that is not
found on a typical Ubuntu 22.04 installation.
2026-03-17 06:04:07 +00:00
Philippe Antoine cf88ed518c jsonschema: check for duplicate keys
Ticket: 6691

And fix the one duplicate found
2025-12-10 06:38:12 +00:00
Philippe Antoine 273e9f55eb scripts: eve-parity hard fail on unknown keyword 2025-11-26 01:13:05 +00:00
Philippe Antoine f581b8f1ae scripts: complete eve-parity type check 2025-11-26 01:13:05 +00:00
Jason Ish 6bd360570a dnp3: fix dnp3 generation script to match code 2025-11-07 19:28:17 +00:00
Jason Ish 2848061d0d scripts/evedoc.py: handle union types in schema
Update EVE documentation script to handle union types like:

    "type": ["string", "number"]
2025-10-06 19:56:12 +02:00
Philippe Antoine f7f8fbc116 scripts: setup app layer rustfmt mod.rs last
Otherwise rustfmt complains that parser.rs does not exist yet
2025-09-29 19:08:20 +02:00
Philippe Antoine 24503b0ead rust: move file functions out of SuricataContext
Ticket: 7667
2025-09-22 10:02:19 +02:00
Victor Julien b58c8461c3 clang-format: adjust for master to main rename 2025-09-16 15:09:50 +02:00