Skip to content

Commit 02c8a22

Browse files
committed
πŸ“š Add notification fixes documentation and update config
- Added NOTIFICATION_FIXES.md explaining all the issues that were resolved - Updated vulfy-automation.toml with proper high severity filtering - Documentation shows before/after examples of improved notifications
1 parent 8c6d0f0 commit 02c8a22

File tree

2 files changed

+87
-3
lines changed

2 files changed

+87
-3
lines changed

β€ŽNOTIFICATION_FIXES.mdβ€Ž

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# πŸ”§ Notification System Fixes
2+
3+
## Issues Fixed
4+
5+
### 1. **Severity Filtering Not Working** βœ… FIXED
6+
**Problem:** Your config had `min_severity = "high"` but you were still getting low severity notifications.
7+
8+
**Root Cause:**
9+
- CVSS severity parsing was incomplete
10+
- Vulnerabilities weren't filtered before creating notifications
11+
- String comparison instead of proper severity level comparison
12+
13+
**Solution:**
14+
- βœ… Enhanced CVSS parsing with proper base score extraction
15+
- βœ… Added severity filtering BEFORE notification creation
16+
- βœ… Improved severity level comparison logic
17+
18+
### 2. **Notifications Lack Vulnerability Details** βœ… FIXED
19+
**Problem:** Notifications only showed counts, not actual vulnerability titles or details.
20+
21+
**Before:**
22+
```
23+
🟒 Security Alert: 31 New Vulnerabilities Found
24+
Found 31 vulnerabilities in repository juice-shop on branch master. 31 are newly discovered.
25+
```
26+
27+
**After:**
28+
```
29+
πŸ”₯ 2 High, 1 Critical Vulnerabilities Found
30+
31+
πŸ” Repository: juice-shop
32+
πŸ“‹ Branch: master
33+
34+
πŸ“Š Severity Breakdown:
35+
πŸ”₯ Critical: 1 vulnerabilities
36+
🟠 High: 2 vulnerabilities
37+
38+
🎯 Top Vulnerabilities:
39+
1. πŸ”₯ **Cross-site Scripting in user profile functionality**
40+
2. 🟠 **SQL Injection vulnerability in search feature**
41+
3. 🟠 **Authentication bypass in admin panel**
42+
```
43+
44+
### 3. **Wrong Severity Colors and Emojis** βœ… FIXED
45+
**Problem:** Low severity issues showed green emoji but were marked as alerts.
46+
47+
**Fixed:**
48+
- πŸ”₯ Critical (Crimson Red)
49+
- 🟠 High (Orange Red)
50+
- 🟑 Medium (Gold)
51+
- 🟒 Low (Lime Green)
52+
53+
## How It Works Now
54+
55+
### Severity Filtering
56+
1. **CVSS Score Parsing**: Extracts base scores from CVSS strings
57+
- 9.0-10.0 = Critical
58+
- 7.0-8.9 = High
59+
- 4.0-6.9 = Medium
60+
- 0.1-3.9 = Low
61+
62+
2. **Impact Analysis**: For CVSS without base scores, analyzes C:H/I:H/A:H impact
63+
3. **String Matching**: Handles simple "high", "medium", "low" severity strings
64+
65+
### Rich Notifications
66+
- **Severity Breakdown**: Shows count per severity level
67+
- **Top Vulnerabilities**: Lists up to 5 most severe with titles
68+
- **Better Formatting**: Rich text with emojis and proper Discord/Slack formatting
69+
- **Truncation Handling**: Prevents message overflow
70+
71+
## Testing Your Setup
72+
73+
1. **Update your webhook URL** in `vulfy-automation.toml`
74+
2. **Set desired severity**: `min_severity = "high"` (or "critical", "medium", "low")
75+
3. **Run a test scan**: `vulfy automation run`
76+
77+
## Expected Results
78+
79+
With `min_severity = "high"`:
80+
- ❌ Low and Medium severity vulnerabilities filtered out
81+
- βœ… Only High and Critical vulnerabilities in notifications
82+
- βœ… Rich details with vulnerability titles and breakdown
83+
- βœ… Proper color coding and emojis
84+
85+
The notification system now works as expected! πŸŽ‰

β€Žvulfy-automation.tomlβ€Ž

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ timezone = "UTC"
1313
enabled = true
1414

1515
[notifications.filters]
16-
min_severity = "medium"
16+
min_severity = "high"
1717
# Temporarily set to false until persistent storage is implemented
1818
only_new_vulnerabilities = false
1919

@@ -25,8 +25,7 @@ name = "Discord Security Channel"
2525
# Get these from Discord: Server Settings -> Integrations -> Webhooks -> Create Webhook
2626
url = "https://discord.com/api/webhooks/YOUR_WEBHOOK_ID/YOUR_WEBHOOK_TOKEN"
2727
webhook_type = "discord"
28-
# Set to false until webhook URL is updated
29-
enabled = false
28+
enabled = true
3029

3130
[storage]
3231
database_path = "vulfy_automation.db"

0 commit comments

Comments
Β (0)