Documentation
¶
Overview ¶
Package engine compiles a feed's rules into what the sensor can run, and reports, per rule, whether it compiled. That report is the whole basis for the console calling a rule "protecting": a rule this package could not compile, or has no engine for, is never shown as running.
Engines:
- MODSECURITY and the generated virtual patches in that format run on Coraza, in detection-only mode: Coraza says which rule matched and the verdict engine decides what to do about it.
- REGEX_L7 runs on Go's RE2. A pattern that needs PCRE (lookaround, backreferences) is rejected with that reason rather than approximated.
- STIX and OpenIOC become sets of domains, IP addresses and file hashes for the egress proxy, the DNS check and the file scan.
Snort, Suricata, YARA, Sigma, AWS WAF, Cloudflare and nginx rules are loaded as no-engine: this sensor build cannot run them, and says so.
Index ¶
Constants ¶
const ( Compiled = "compiled" Rejected = "rejected" NoEngine = "no-engine" )
Load statuses, as the runtime API names them.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IOCSet ¶
type IOCSet struct {
Domains map[string]decide.RuleRef
IPs map[string]decide.RuleRef
Hashes map[string]decide.RuleRef
}
IOCSet is the indicators the sensor can check without a rule engine: a domain someone resolves or connects to, an address someone connects to, a file hash on disk. Each indicator remembers the rule it came from, so a hit is reported against that rule.