webhook templates
This commit is contained in:
41
app/web/templates/webhook_presets/discord.j2
Normal file
41
app/web/templates/webhook_presets/discord.j2
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"username": "SneakyScanner",
|
||||
"embeds": [
|
||||
{
|
||||
"title": "{{ alert.type|title|replace('_', ' ') }} Alert",
|
||||
"description": "{{ alert.message }}",
|
||||
"color": {% if alert.severity == 'critical' %}15158332{% elif alert.severity == 'warning' %}16776960{% else %}3447003{% endif %},
|
||||
"fields": [
|
||||
{
|
||||
"name": "Severity",
|
||||
"value": "{{ alert.severity|upper }}",
|
||||
"inline": true
|
||||
},
|
||||
{
|
||||
"name": "Scan",
|
||||
"value": "{{ scan.title }}",
|
||||
"inline": true
|
||||
},
|
||||
{
|
||||
"name": "Rule",
|
||||
"value": "{{ rule.name }}",
|
||||
"inline": false
|
||||
}{% if alert.ip_address %},
|
||||
{
|
||||
"name": "IP Address",
|
||||
"value": "{{ alert.ip_address }}",
|
||||
"inline": true
|
||||
}{% endif %}{% if alert.port %},
|
||||
{
|
||||
"name": "Port",
|
||||
"value": "{{ alert.port }}",
|
||||
"inline": true
|
||||
}{% endif %}
|
||||
],
|
||||
"footer": {
|
||||
"text": "Alert ID: {{ alert.id }} | Scan ID: {{ scan.id }}"
|
||||
},
|
||||
"timestamp": "{{ timestamp.isoformat() }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user