feat: Stripe-Key-Checker, Krea AI Pattern, Scan-Progress-Tracking
- StripeKeyChecker: 2-Schritt-Check (/v1/balance + /v1/account), Live/Test-Erkennung, Balance, Account-Details - KeyPatterns: Stripe-Patterns einkommentiert (sk_live_, sk_test_), Krea AI Pattern (UUID:Token), Mindest-Suchlänge 4 - KeyScannerService: Stripe-Check integriert, Auto-Check nach Scan entfernt (manuell separat), Progress-Tracking (Phase, Detail, Current/Total, KeysFound) - ApiKeysEndpoint: Stripe in HandleCheck/HandleCheckAll/HandleAdopt, Progress im Status-Endpoint - Frontend: Live-Fortschrittsanzeige mit Spinner, Phase, Query, Counter, Polling 1.5s, Krea AI in typeNames/typeIcons
This commit is contained in:
1 parent
122000487c
commit
3cd35ebbfa
6 files changed
+326
-14
No files matched your search
@@ -19,6 +19,9 @@ public static class KeyPatterns
|
||||
(@"sk-ant-oat01-[A-Za-z0-9_\-]{95}", "sk-ant-oat01", "anthropic_oauth"),
|
||||
(@"sk-ant-api03-[A-Za-z0-9_\-]{95}", "sk-ant-api03", "anthropic_api"),
|
||||
|
||||
// Krea AI (UUID:Base32Token)
|
||||
(@"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}:[A-Za-z0-9]{32}", "krea", "krea_ai"),
|
||||
|
||||
// OpenAI
|
||||
(@"sk-proj-[A-Za-z0-9_\-]{80,200}", "sk-proj-", "openai_project"),
|
||||
(@"sk-svcacct-[A-Za-z0-9_\-]{80,200}", "sk-svcacct-", "openai_service"),
|
||||
@@ -56,7 +59,7 @@ public static class KeyPatterns
|
||||
/// Filtert zu generische Suchterme aus (z.B. "sk-", "SG.", "SK").
|
||||
/// </summary>
|
||||
public static readonly (string Pattern, string SearchTerm, string Type)[] ForCodeSearch =
|
||||
All.Where(p => p.SearchTerm.Length >= 5).ToArray();
|
||||
All.Where(p => p.SearchTerm.Length >= 4).ToArray();
|
||||
|
||||
// ── Kompilierte Regexe (einmalig, alle Patterns) ──
|
||||
|
||||
@@ -84,6 +87,9 @@ public static class KeyPatterns
|
||||
if (key.StartsWith("hf_", StringComparison.Ordinal)) return "huggingface";
|
||||
if (key.StartsWith("SG.", StringComparison.Ordinal)) return "sendgrid";
|
||||
if (key.StartsWith("xoxb-", StringComparison.Ordinal)) return "slack";
|
||||
// Krea AI: UUID:Token Format
|
||||
if (key.Length == 69 && key[8] == '-' && key[13] == '-' && key[18] == '-' && key[23] == '-' && key[36] == ':')
|
||||
return "krea_ai";
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
@@ -114,6 +120,7 @@ public static class KeyPatterns
|
||||
"stripe_test" => "Stripe Test",
|
||||
"sendgrid" => "SendGrid",
|
||||
"slack" => "Slack",
|
||||
"krea_ai" => "Krea AI",
|
||||
_ => type
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user