Commit fcc87b7
fix(monitor): Discord 'Scan Finished' always reported 100 findings
RunScanInProcess passed a percent-complete flag (0 or 100, named 'progress')
into SendScanNotification's findings-count parameter, so every completed scan's
Discord notification said 'Result: 100 findings discovered' regardless of
actual matches -- visibly wrong for e.g. the global nuclei scan that matched 0
hosts (UI correctly showed 0 rows / no parseable findings). This was previously
silent: SendScanNotification's switch only handled event 'finish', not
'complete' (fixed earlier this session), so this notification never actually
sent until that fix shipped -- which is what surfaced the wrong count now.
Use the DB record's FilesUploaded (set via db.UpdateScanStats by the module,
e.g. pipeline/global-nuclei match counts) instead, so the Discord count matches
what the Scan Results page shows.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 9c13eaf commit fcc87b7
1 file changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
183 | | - | |
184 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
185 | 189 | | |
186 | 190 | | |
187 | | - | |
| 191 | + | |
188 | 192 | | |
189 | 193 | | |
190 | 194 | | |
| |||
0 commit comments