Module constants

Module constants 

Source
Expand description

Constants for LLM security operations

Constantsยง

CHAIN_OF_THOUGHT_RISK_SCORE
Risk score for chain-of-thought manipulation
CONTEXT_INJECTION_RISK_SCORE
Risk score for context injection
DEFAULT_HIGH_RISK_THRESHOLD
Default high-risk threshold for prompt injection
DEFAULT_MALICIOUS_THRESHOLD
Default confidence threshold for malicious detection
DEFAULT_MAX_CODE_SIZE_BYTES
Default maximum code size in bytes (1MB)
DEFAULT_MAX_LLM_CALLS_PER_HOUR
Default maximum LLM calls per hour
DEFAULT_MAX_OUTPUT_SIZE
Default maximum output size for validation
FEW_SHOT_POISONING_RISK_SCORE
Risk score for few-shot poisoning
HIDDEN_UNICODE_RISK_SCORE
Risk score for hidden unicode detection
HOMOGLYPH_RISK_SCORE
Risk score for homoglyph detection
KEYWORD_RISK_SCORE
Risk score for dangerous keyword matches
MARKDOWN_MANIPULATION_RISK_SCORE
Risk score for markdown manipulation detection
MAX_ALTERNATING_CASE_RATIO
Maximum alternating case ratio for steganography detection
MAX_SPACING_RATIO
Maximum spacing ratio for steganography detection
MAX_SPECIAL_CHAR_RATIO
Maximum special character ratio before flagging
MAX_UTF16_NULL_RATIO
Maximum UTF-16 null byte ratio for mixed encoding detection
MULTIPLE_ENCODING_RISK_SCORE
Risk score for multiple encoding layers
REGEX_DOS_RISK_SCORE
Risk score for regex DoS patterns
REGEX_PATTERN_RISK_SCORE
Risk score for regex pattern matches
RTL_OVERRIDE_RISK_SCORE
Risk score for RTL override detection
SEMANTIC_CLOAKING_RISK_SCORE
Risk score for semantic cloaking detection
SPECIAL_CHAR_RISK_SCORE
Risk score for special character ratio
STEGANOGRAPHY_RISK_SCORE
Risk score for steganography detection