crsdata

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: 4 Imported by: 0

Documentation

Overview

Package crsdata embeds stock OWASP CRS *.data phrase lists used by @pmFromFile for operator-side Coraza validation (WithRootFS). Keep in sync with modsecurity-proxy-wasm @crs-data catalog assets.

Index

Constants

View Source
const AnnotationAllowCRSOverride = "seclang.kubewaf.io/allow-crs-override"

AnnotationAllowCRSOverride must be set to "true" on a PhraseList whose fileName is a stock CRS basename before the dataplane will inject an override.

Variables

View Source
var Basenames = []string{
	"ai-critical-artifacts.data",
	"asp-dotnet-errors.data",
	"iis-errors.data",
	"java-classes.data",
	"lfi-os-files.data",
	"php-errors.data",
	"php-function-names-933150.data",
	"php-variables.data",
	"restricted-files.data",
	"restricted-upload.data",
	"ruby-errors.data",
	"scanners-user-agents.data",
	"sql-errors.data",
	"ssrf-no-scheme.data",
	"ssrf.data",
	"unix-shell-aliases.data",
	"unix-shell-builtins.data",
	"unix-shell.data",
	"web-shells-asp.data",
	"web-shells-php.data",
	"windows-powershell-commands.data",
}

Known basenames (21 catalog assets). Keep sorted.

Functions

func Available

func Available() bool

Available reports whether the embed pack loaded at least one .data file.

func IsKnown

func IsKnown(name string) bool

IsKnown reports whether name is a stock CRS @pmFromFile data file basename.

func MapFS

func MapFS(overrides map[string][]byte) fstest.MapFS

MapFS returns an fstest.MapFS with all embedded CRS data files keyed by basename. Optional overrides (basename → body) replace or add entries (PhraseList merge).

func Read

func Read(basename string) ([]byte, error)

Read returns the embedded body for a known basename, or nil if missing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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