A Go library for parsing and manipulating Snort and Suricata IDS/IPS rules with Suricata compatibility focus.
gonids is a Go library for parsing, creating, and optimizing Intrusion Detection System (IDS) and Intrusion Prevention System (IPS) rules used by Suricata and Snort. It solves the problem of programmatically manipulating complex rule syntax for security automation, tooling, and analysis.
Security engineers, DevOps professionals, and developers building security automation tools, rule management systems, or integrations with Suricata/Snort deployments.
It offers a Suricata-focused, correct parser in Go with optimization utilities, enabling reliable rule manipulation without manual string handling, which is especially valuable for large-scale rule management and CI/CD pipelines.
gonids is a library to parse IDS rules, with a focus primarily on Suricata rule compatibility. There is a discussion forum available that you can join on Google Groups: https://groups.google.com/forum/#!topic/gonids/
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Includes methods like OptimizeHTTP() to adapt Snort rules for Suricata's HTTP parsing engine, as shown in the README example for optimizing HTTP rules.
Supports Suricata-specific sticky buffers like dns_query for precise content matching, demonstrated in the DNS rule creation example with StickyBuffer function.
Parses Snort and Suricata rule syntax into structured Go objects, ensuring correctness for automation workflows, as evidenced by the ParseRule function in the quick start.
Allows creation of IDS rules with proper formatting through Go structs, enabling dynamic rule generation, as illustrated in the rule construction example.
Only supports Suricata and Snort rules, excluding other popular IDS like Bro/Zeek or commercial solutions, which limits its applicability in heterogeneous environments.
Building rules requires detailed knowledge of Go structs and IDS syntax, as seen in the DNS rule example, which can be error-prone and time-consuming for newcomers.
While it parses and builds rules, it doesn't validate them against actual IDS engines, risking deployment of malformed rules without external testing.