Suricata - IDS/IPS
Find a file
Philippe Antoine af246ae7ab
Some checks failed
builds / Prepare dependencies (push) Has been cancelled
builds / Prepare cbindgen (push) Has been cancelled
CodeQL (Rust/C) / Analyze (push) Has been cancelled
Nix Env Build / tests (push) Has been cancelled
Check Rust / Check Rust (push) Has been cancelled
Scan-build / Scan-build (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
builds / AlmaLinux 10 (schema, plugins) (push) Has been cancelled
builds / AlmaLinux 9 (schema) (push) Has been cancelled
builds / AlmaLinux 9 Test Templates (push) Has been cancelled
builds / Build RPMs (push) Has been cancelled
builds / AlmaLinux 8 (push) Has been cancelled
builds / CentOS Stream 9 (push) Has been cancelled
builds / Fedora 43 (Suricata Verify codecov) (push) Has been cancelled
builds / Fedora 43 (clang, debug, asan, wshadow, rust-strict, systemd) (push) Has been cancelled
builds / Fedora 43 (gcc, debug, flto, asan, wshadow, rust-strict) (push) Has been cancelled
builds / Fedora (non-root, debug, clang, asan, wshadow, rust-strict, no-ja) (push) Has been cancelled
builds / AlmaLinux 9 (no jansson) (push) Has been cancelled
builds / AlmaLinux 9 (Minimal/Recommended Build) (push) Has been cancelled
builds / Ubuntu 24.04 (cocci) (push) Has been cancelled
builds / Ubuntu 24.04 (RUSTC+CARGO vars) (push) Has been cancelled
builds / Ubuntu 24.04 (unittests coverage) (push) Has been cancelled
builds / Ubuntu 22.04 (unix socket mode coverage) (push) Has been cancelled
builds / Ubuntu 22.04 (afpacket and dpdk coverage) (push) Has been cancelled
builds / Ubuntu 24.04 (pcap unix socket ASAN) (push) Has been cancelled
builds / Ubuntu 24.04 (afpacket and dpdk live tests with ASAN) (push) Has been cancelled
builds / Ubuntu 22.04 (fuzz corpus coverage) (push) Has been cancelled
builds / Ubuntu 20.04 (-DNDEBUG) (push) Has been cancelled
builds / Ubuntu 20.04 (unsupported rust) (push) Has been cancelled
builds / Ubuntu 22.04 (Debug Validation) (push) Has been cancelled
builds / Ubuntu 22.04 (Fuzz) (push) Has been cancelled
builds / Ubuntu 22.04 (Netmap build) (push) Has been cancelled
builds / Ubuntu 22.04 (Minimal/Recommended Build) (push) Has been cancelled
builds / Ubuntu 22.04 (DPDK Build) (push) Has been cancelled
builds / Debian 12 (xdp) (push) Has been cancelled
builds / Debian 13 (xdp) (push) Has been cancelled
builds / Ubuntu 22.04 Dist Builder (push) Has been cancelled
builds / Debian 12 MSRV (push) Has been cancelled
builds / Debian 11 (push) Has been cancelled
builds / MacOS Latest (push) Has been cancelled
builds / Windows MSYS2 MINGW64 (NPcap) (push) Has been cancelled
builds / Windows MSYS2 MINGW64 (libpcap) (push) Has been cancelled
builds / Windows MSYS2 UCRT64 (libpcap) (push) Has been cancelled
builds / Windows MSYS2 MINGW64 (WinDivert) (push) Has been cancelled
builds / PF_RING (push) Has been cancelled
http: do not use a loop to find the tx count
As we want the last tx

Ticket: 8156

The generic function AppLayerParserGetTxCnt calls for HTTP1
Transactions.size()

This function has some specific code, as we may have pre-created
a tx that we do not want to count.
This used to get the last tx by iterating over all the transactions
waiting to find the one with max index.
So, instead of using the Transactions.get function, we get the last
tx out of the VecDeque and check its index.
2025-12-15 22:18:56 +00:00
.clusterfuzzlite ci: do not run undefined for clusterfuzzlite 2025-09-08 18:47:14 +02:00
.github github-ci: update Fedora to 43 2025-12-11 04:30:43 +00:00
benches Initial add of the files. 2009-07-28 23:25:09 +02:00
doc userguide: highlight exceptions interactions 2025-12-11 04:30:44 +00:00
ebpf ebpf: include llvm_bpfload.h in distribution 2024-10-02 11:34:55 -06:00
etc doc: http fields in json schema 2025-12-11 20:39:02 +00:00
examples rust: use snake case for applayer_register_protocol_detection 2025-12-11 04:30:43 +00:00
git-templates git: Add commit template 2024-12-20 07:55:48 +01:00
lua lua: create suricata.config lua lib 2025-06-04 09:39:51 +02:00
plugins counters: remove ThreadVars from counter registration 2025-12-02 06:21:54 +00:00
python python/Makefile.am: fix file permissions of python/suricata/config/defaults.py 2025-11-03 18:58:22 +00:00
qa rust: bindgen SCSigMatchAppendSMToList 2025-05-21 09:37:22 +02:00
rules decode/ipv6: actually set ipv6 pkt too small event 2025-09-30 20:09:23 +02:00
rust http: do not use a loop to find the tx count 2025-12-15 22:18:56 +00:00
scripts jsonschema: check for duplicate keys 2025-12-10 06:38:12 +00:00
src gen: Fix typos 2025-12-15 22:18:55 +00:00
suricata-update suricata-update: install sample configuration files 2023-06-09 10:29:57 +02:00
.clang-format devguide: move into userguide as last chapter 2022-03-29 07:56:03 +02:00
.gitignore .gitignore: don't ignore rule files in rules/ 2025-06-21 21:32:53 +02:00
.readthedocs.yaml docs: adjust readthedocs config to new options 2023-10-06 21:28:15 +02:00
acsite.m4 configure: check for u_int and friends 2020-04-16 14:37:34 +02:00
autogen.sh autogen/rust: remove Cargo.lock 2018-01-30 14:43:52 +01:00
ChangeLog release: 8.0.1; update changelog 2025-09-15 18:55:42 -06:00
config.rpath Add file needed for some autotools version. 2013-07-17 15:03:28 +02:00
configure.ac configure: fix binary crate name in hint message if bindgen is not found 2025-11-22 13:51:24 +00:00
COPYING GPL license sync with official gpl-2.0.txt 2015-10-08 10:53:45 +02:00
doxygen.cfg http: Use libhtp-rs. 2025-04-04 02:35:12 +02:00
libsuricata-config.in libsuricata-config: fix static library dependency order 2025-04-30 22:22:25 +02:00
LICENSE GPL license sync with official gpl-2.0.txt 2015-10-08 10:53:45 +02:00
Makefile.am build: add compile-commands target 2025-05-09 07:50:39 +02:00
README.md doc: adjust for master to main rename 2025-09-16 17:20:56 +02:00
requirements.txt requirements.txt: use suricata-update master 2025-11-01 03:46:31 +00:00
SECURITY.md security: update policy wrt CVE ID's 2024-02-14 07:04:27 +01:00
shell.nix misc: add rust analyzer and sphinx to shell.nix 2025-08-19 13:50:00 +02:00
suricata.yaml.in af-packet: disable hwtimestamp by default 2025-12-10 06:38:11 +00:00
threshold.config docs: update url to docs.suricata.io 2023-05-30 12:21:05 +02:00

Suricata

Fuzzing Status codecov

Introduction

Suricata is a network IDS, IPS and NSM engine developed by the OISF and the Suricata community.

Resources

Contributing

We're happily taking patches and other contributions. Please see our Contribution Process for how to get started.

Suricata is a complex piece of software dealing with mostly untrusted input. Mishandling this input will have serious consequences:

  • in IPS mode a crash may knock a network offline
  • in passive mode a compromise of the IDS may lead to loss of critical and confidential data
  • missed detection may lead to undetected compromise of the network

In other words, we think the stakes are pretty high, especially since in many common cases the IDS/IPS will be directly reachable by an attacker.

For this reason, we have developed a QA process that is quite extensive. A consequence is that contributing to Suricata can be a somewhat lengthy process.

On a high level, the steps are:

  1. GitHub-CI based checks. This runs automatically when a pull request is made.
  2. Review by devs from the team and community
  3. QA runs from private QA setups. These are private due to the nature of the test traffic.

Overview of Suricata's QA steps

OISF team members are able to submit builds to our private QA setup. It will run a series of build tests and a regression suite to confirm no existing features break.

The final QA runs takes a few hours minimally, and generally runs overnight. It currently runs:

  • extensive build tests on different OS', compilers, optimization levels, configure features
  • static code analysis using cppcheck, scan-build
  • runtime code analysis using valgrind, AddressSanitizer, LeakSanitizer
  • regression tests for past bugs
  • output validation of logging
  • unix socket testing
  • pcap based fuzz testing using ASAN and LSAN
  • traffic replay based IDS and IPS tests

Next to these tests, based on the type of code change further tests can be run manually:

  • traffic replay testing (multi-gigabit)
  • large pcap collection processing (multi-terabytes)
  • fuzz testing (might take multiple days or even weeks)
  • pcap based performance testing
  • live performance testing
  • various other manual tests based on evaluation of the proposed changes

It's important to realize that almost all of the tests above are used as acceptance tests. If something fails, it's up to you to address this in your code.

One step of the QA is currently run post-merge. We submit builds to the Coverity Scan program. Due to limitations of this (free) service, we can submit once a day max. Of course it can happen that after the merge the community will find issues. For both cases we request you to help address the issues as they may come up.

FAQ

Q: Will you accept my PR?

A: That depends on a number of things, including the code quality. With new features it also depends on whether the team and/or the community think the feature is useful, how much it affects other code and features, the risk of performance regressions, etc.

Q: When will my PR be merged?

A: It depends, if it's a major feature or considered a high risk change, it will probably go into the next major version.

Q: Why was my PR closed?

A: As documented in the Suricata GitHub workflow, we expect a new pull request for every change.

Normally, the team (or community) will give feedback on a pull request after which it is expected to be replaced by an improved PR. So look at the comments. If you disagree with the comments we can still discuss them in the closed PR.

If the PR was closed without comments it's likely due to QA failure. If the GitHub-CI checks failed, the PR should be fixed right away. No need for a discussion about it, unless you believe the QA failure is incorrect.

Q: The compiler/code analyser/tool is wrong, what now?

A: To assist in the automation of the QA, we're not accepting warnings or errors to stay. In some cases this could mean that we add a suppression if the tool supports that (e.g. valgrind, DrMemory). Some warnings can be disabled. In some exceptional cases the only 'solution' is to refactor the code to work around a static code checker limitation false positive. While frustrating, we prefer this over leaving warnings in the output. Warnings tend to get ignored and then increase risk of hiding other warnings.

Q: I think your QA test is wrong

A: If you really think it is, we can discuss how to improve it. But don't come to this conclusion too quickly, more often it's the code that turns out to be wrong.

Q: Do you require signing of a contributor license agreement?

A: Yes, we do this to keep the ownership of Suricata in one hand: the Open Information Security Foundation. See http://suricata.io/about/open-source/ and http://suricata.io/about/contribution-agreement/