feat: Serper.dev Google-Dork-Integration für Key-Scanner

- ScanSerper() durchsucht Google via Serper.dev nach geleakten API-Keys
- Exakte Phrase-Suche pro KeyPattern, bis zu 100 Ergebnisse pro Query
- Keys aus Snippets und Titles via Regex extrahiert
- Source-Feld (github/serper/gist/pastebin) in ScannedKeyRecord + DB-Migration
- RunScan() kombiniert GitHub + Serper mit Deduplizierung
- Service startet auch wenn nur SerperApiKey konfiguriert ist
- Frontend: Source-Icons und verkürzte URLs für Nicht-GitHub-Quellen
- Config: SerperApiKey in appsettings.json
This commit is contained in:
Meleki committed 2026-03-13 06:26:43 +01:00
1 parent 2cf9e1e849
commit 22d966b830
7 files changed
+108 -15

No files matched your search

+5 -1
View File
@@ -351,13 +351,17 @@ registerPage('api-keys', {
nameSpan.href = sk.sourceUrl;
nameSpan.target = '_blank';
nameSpan.rel = 'noopener';
nameSpan.textContent = sk.sourceUrl.replace('https://github.com/', '');
var displayUrl = sk.sourceUrl.replace('https://github.com/', '').replace('https://www.', '').replace('https://', '');
if (displayUrl.length > 80) displayUrl = displayUrl.substring(0, 77) + '…';
nameSpan.textContent = displayUrl;
info.appendChild(nameSpan);
}
var metaSpan = document.createElement('span');
metaSpan.className = 'admin-user-meta';
var metaParts = [];
var sourceIcons = { github: '🐙 GitHub', serper: '🔍 Google', gist: '📋 Gist', pastebin: '📄 Pastebin' };
metaParts.push(sourceIcons[sk.source] || sk.source || 'github');
metaParts.push(formatKeyStatus(sk.status));
if (sk.plan && sk.plan !== 'Unknown') metaParts.push(sk.plan);
if (sk.checkedAt) metaParts.push(new Date(sk.checkedAt).toLocaleString());