config

package
v0.0.0-...-653ea31 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package config defines configuration utilities for appsec

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEnabled

func IsEnabled() (enabled bool, set bool, err error)

IsEnabled returns true when appsec is enabled when the environment variable It also returns whether the env var is actually set in the env or not DD_APPSEC_ENABLED is set to true.

func IsStandalone

func IsStandalone() bool

IsStandalone returns whether appsec is used as a standalone product (without APM tracing) or not

Types

type Config

type Config struct {
	// Rules is the security rules loaded via the env var DD_APPSEC_RULES.
	// When not set, the builtin rules will be used.
	Rules []byte
	// WafTimeout is the maximum WAF execution time
	WafTimeout time.Duration
	// TraceRateLimit is the rate limit of AppSec traces (per second).
	TraceRateLimit uint
	// Obfuscator is the configuration for sensitive data obfuscation (in-WAF)
	Obfuscator appsec.ObfuscatorConfig
	// APISec is the configuration for API Security schema collection
	APISec appsec.APISecConfig
}

Config is the AppSec configuration.

func NewConfig

func NewConfig() (*Config, error)

NewConfig returns a new appsec configuration read from the environment

type StartOption

type StartOption func(c *Config)

StartOption is used to customize the AppSec configuration when invoked with appsec.Start()

Jump to

Keyboard shortcuts

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