coraza

package
v0.1.0-beta.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadAndValidateSeclangDirectives

func LoadAndValidateSeclangDirectives(directives []types.SeclangDirective) (coraza.WAF, error)

LoadAndValidateSeclangDirectives takes a slice of parsed SeclangDirective from the crslang/types package, converts them back to a valid SecLang string (using the built-in ToSeclang() method), loads them into a fresh Coraza WAF instance with the embedded CRS phrase-list root FS, and returns the WAF + any error.

If the returned error is nil → the rules are syntactically valid and were successfully compiled by Coraza's SecLang parser.

func LoadAndValidateSeclangDirectivesWithFS

func LoadAndValidateSeclangDirectivesWithFS(directives []types.SeclangDirective, root fs.FS) (coraza.WAF, error)

LoadAndValidateSeclangDirectivesWithFS loads directives with an optional root FS so @pmFromFile basenames resolve via fs.Open(basename) / relative paths. When root is nil, Coraza uses the default (host) filesystem.

Types

This section is empty.

Directories

Path Synopsis
Package crsdata embeds stock OWASP CRS *.data phrase lists used by @pmFromFile for operator-side Coraza validation (WithRootFS).
Package crsdata embeds stock OWASP CRS *.data phrase lists used by @pmFromFile for operator-side Coraza validation (WithRootFS).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL