appsec_rule

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModsecurityRuleType = "modsecurity"
)

Variables

This section is empty.

Functions

func SupportedTypes

func SupportedTypes() []string

Types

type CustomRule

type CustomRule struct {
	Name string `yaml:"name"`

	Zones     []string `yaml:"zones"`
	Variables []string `yaml:"variables"`

	Match     Match        `yaml:"match"`
	Transform []string     `yaml:"transform"` //t:lowercase, t:uppercase, etc
	And       []CustomRule `yaml:"and,omitempty"`
	Or        []CustomRule `yaml:"or,omitempty"`

	BodyType string `yaml:"body_type,omitempty"`
}

func (*CustomRule) Convert

func (v *CustomRule) Convert(ruleType string, appsecRuleName string) (string, []uint32, error)

type Match

type Match struct {
	Type  string `yaml:"type"`
	Value string `yaml:"value"`
	Not   bool   `yaml:"not,omitempty"`
}

type ModsecurityRule

type ModsecurityRule struct {
	// contains filtered or unexported fields
}

func (*ModsecurityRule) Build

func (m *ModsecurityRule) Build(rule *CustomRule, appsecRuleName string) (string, []uint32, error)

Jump to

Keyboard shortcuts

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