-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstants.py
More file actions
29 lines (23 loc) · 957 Bytes
/
Copy pathconstants.py
File metadata and controls
29 lines (23 loc) · 957 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from enum import Enum
class ErrorCode(Enum):
NORMALIZATION_ERROR = "NORMALIZATION_ERROR"
READ_FILE_EXEC_ERROR = "READ_FILE_EXEC_ERROR"
UNSUPPORTED_TOOL = "UNSUPPORTED_TOOL"
class EventType(Enum):
REQUEST_RECEIVED = "request_received"
REQUEST_NORMALIZED = "request_normalized"
POLICY_DECIDED = "policy_decided"
REQUEST_DENIED = "request_denied"
EXECUTION_STARTED = "execution_started"
EXECUTION_FINISHED = "execution_finished"
EXECUTION_FAILED = "execution_failed"
REQUEST_FAILED = "request_failed"
class RuleName(Enum):
TOOL_WHITELIST = "tool_whitelist"
READ_FILE_PATH_TYPE = "read_file.path_type"
READ_FILE_PATH_PREFIX = "read_file.path_prefix"
HTTP_FETCH_URL_TYPE = "http_fetch.url_type"
HTTP_FETCH_SCHEME = "http_fetch.scheme"
HTTP_FETCH_PRIVATE_TARGET = "http_fetch.private_target"
HTTP_FETCH_DOMAIN_WHITELIST = "http_fetch.domain_whitelist"
BASE_ALLOW = "base_allow"