-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
37 lines (26 loc) · 887 Bytes
/
config.py
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
30
31
32
33
34
35
36
37
import os
from version import VERSION
class Config:
VERSION = VERSION
SECRET_KEY = os.environ.get('SECRET_KEY', '')
REQUEST_DATA = {
"format": "json",
"backend": "es",
}
USER_AGENT = ('Cisco Threat Response Integrations '
'<tr-integrations-support@cisco.com>')
API_URL = 'https://www.c1fapp.com/cifapp/api/'
CONFIDENCE_MAPPING = {
range(26): 'Low',
range(26, 80): 'Medium',
range(80, 101): 'High'
}
CTR_ENTITIES_LIMIT_DEFAULT = 100
CTR_ENTITIES_LIMIT_MAX = 1000
try:
CTR_ENTITIES_LIMIT = int(os.environ['CTR_ENTITIES_LIMIT'])
assert CTR_ENTITIES_LIMIT > 0
except (KeyError, ValueError, AssertionError):
CTR_ENTITIES_LIMIT = CTR_ENTITIES_LIMIT_DEFAULT
if CTR_ENTITIES_LIMIT > CTR_ENTITIES_LIMIT_MAX:
CTR_ENTITIES_LIMIT = CTR_ENTITIES_LIMIT_MAX