TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/tilsor/ModSecIntl_wace_lib/llms.txt
Use this file to discover all available pages before exploring further.
pluginmanager package defines the data types that flow between the WACElib core and the loaded .so plugins. These structs are used both as function arguments when calling plugin entry points and as message payloads when routing traffic through NATS for async or remote-sync execution. You will use these types when constructing payloads to pass to wace.Analyze and when implementing plugin interfaces.
HTTPHeader
A single HTTP header key-value pair.Header name, e.g.
"Content-Type" or "User-Agent".Header value, e.g.
"application/json".HTTPPayload
Represents the full HTTP transaction data available at a given processing phase. Populate only the fields that are available for the current phase; unused fields remain at their zero values.Request URI, e.g.
"/cgi-bin/process.cgi".HTTP request method, e.g.
"GET" or "POST".HTTP version string, e.g.
"HTTP/1.1".Slice of request header key-value pairs.
Raw request body as a string.
HTTP response protocol string, e.g.
"HTTP/1.1".HTTP response status code, e.g.
200 or 404.Slice of response header key-value pairs.
Raw response body as a string.
Example construction
ModelInput
The struct passed to a model plugin’sProcess function and serialised as a NATS message payload for async and remote-sync plugins.
The identifier of the transaction being scored.
The HTTP data to be analysed.
ModelResults
The struct returned by a model plugin’sProcess function and stored per-model in the transaction results map.
Probability that the transaction represents an attack. Expected range is
[0.0, 1.0], where 1.0 indicates the highest certainty of malicious
intent.Optional additional metadata produced by the model, such as feature
importance scores or raw logits. The decision plugin receives this map as
part of
DecisionInput.Results.DecisionInput
The struct passed to a decision plugin’sCheckResults function. Assembled by the PluginManager from all model results collected for the transaction.
The identifier of the transaction being evaluated.
Map from model plugin ID to that plugin’s
ModelResults for this
transaction. Contains one entry per model that completed successfully.Map from model plugin ID to the weight declared in the configuration. Mirrors
the keys of
Results; used by the decision plugin when combining scores.Key-value pairs from the WAF engine, forwarded unchanged from the
wafParams argument of wace.CheckTransaction. Typically contains ModSecurity
anomaly score keys such as COMBINED_SCORE, inbound_blocking, and
inbound_threshold.ModelStatus
An internal status struct used by thePluginManager to communicate the outcome of a single plugin execution back to the coordinating goroutine via a channel.
ID of the model plugin that produced this status.
The
ProbAttack value from the model’s ModelResults. Zero when Err is
non-nil.Non-nil if the plugin failed to process the input. A non-nil error does not
abort the transaction; WACElib logs the error and continues waiting for other
plugins.
ModelStatus is used internally by the PluginManager and is not part of
the plugin interface contract. Plugin authors receive and return ModelInput
and ModelResults only.