Sub2API 一站式开源中转服务,让 Claude、Openai 、Gemini、Antigravity订阅统一接入,支持拼车共享,更高效分摊成本,原生工具无缝使用。
928 matches across 9 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | frontend/src/utils/platformColors.ts | 10 | // ── Badge (bg + text + border, for inline badges with border) ─────── |
| MEDIUM | frontend/src/utils/platformColors.ts | 19 | // ── Light badge (softer bg, no border) ────────────────────────────── |
| MEDIUM | frontend/src/utils/platformColors.ts | 27 | // ── Border ────────────────────────────────────────────────────────── |
| MEDIUM | frontend/src/utils/platformColors.ts | 36 | // ── Accent bar (gradient) ─────────────────────────────────────────── |
| MEDIUM | frontend/src/utils/platformColors.ts | 45 | // ── Text (price, icon) ───────────────────────────────────────────── |
| MEDIUM | frontend/src/utils/platformColors.ts | 54 | // ── Icon (check mark etc.) ────────────────────────────────────────── |
| MEDIUM | frontend/src/utils/platformColors.ts | 63 | // ── Button (solid bg) ─────────────────────────────────────────────── |
| MEDIUM | frontend/src/utils/platformColors.ts | 72 | // ── Discount badge ────────────────────────────────────────────────── |
| MEDIUM | frontend/src/utils/platformColors.ts | 81 | // ── Header gradient (subscription confirm) ───────────────────────── |
| MEDIUM | frontend/src/utils/platformColors.ts | 90 | // ── Header text (light text on gradient bg) ──────────────────────── |
| MEDIUM | frontend/src/utils/platformColors.ts | 107 | // ── Public API ────────────────────────────────────────────────────── |
| MEDIUM | frontend/src/components/admin/channel/types.ts | 77 | // ── 模型模式冲突检测 ────────────────────────────────────── |
| MEDIUM | frontend/src/components/admin/channel/types.ts | 116 | // ── 区间校验 ────────────────────────────────────────────── |
| MEDIUM | frontend/src/components/channels/SupportedModelChip.vue | 244 | // ── Popover positioning ───────────────────────────────────────────── |
| MEDIUM | frontend/src/api/admin/settings.ts | 19 | // ── 平台限额类型 ────────────────────────────────────────────────── |
| MEDIUM | frontend/src/api/admin/settings.ts | 418 | // ── 平台限额(嵌套 JSON,系统层 + 7 auth-source 层)──────────────────────────────── |
| MEDIUM | frontend/src/api/admin/settings.ts | 674 | // ── 平台限额(嵌套 JSON,系统层 + 7 auth-source 层)──────────────────────────────── |
| MEDIUM | deploy/docker-compose.local.yml | 20 | # ============================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 23 | # =========================================================================== |
| MEDIUM | deploy/docker-compose.local.yml | 25 | # =========================================================================== |
| MEDIUM | deploy/docker-compose.local.yml | 43 | # ======================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 45 | # ======================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 48 | # ======================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 50 | # ======================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 56 | # ======================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 58 | # ======================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 70 | # ======================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 72 | # ======================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 81 | # ======================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 83 | # ======================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 87 | # ======================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 89 | # ======================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 97 | # ======================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 99 | # ======================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 107 | # ======================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 115 | # ======================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 118 | # ======================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 120 | # ======================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 132 | # ======================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 134 | # ======================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 144 | # ======================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 146 | # ======================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 151 | # ======================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 153 | # ======================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 1 | # ============================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 3 | # ============================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 182 | # =========================================================================== |
| MEDIUM | deploy/docker-compose.local.yml | 184 | # =========================================================================== |
| MEDIUM | deploy/docker-compose.local.yml | 213 | # =========================================================================== |
| MEDIUM | deploy/docker-compose.local.yml | 215 | # =========================================================================== |
| MEDIUM | deploy/docker-compose.local.yml | 247 | # ============================================================================= |
| MEDIUM | deploy/docker-compose.local.yml | 249 | # ============================================================================= |
| MEDIUM | deploy/install.sh | 47 | # ============================================================ |
| MEDIUM | deploy/install.sh | 49 | # ============================================================ |
| MEDIUM | deploy/docker-deploy.sh | 2 | # ============================================================================= |
| MEDIUM | deploy/docker-deploy.sh | 4 | # ============================================================================= |
| MEDIUM | deploy/docker-deploy.sh | 12 | # ============================================================================= |
| MEDIUM | deploy/docker-compose.dev.yml | 1 | # ============================================================================= |
| MEDIUM | deploy/docker-compose.dev.yml | 3 | # ============================================================================= |
| MEDIUM | deploy/docker-compose.dev.yml | 9 | # ============================================================================= |
| 164 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | frontend/src/views/auth/README.md | 201 | |
| LOW | frontend/src/views/auth/USAGE_EXAMPLES.md | 1 | # Authentication Views Usage Examples |
| LOW | frontend/src/views/auth/USAGE_EXAMPLES.md | 21 | |
| LOW | frontend/src/views/auth/USAGE_EXAMPLES.md | 41 | ```typescript |
| LOW | frontend/src/views/auth/USAGE_EXAMPLES.md | 61 | // - On success: |
| LOW | deploy/docker-compose.local.yml | 1 | # ============================================================================= |
| LOW | deploy/docker-compose.local.yml | 81 | # ======================================================================= |
| LOW | deploy/docker-compose.local.yml | 101 | # a random key will be generated on each startup, causing all existing |
| LOW | deploy/docker-deploy.sh | 1 | #!/bin/bash |
| LOW | deploy/config.example.yaml | 1 | # Sub2API Configuration File |
| LOW | deploy/config.example.yaml | 21 | # 运行模式:"debug" 用于开发,"release" 用于生产环境 |
| LOW | deploy/config.example.yaml | 41 | # Max concurrent streams per connection |
| LOW | deploy/config.example.yaml | 61 | # Run mode: "standard" (default) or "simple" (for internal use) |
| LOW | deploy/config.example.yaml | 101 | # Allowed hosts for pricing data download |
| LOW | deploy/config.example.yaml | 121 | # Force-remove response headers from upstream |
| LOW | deploy/config.example.yaml | 141 | # 不影响 AI 账号网关连接。默认 false:fail-fast 防止 IP 泄露。 |
| LOW | deploy/config.example.yaml | 161 | # Max bytes to read for proxy probe responses (default: 1MB) |
| LOW | deploy/config.example.yaml | 181 | sora_model_filters: |
| LOW | deploy/config.example.yaml | 201 | # - account_proxy: 按账户+代理组合隔离(默认,最细粒度) |
| LOW | deploy/config.example.yaml | 221 | # 该模板作用于 `/v1/messages -> Responses/Codex` 转换链路,且发生在 Claude `system` |
| LOW | deploy/config.example.yaml | 341 | max_conns_per_host: 1024 |
| LOW | deploy/config.example.yaml | 361 | stream_keepalive_interval: 10 |
| LOW | deploy/config.example.yaml | 381 | # wait 模式等待图片并发槽位的超时时间(秒),0=不等待 |
| LOW | deploy/config.example.yaml | 401 | # Scheduling configuration |
| LOW | deploy/config.example.yaml | 441 | # 全量重建周期(秒),0 表示禁用 |
| LOW | deploy/config.example.yaml | 461 | level: "info" |
| LOW | deploy/config.example.yaml | 481 | # Enable file output (default path auto-derived) |
| LOW | deploy/config.example.yaml | 501 | # Compress rotated files |
| LOW | deploy/config.example.yaml | 521 | # ============================================================================= |
| LOW | deploy/config.example.yaml | 541 | max_poll_attempts: 600 |
| LOW | deploy/config.example.yaml | 561 | # Disable TLS fingerprint for Sora upstream |
| LOW | deploy/config.example.yaml | 581 | session_reuse_enabled: true |
| LOW | deploy/config.example.yaml | 601 | # Max download bytes |
| LOW | deploy/config.example.yaml | 621 | # Whether OpenAI refresh flow is allowed to sync linked Sora accounts |
| LOW | deploy/config.example.yaml | 641 | negative_ttl_seconds: 30 |
| LOW | deploy/config.example.yaml | 661 | # 新鲜阈值(秒);命中后处于该窗口视为新鲜数据 |
| LOW | deploy/config.example.yaml | 681 | # Lookback window (seconds) for late-arriving data |
| LOW | deploy/config.example.yaml | 701 | hourly_days: 180 |
| LOW | deploy/config.example.yaml | 721 | # 执行器轮询间隔(秒) |
| LOW | deploy/config.example.yaml | 741 | processing_timeout_seconds: 30 |
| LOW | deploy/config.example.yaml | 761 | # Database Configuration (PostgreSQL) |
| LOW | deploy/config.example.yaml | 781 | # SSL 模式:disable(禁用), prefer(优先加密,默认), require(要求), verify-ca(验证CA), verify-full(完全验证) |
| LOW | deploy/config.example.yaml | 801 | redis: |
| LOW | deploy/config.example.yaml | 821 | # 是否启用 TLS/SSL 连接 |
| LOW | deploy/config.example.yaml | 841 | jwt: |
| LOW | deploy/config.example.yaml | 861 | # 重要:设置固定的 TOTP 加密密钥。 |
| LOW | deploy/config.example.yaml | 941 | # 初始管理员账户(首次运行时创建) |
| LOW | deploy/config.example.yaml | 961 | # 费率倍数(影响计费计算) |
| LOW | deploy/config.example.yaml | 981 | # Hash verification URL (optional) |
| LOW | deploy/config.example.yaml | 1001 | billing: |
| LOW | deploy/config.example.yaml | 1021 | # Turnstile 人机验证配置 |
| LOW | deploy/config.example.yaml | 1041 | # 2. AI Studio OAuth(不需要 project_id) |
| LOW | deploy/config.example.yaml | 1061 | # Optional: local quota simulation for Gemini Code Assist (local billing). |
| LOW | deploy/config.example.yaml | 1081 | # Flash 模型每日请求数 |
| LOW | deploy/config.example.yaml | 1101 | # Proxy URL for accessing GitHub (used for online updates and pricing data) |
| LOW | deploy/docker-compose.yml | 1 | # ============================================================================= |
| LOW | deploy/docker-compose.yml | 81 | - ADMIN_PASSWORD=${ADMIN_PASSWORD:-} |
| LOW | deploy/docker-compose.yml | 101 | - TOTP_ENCRYPTION_KEY=${TOTP_ENCRYPTION_KEY:-} |
| LOW | deploy/docker-compose.standalone.yml | 1 | # ============================================================================= |
| LOW | backend/.golangci.yml | 61 | confidence: high |
| 264 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | frontend/src/composables/useSwipeSelect.ts | 284 | function shouldPreferNativeTextSelection(target: HTMLElement): boolean { |
| LOW | frontend/src/composables/useSwipeSelect.ts | 300 | function shouldPreferNativeSelectionOutsideRows(target: HTMLElement): boolean { |
| LOW | frontend/src/composables/useNavigationLoading.ts | 119 | export function useNavigationLoadingState() { |
| LOW | frontend/src/composables/useModelWhitelist.ts | 324 | export async function fetchAntigravityDefaultMappings(): Promise<{ from: string; to: string }[]> { |
| LOW | frontend/src/composables/useModelWhitelist.ts | 384 | export function getPresetMappingsByPlatform(platform: string) { |
| LOW | frontend/src/stores/adminSettings.ts | 88 | function setOpsMonitoringEnabledLocal(value: boolean) { |
| LOW | frontend/src/stores/adminSettings.ts | 94 | function setOpsRealtimeMonitoringEnabledLocal(value: boolean) { |
| LOW | frontend/src/stores/adminSettings.ts | 106 | function setOpsQueryModeDefaultLocal(value: string) { |
| LOW | frontend/src/stores/auth.ts | 31 | function normalizePendingAuthTokenField(value: unknown): PendingAuthTokenField { |
| LOW | frontend/src/stores/auth.ts | 35 | function getPersistedPendingAuthSession(): PendingAuthSessionSummary | null { |
| LOW | frontend/src/stores/auth.ts | 63 | function persistPendingAuthSession(session: PendingAuthSessionSummary): void { |
| LOW | frontend/src/stores/auth.ts | 67 | function clearPendingAuthSessionStorage(): void { |
| LOW | frontend/src/utils/registrationEmailPolicy.ts | 12 | export function normalizeRegistrationEmailSuffixDomain(raw: string): string { |
| LOW | frontend/src/utils/registrationEmailPolicy.ts | 22 | export function normalizeRegistrationEmailSuffixDomains( |
| LOW | frontend/src/utils/registrationEmailPolicy.ts | 42 | export function parseRegistrationEmailSuffixWhitelistInput(input: string): string[] { |
| LOW | frontend/src/utils/registrationEmailPolicy.ts | 62 | export function normalizeRegistrationEmailSuffixWhitelist( |
| LOW | frontend/src/utils/registrationEmailPolicy.ts | 68 | function extractRegistrationEmailDomain(email: string): string { |
| LOW | frontend/src/utils/registrationEmailPolicy.ts | 83 | export function isRegistrationEmailSuffixAllowed( |
| LOW | frontend/src/utils/registrationEmailPolicy.ts | 108 | export function formatRegistrationEmailSuffixWhitelistForMessage( |
| LOW | frontend/src/utils/registrationEmailPolicy.ts | 125 | function normalizeRegistrationEmailSuffixDomainStrict(raw: string): string { |
| LOW | frontend/src/utils/registrationEmailPolicy.ts | 134 | export function isRegistrationEmailSuffixDomainValid(domain: string): boolean { |
| LOW | frontend/src/utils/registrationEmailPolicy.ts | 144 | function normalizeRegistrationEmailSuffixToken(value: string, strict: boolean): string { |
| LOW | frontend/src/utils/registrationEmailPolicy.ts | 163 | function toCanonicalRegistrationEmailSuffix(domain: string): string { |
| LOW | frontend/src/utils/ccswitchImport.ts | 22 | export function resolveCcSwitchImportConfig( |
| LOW | frontend/src/utils/ccswitchImport.ts | 52 | export function buildCcSwitchImportDeeplink(input: CcSwitchImportDeeplinkInput): string { |
| LOW | frontend/src/utils/usageServiceTier.ts | 1 | export function normalizeUsageServiceTier(serviceTier?: string | null): string | null { |
| LOW | frontend/src/utils/platformColors.ts | 149 | export function platformGradientTextClass(p: string): string { |
| LOW | frontend/src/utils/platformColors.ts | 153 | export function platformGradientSubtextClass(p: string): string { |
| LOW | frontend/src/utils/subscriptionQuota.ts | 24 | export function getRemainingDurationParts( |
| LOW | frontend/src/utils/oauthAffiliate.ts | 10 | export function normalizeOAuthAffiliateCode(value?: unknown): string { |
| LOW | frontend/src/utils/oauthAffiliate.ts | 25 | export function storeAffiliateReferralCode(value?: unknown, now = Date.now()): void { |
| LOW | frontend/src/utils/oauthAffiliate.ts | 44 | export function loadAffiliateReferralCode(now = Date.now()): string { |
| LOW | frontend/src/utils/oauthAffiliate.ts | 67 | export function clearAffiliateReferralCode(): void { |
| LOW | frontend/src/utils/oauthAffiliate.ts | 78 | export function resolveAffiliateReferralCode(...values: unknown[]): string { |
| LOW | frontend/src/utils/oauthAffiliate.ts | 125 | export function clearAllAffiliateReferralCodes(): void { |
| LOW | frontend/src/utils/format.ts | 311 | export function formatCountdownWithSuffix(targetDate: string | Date | null | undefined): string | null { |
| LOW | frontend/src/utils/format.ts | 322 | export function formatRelativeWithDateTime(date: string | Date | null | undefined): string { |
| LOW | frontend/src/utils/usagePricing.ts | 24 | export function calculateTokenPricePerMillion( |
| LOW | frontend/src/utils/usagePricing.ts | 36 | export function formatTokenPricePerMillion( |
| LOW | frontend/src/components/payment/currency.ts | 8 | function paymentCurrencyFractionDigits(currency: string): number { |
| LOW | frontend/src/components/payment/paymentFlow.ts | 233 | export function createPaymentRecoverySnapshot( |
| LOW | frontend/src/components/payment/paymentFlow.ts | 243 | export function writePaymentRecoverySnapshot( |
| LOW | frontend/src/components/payment/paymentFlow.ts | 251 | export function clearPaymentRecoverySnapshot( |
| LOW | frontend/src/components/payment/paymentFlow.ts | 258 | export function readPaymentRecoverySnapshot( |
| LOW | …ntend/src/components/payment/PaymentProviderDialog.vue | 296 | function providerSupportsPaymentMode(providerKey: string): boolean { |
| LOW | …ts/admin/announcements/AnnouncementTargetingEditor.vue | 222 | function defaultSubscriptionCondition(): AnnouncementCondition { |
| LOW | …onents/user/profile/ProfileIdentityBindingsSection.vue | 311 | function resolveLegacyCompatibleWeChatSettings( |
| LOW | …onents/user/profile/ProfileIdentityBindingsSection.vue | 407 | function isProviderEnabledForBinding(provider: BindableProvider): boolean { |
| LOW | …nents/user/profile/__tests__/ProfileAvatarCard.spec.ts | 99 | function installAvatarCompressionMocks(blobSize = 8 * 1024) { |
| LOW | frontend/src/components/account/EditAccountModal.vue | 2492 | function parsePoolModeRetryStatusCodes(input: string): number[] { |
| LOW | frontend/src/components/account/EditAccountModal.vue | 2509 | function formatPoolModeRetryStatusCodes(value: unknown): string { |
| LOW | frontend/src/components/account/EditAccountModal.vue | 3517 | function formatTempUnschedKeywords(value: unknown) { |
| LOW | frontend/src/components/account/CreateAccountModal.vue | 3384 | function parsePoolModeRetryStatusCodes(input: string): number[] { |
| LOW | frontend/src/api/user.ts | 132 | function resolveWeChatOAuthBindingMode( |
| LOW | frontend/src/api/user.ts | 141 | export function buildOAuthBindingStartURL( |
| LOW | frontend/src/api/auth.ts | 227 | function serializeOAuthAdoptionDecision( |
| LOW | frontend/src/api/auth.ts | 254 | export function getPendingOAuthBindLoginKind( |
| LOW | frontend/src/api/auth.ts | 260 | export function isPendingOAuthCreateAccountRequired( |
| LOW | frontend/src/api/auth.ts | 266 | export function hasPendingOAuthSuggestedProfile( |
| LOW | frontend/src/api/auth.ts | 284 | export async function prepareOAuthBindAccessTokenCookie(): Promise<void> { |
| 210 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | frontend/src/stores/__tests__/app.spec.ts | 261 | contact_info: 'test@test.com', |
| LOW | frontend/src/stores/__tests__/auth.spec.ts | 42 | email: 'admin@example.com', |
| LOW | frontend/src/stores/__tests__/auth.spec.ts | 304 | store.register({ email: 'user@example.com', password: 'secret-123' }) |
| LOW | frontend/src/stores/__tests__/auth.spec.ts | 325 | await store.login({ email: 'admin@example.com', password: '123456' }) |
| LOW | …nd/src/utils/__tests__/registrationEmailPolicy.spec.ts | 83 | expect(isRegistrationEmailSuffixAllowed('user@example.com', [])).toBe(true) |
| LOW | …nd/src/utils/__tests__/registrationEmailPolicy.spec.ts | 87 | expect(isRegistrationEmailSuffixAllowed('user@example.com', ['@example.com'])).toBe(true) |
| LOW | …s/auth/__tests__/PendingOAuthCreateAccountForm.spec.ts | 67 | email: 'user@example.com', |
| LOW | …s/auth/__tests__/PendingOAuthCreateAccountForm.spec.ts | 142 | email: 'user@example.com' |
| LOW | …s/auth/__tests__/PendingOAuthCreateAccountForm.spec.ts | 157 | await wrapper.get('[data-testid="linuxdo-create-account-email"]').setValue('user@example.com') |
| LOW | …s/auth/__tests__/PendingOAuthCreateAccountForm.spec.ts | 201 | email: 'user@example.com', |
| LOW | …nd/src/views/auth/__tests__/WechatCallbackView.spec.ts | 586 | await emailInput.setValue('user@example.com') |
| LOW | frontend/src/views/setup/SetupWizardView.vue | 311 | placeholder="admin@example.com" |
| LOW | …/admin/ops/utils/__tests__/errorDetailResponse.spec.ts | 21 | user_email: 'user@example.com', |
| LOW | deploy/config.example.yaml | 942 | admin_email: "admin@example.com" |
| LOW | backend/internal/handler/auth_dingtalk_oauth_test.go | 158 | email: "user@example.com", |
| LOW | …kend/internal/handler/dto/user_mapper_activity_test.go | 20 | Email: "admin@example.com", |
| LOW | …kend/internal/handler/admin/admin_service_stub_test.go | 79 | Email: "user@example.com", |
| LOW | …kend/internal/handler/admin/admin_service_stub_test.go | 159 | user := service.User{ID: id, Email: "user@example.com", Status: service.StatusActive} |
| LOW | …kend/internal/repository/user_repo_integration_test.go | 502 | Email: "user@example.com", |
| LOW | backend/internal/repository/email_cache_test.go | 19 | email: "user@example.com", |
| LOW | backend/internal/setup/cli.go | 167 | cfg.Admin.Email = promptString(reader, "Admin Email", "admin@example.com") |
| LOW | backend/internal/server/middleware/admin_auth_test.go | 27 | Email: "admin@example.com", |
| LOW | backend/internal/service/auth_service_register_test.go | 412 | _, user, err := service.Register(context.Background(), "user@example.com", "password") |
| LOW | backend/internal/service/auth_service_register_test.go | 482 | Email: "test@test.com", |
| LOW | backend/internal/service/auth_service_register_test.go | 507 | require.Equal(t, "test@test.com", claims.Email) |
| LOW | backend/internal/service/auth_service_register_test.go | 513 | Email: "test@test.com", |
| LOW | backend/internal/service/auth_service_register_test.go | 558 | Email: "test@test.com", |
| LOW | …nd/internal/service/auth_service_identity_sync_test.go | 150 | token, user, err := svc.Register(ctx, "user@example.com", "password") |
| LOW | …nd/internal/service/auth_service_identity_sync_test.go | 165 | authidentity.ProviderSubjectEQ("user@example.com"), |
| LOW | backend/internal/service/balance_notify_service_test.go | 248 | {Email: "user@example.com", Verified: true}, |
| LOW | backend/internal/service/gateway_request_test.go | 1130 | b.WriteString(fmt.Sprintf(`{"role":"user","content":"This is user message number %d with some extra padding text to m |
| LOW | backend/internal/service/gateway_request_test.go | 1130 | b.WriteString(fmt.Sprintf(`{"role":"user","content":"This is user message number %d with some extra padding text to m |
| LOW | backend/internal/service/content_moderation_test.go | 1650 | UserEmail: "user@example.com", |
| LOW | backend/internal/service/content_moderation_test.go | 1666 | userRepo := &contentModerationTestUserRepo{user: &User{ID: 1001, Email: "user@example.com", Status: StatusDisabled}} |
| LOW | backend/internal/service/content_moderation_test.go | 1682 | userRepo := &contentModerationTestUserRepo{user: &User{ID: 1001, Email: "user@example.com", Status: StatusActive}} |
| LOW | …end/internal/service/registration_email_policy_test.go | 32 | require.True(t, IsRegistrationEmailSuffixAllowed("user@example.com", []string{"@example.com"})) |
| LOW | backend/internal/service/balance_notify_check_test.go | 243 | s.checkQuotaDimCrossings(account, nil, 10, []string{"admin@example.com"}, "TestSite") |
| LOW | backend/internal/service/balance_notify_check_test.go | 244 | s.checkQuotaDimCrossings(account, []quotaDim{}, 10, []string{"admin@example.com"}, "TestSite") |
| LOW | backend/internal/service/balance_notify_check_test.go | 261 | s.checkQuotaDimCrossings(account, dims, 50, []string{"admin@example.com"}, "TestSite") |
| LOW | backend/internal/service/balance_notify_check_test.go | 278 | s.checkQuotaDimCrossings(account, dims, 50, []string{"admin@example.com"}, "TestSite") |
| LOW | backend/internal/service/balance_notify_check_test.go | 296 | s.checkQuotaDimCrossings(account, dims, 50, []string{"admin@example.com"}, "TestSite") |
| LOW | backend/internal/service/balance_notify_check_test.go | 314 | s.checkQuotaDimCrossings(account, dims, 50, []string{"admin@example.com"}, "TestSite") |
| LOW | backend/internal/service/balance_notify_check_test.go | 332 | s.checkQuotaDimCrossings(account, dims, 50, []string{"admin@example.com"}, "TestSite") |
| LOW | backend/internal/service/balance_notify_check_test.go | 350 | s.checkQuotaDimCrossings(account, dims, 50, []string{"admin@example.com"}, "TestSite") |
| LOW | backend/internal/service/balance_notify_check_test.go | 367 | s.checkQuotaDimCrossings(account, dims, 50, []string{"admin@example.com"}, "TestSite") |
| LOW | backend/internal/service/balance_notify_check_test.go | 403 | s.checkQuotaDimCrossings(account, dims, 50, []string{"admin@example.com"}, "TestSite") |
| LOW | …nd/internal/service/notification_email_service_test.go | 210 | require.NoError(t, queue.EnqueueVerifyCode("user@example.com", "Sub2API", "zh-CN")) |
| LOW | …nd/internal/service/notification_email_service_test.go | 211 | require.NoError(t, queue.EnqueuePasswordReset("user@example.com", "Sub2API", "https://example.com/reset", "en-US")) |
| LOW | …nd/internal/service/notification_email_service_test.go | 242 | unsubscribed, err := svc.IsUnsubscribed(ctx, "user@example.com", NotificationEmailEventBalanceLow) |
| LOW | …nd/internal/service/notification_email_service_test.go | 246 | transactionalToken, err := svc.createUnsubscribeToken(ctx, "user@example.com", NotificationEmailEventBalanceRechargeSuc |
| LOW | …nd/internal/service/notification_email_service_test.go | 252 | authToken, err := svc.createUnsubscribeToken(ctx, "user@example.com", NotificationEmailEventAuthVerifyCode) |
| LOW | …nd/internal/service/notification_email_service_test.go | 264 | require.Equal(t, "zh", svc.ResolveRecipientLocale(ctx, 42, "user@example.com")) |
| LOW | …nd/internal/service/notification_email_service_test.go | 265 | require.Equal(t, "zh", svc.ResolveRecipientLocale(ctx, 0, "user@example.com")) |
| LOW | …nd/internal/service/notification_email_service_test.go | 283 | "user@example.com", |
| LOW | …nd/internal/service/notification_email_service_test.go | 290 | "user@example.com", |
| LOW | …nd/internal/service/notification_email_service_test.go | 298 | "user@example.com", |
| LOW | …nd/internal/service/notification_email_service_test.go | 313 | require.Equal(t, key, notificationEmailPreferenceKey(NotificationEmailEventSubscriptionExpiryReminder, "user@example.co |
| LOW | …nd/internal/service/notification_email_service_test.go | 315 | legacyKey := legacyNotificationEmailPreferenceKey(NotificationEmailEventSubscriptionExpiryReminder, "user@example.com") |
| LOW | …nd/internal/service/notification_email_service_test.go | 365 | RecipientEmail: "user@example.com", |
| LOW | backend/internal/service/notification_email_service.go | 849 | "recipient_email": "user@example.com", |
| 4 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | backend/internal/handler/auth_dingtalk_oauth.go | 353 | // Step 2: 必须 — UnionID 是全局唯一,作为 subject + 合成邮箱种子;nick 是用户在 App 自设的昵称 |
| LOW | backend/internal/payment/load_balancer.go | 94 | // Step 1: query enabled instances matching payment type. |
| LOW | backend/internal/payment/load_balancer.go | 100 | // Step 2: batch-fetch daily usage for all candidates. |
| LOW | backend/internal/payment/load_balancer.go | 103 | // Step 3: filter by limits. |
| LOW | backend/internal/payment/load_balancer.go | 112 | // Step 4: pick by strategy. |
| LOW | backend/internal/service/update_service.go | 239 | // Step 1: Move current binary to backup |
| LOW | backend/internal/service/update_service.go | 244 | // Step 2: Move new binary to target location (atomic, same filesystem) |
| LOW | backend/internal/service/openai_fast_policy_ws_test.go | 655 | // Step 1: parse Anthropic request (mirrors openai_gateway_messages.go:38-50). |
| LOW | backend/internal/service/openai_fast_policy_ws_test.go | 662 | // Step 2: BetaFastMode header → service_tier="priority" (mirrors line 58-61). |
| LOW | backend/internal/service/openai_fast_policy_ws_test.go | 669 | // Step 3: marshal & apply fast policy (mirrors line 78 + 149). |
| LOW | backend/internal/service/openai_fast_policy_ws_test.go | 677 | // Step 4: default policy must preserve the explicit fast/priority request. |
| LOW | backend/internal/service/oauth_service.go | 188 | // Step 1: Get organization info using sessionKey |
| LOW | backend/internal/service/oauth_service.go | 194 | // Step 2: Generate PKCE values |
| LOW | backend/internal/service/oauth_service.go | 206 | // Step 3: Get authorization code using cookie |
| LOW | backend/internal/service/oauth_service.go | 212 | // Step 4: Exchange code for token |
| LOW | backend/internal/service/claude_code_validator.go | 58 | // Step 1: User-Agent 检查 (必需) - 必须是 claude-cli/x.x.x |
| LOW | backend/internal/service/claude_code_validator.go | 59 | // Step 2: 对于非 messages 路径,只要 UA 匹配就通过 |
| LOW | backend/internal/service/claude_code_validator.go | 60 | // Step 3: 检查 max_tokens=1 + haiku 探测请求绕过(UA 已验证) |
| LOW | backend/internal/service/claude_code_validator.go | 61 | // Step 4: 对于 messages 路径,进行严格验证: |
| LOW | backend/internal/service/claude_code_validator.go | 68 | // Step 1: User-Agent 检查 |
| LOW | backend/internal/service/claude_code_validator.go | 74 | // Step 2: 非 messages 路径,只要 UA 匹配就通过 |
| LOW | backend/internal/service/claude_code_validator.go | 80 | // Step 3: 检查 max_tokens=1 + haiku 探测请求绕过 |
| LOW | backend/internal/service/claude_code_validator.go | 86 | // Step 4: messages 路径,进行严格验证 |
| LOW | backend/internal/pkg/tlsfingerprint/dialer.go | 146 | // Step 1: Create SOCKS5 dialer |
| LOW | backend/internal/pkg/tlsfingerprint/dialer.go | 169 | // Step 2: Establish SOCKS5 tunnel to target |
| LOW | backend/internal/pkg/tlsfingerprint/dialer.go | 178 | // Step 3: Perform TLS handshake on the tunnel with utls fingerprint |
| LOW | backend/internal/pkg/tlsfingerprint/dialer.go | 187 | // Step 1: TCP connect to proxy server |
| LOW | backend/internal/pkg/tlsfingerprint/dialer.go | 208 | // Step 2: Send CONNECT request to establish tunnel |
| LOW | backend/internal/pkg/tlsfingerprint/dialer.go | 231 | // Step 3: Read CONNECT response |
| LOW | backend/internal/pkg/tlsfingerprint/dialer.go | 249 | // Step 4: Perform TLS handshake on the tunnel with utls fingerprint |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | deploy/install.sh | 328 | # Check if running interactively (can access terminal) |
| LOW | deploy/install.sh | 331 | # Check if /dev/tty is available (works even when piped) |
| LOW | deploy/install.sh | 420 | # Check if running as root |
| LOW | deploy/install.sh | 537 | # Check if the release exists |
| LOW | deploy/install.sh | 808 | # Check if Sub2API is installed |
| LOW | deploy/install.sh | 850 | # Check if Sub2API is installed |
| LOW | deploy/install.sh | 867 | # Check if same version |
| LOW | deploy/install.sh | 891 | # Set LATEST_VERSION to the target version for download_and_extract |
| LOW | deploy/docker-deploy.sh | 48 | # Check if command exists |
| LOW | deploy/docker-deploy.sh | 61 | # Check if openssl is available |
| LOW | deploy/docker-deploy.sh | 67 | # Check if deployment already exists |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | deploy/docker-compose.dev.yml | 6 | # Usage: |
| LOW | deploy/docker-compose.standalone.yml | 7 | # Usage: |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tools/check_pnpm_audit_exceptions.py | 23 | |
| LOW | tools/check_pnpm_audit_exceptions.py | 64 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | frontend/src/i18n/locales/en.ts | 6716 | description: '<div style="line-height: 1.7;"><p style="margin-bottom: 12px;">Click the button to create your fir |