events

package
v1.71.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: Apache-2.0, BSD-3-Clause, Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package events provides security event types that appsec can return in function calls it monitors when blocking them. It allows finer-grained integrations of appsec into your Go errors' management logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSecurityError

func IsSecurityError(err error) bool

IsSecurityError returns true if the error is a security event.

Types

type BlockingSecurityEvent

type BlockingSecurityEvent struct{}

BlockingSecurityEvent is the error type returned by function calls blocked by appsec. Even though appsec takes care of responding automatically to the blocked requests, it is your duty to abort the request handlers that are calling functions blocked by appsec. For instance, if a gRPC handler performs a SQL query blocked by appsec, the SQL query function call gets blocked and aborted by returning an error of type SecurityBlockingEvent. This allows you to safely abort your request handlers, and to be able to leverage errors.As if necessary in your Go error management logic to be able to tell if the error is a blocking security event or not (eg. to avoid retrying an HTTP client request).

func (*BlockingSecurityEvent) Error

func (*BlockingSecurityEvent) Error() string

Jump to

Keyboard shortcuts

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