nemo_microservices.types.shared.injection_detection#

Module Contents#

Classes#

API#

class nemo_microservices.types.shared.injection_detection.InjectionDetection(/, **data: typing.Any)#

Bases: nemo_microservices._models.BaseModel

action: Optional[str]#

None

Action to take.

Options are ‘reject’ to offer a rejection message, ‘omit’ to mask the offending content, and ‘sanitize’ to pass the content as-is in the safest way. These options are listed in descending order of relative safety. ‘sanitize’ is not implemented at this time.

injections: Optional[List[str]]#

None

The list of injection types to detect.

Options are ‘sqli’, ‘template’, ‘code’, ‘xss’.Currently, only SQL injection, template injection, code injection, and markdown cross-site scripting are supported. Custom rules can be added, provided they are in the yara_path and have a .yara file extension.

yara_rules: Optional[Dict[str, str]]#

None

Dictionary mapping rule names to YARA rule strings.

If provided, these rules will be used instead of loading rules from yara_path. Each rule should be a valid YARA rule string.