-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
88 lines (70 loc) · 2.22 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import os
from datetime import timedelta
from uuid import NAMESPACE_X500
from version import VERSION
class Config:
VERSION = VERSION
SECRET_KEY = os.environ.get('SECRET_KEY', None)
API_URL = 'https://signals.api.auth0.com/'
UI_URL = 'https://auth0.com/signals/ip/{value}-report'
USER_AGENT = ('Cisco Threat Response Integrations '
'<[email protected]>')
SCORE_MAPPING = {
0: {
"disposition": 5,
"disposition_name": "Unknown",
},
-1: {
"disposition": 3,
"disposition_name": "Suspicious",
},
-2: {
"disposition": 3,
"disposition_name": "Suspicious",
},
-3: {
"disposition": 2,
"disposition_name": "Malicious",
}
}
REASON_MAPPING = {
'baddomain': 'Associated hostname found on blocklist',
'badip': 'IP found on blocklist',
'history': 'IP found on blocklist in recent past'
}
CTIM_SCHEMA_VERSION = '1.0.17'
CTIM_JUDGEMENT_DEFAULTS = {
'type': 'judgement',
'disposition': 3,
'disposition_name': 'Suspicious',
'schema_version': CTIM_SCHEMA_VERSION,
'source': 'Auth0 Signals Report',
'confidence': 'High',
'severity': 'Medium',
'priority': 90,
}
SEVERITY_MAPPING = {'1': 'High', '5': 'Medium', '10': 'Info'}
CTIM_SIGHTING_DEFAULTS = {
'type': 'sighting',
'count': 1,
'confidence': 'High',
'schema_version': CTIM_SCHEMA_VERSION,
'description': 'Found on blocklist'
}
CTIM_INDICATOR_DEFAULTS = {
'type': 'indicator',
'schema_version': CTIM_SCHEMA_VERSION
}
CTIM_RELATIONSHIP_DEFAULTS = {
'type': 'relationship',
'relationship_type': 'member-of',
'schema_version': CTIM_SCHEMA_VERSION
}
CTR_DEFAULT_ENTITIES_LIMIT = 100
try:
CTR_ENTITIES_LIMIT = int(os.environ['CTR_ENTITIES_LIMIT'])
assert CTR_ENTITIES_LIMIT > 0
except (KeyError, ValueError, AssertionError):
CTR_ENTITIES_LIMIT = CTR_DEFAULT_ENTITIES_LIMIT
ENTITY_RELEVANCE_PERIOD = timedelta(days=7)
NAMESPACE_BASE = NAMESPACE_X500