Skip to content

Self-hosted OSINT exposure checker — is your email, username, phone or password leaked? Keyless sources: breaches, infostealer logs, COMB credentials, HIBP k-anonymity, 200-platform username grid. Docker one-command install, no API keys, no AI, Apache-2.0.

sync(ec): portable token() - provider when present, env fallback standalone

RanaKhan772377f9c6839b
diff --git a/app/Modules/Osint/Sources/GitHubCommitEmailSource.php b/app/Modules/Osint/Sources/GitHubCommitEmailSource.php
index 85ea4bb..7f3ee57 100644
--- a/app/Modules/Osint/Sources/GitHubCommitEmailSource.php
+++ b/app/Modules/Osint/Sources/GitHubCommitEmailSource.php
@@ -234,9 +234,12 @@ class GitHubCommitEmailSource implements OsintSource
return $h;
}
- /** Server PAT (optional) — same discovery order as GitHubPublicSource. */
+ /** Works in the platform (DB-backed provider) and the standalone repo (env fallback). */
private function token(): string
{
+ if (class_exists(\App\Services\GitHubTokenProvider::class)) {
+ return (string) (\App\Services\GitHubTokenProvider::get() ?? '');
+ }
if (!empty($_ENV['GITHUB_API_TOKEN'])) {
return (string) $_ENV['GITHUB_API_TOKEN'];
}
diff --git a/app/Modules/Osint/Sources/GitHubPublicSource.php b/app/Modules/Osint/Sources/GitHubPublicSource.php
index 6b4b557..b9f062b 100644
--- a/app/Modules/Osint/Sources/GitHubPublicSource.php
+++ b/app/Modules/Osint/Sources/GitHubPublicSource.php
@@ -269,9 +269,12 @@ class GitHubPublicSource implements OsintSource
return $h;
}
- /** Server PAT (optional) — same discovery order as GitHubRepoService. */
+ /** Works in the platform (DB-backed provider) and the standalone repo (env fallback). */
private function token(): string
{
+ if (class_exists(\App\Services\GitHubTokenProvider::class)) {
+ return (string) (\App\Services\GitHubTokenProvider::get() ?? '');
+ }
if (!empty($_ENV['GITHUB_API_TOKEN'])) {
return (string) $_ENV['GITHUB_API_TOKEN'];
}