Repository Analysis

Wei-Shaw/sub2api

Sub2API 一站式开源中转服务,让 Claude、Openai 、Gemini、Antigravity订阅统一接入,支持拼车共享,更高效分摊成本,原生工具无缝使用。

1.8 Likely human-written View on GitHub
1.8
Adjusted Score
1.8
Raw Score
100%
Time Factor
2026-05-30
Last Push
24,423
Stars
Go
Language
805,590
Lines of Code
2042
Files
928
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 224LOW 704

Pattern Findings

928 matches across 9 categories. Click a row to expand file-level details.

Decorative Section Separators224 hits · 732 pts
SeverityFileLineSnippet
MEDIUMfrontend/src/utils/platformColors.ts10// ── Badge (bg + text + border, for inline badges with border) ───────
MEDIUMfrontend/src/utils/platformColors.ts19// ── Light badge (softer bg, no border) ──────────────────────────────
MEDIUMfrontend/src/utils/platformColors.ts27// ── Border ──────────────────────────────────────────────────────────
MEDIUMfrontend/src/utils/platformColors.ts36// ── Accent bar (gradient) ───────────────────────────────────────────
MEDIUMfrontend/src/utils/platformColors.ts45// ── Text (price, icon) ─────────────────────────────────────────────
MEDIUMfrontend/src/utils/platformColors.ts54// ── Icon (check mark etc.) ──────────────────────────────────────────
MEDIUMfrontend/src/utils/platformColors.ts63// ── Button (solid bg) ───────────────────────────────────────────────
MEDIUMfrontend/src/utils/platformColors.ts72// ── Discount badge ──────────────────────────────────────────────────
MEDIUMfrontend/src/utils/platformColors.ts81// ── Header gradient (subscription confirm) ─────────────────────────
MEDIUMfrontend/src/utils/platformColors.ts90// ── Header text (light text on gradient bg) ────────────────────────
MEDIUMfrontend/src/utils/platformColors.ts107// ── Public API ──────────────────────────────────────────────────────
MEDIUMfrontend/src/components/admin/channel/types.ts77// ── 模型模式冲突检测 ──────────────────────────────────────
MEDIUMfrontend/src/components/admin/channel/types.ts116// ── 区间校验 ──────────────────────────────────────────────
MEDIUMfrontend/src/components/channels/SupportedModelChip.vue244// ── Popover positioning ─────────────────────────────────────────────
MEDIUMfrontend/src/api/admin/settings.ts19// ── 平台限额类型 ──────────────────────────────────────────────────
MEDIUMfrontend/src/api/admin/settings.ts418 // ── 平台限额(嵌套 JSON,系统层 + 7 auth-source 层)────────────────────────────────
MEDIUMfrontend/src/api/admin/settings.ts674 // ── 平台限额(嵌套 JSON,系统层 + 7 auth-source 层)────────────────────────────────
MEDIUMdeploy/docker-compose.local.yml20# =============================================================================
MEDIUMdeploy/docker-compose.local.yml23 # ===========================================================================
MEDIUMdeploy/docker-compose.local.yml25 # ===========================================================================
MEDIUMdeploy/docker-compose.local.yml43 # =======================================================================
MEDIUMdeploy/docker-compose.local.yml45 # =======================================================================
MEDIUMdeploy/docker-compose.local.yml48 # =======================================================================
MEDIUMdeploy/docker-compose.local.yml50 # =======================================================================
MEDIUMdeploy/docker-compose.local.yml56 # =======================================================================
MEDIUMdeploy/docker-compose.local.yml58 # =======================================================================
MEDIUMdeploy/docker-compose.local.yml70 # =======================================================================
MEDIUMdeploy/docker-compose.local.yml72 # =======================================================================
MEDIUMdeploy/docker-compose.local.yml81 # =======================================================================
MEDIUMdeploy/docker-compose.local.yml83 # =======================================================================
MEDIUMdeploy/docker-compose.local.yml87 # =======================================================================
MEDIUMdeploy/docker-compose.local.yml89 # =======================================================================
MEDIUMdeploy/docker-compose.local.yml97 # =======================================================================
MEDIUMdeploy/docker-compose.local.yml99 # =======================================================================
MEDIUMdeploy/docker-compose.local.yml107 # =======================================================================
MEDIUMdeploy/docker-compose.local.yml115 # =======================================================================
MEDIUMdeploy/docker-compose.local.yml118 # =======================================================================
MEDIUMdeploy/docker-compose.local.yml120 # =======================================================================
MEDIUMdeploy/docker-compose.local.yml132 # =======================================================================
MEDIUMdeploy/docker-compose.local.yml134 # =======================================================================
MEDIUMdeploy/docker-compose.local.yml144 # =======================================================================
MEDIUMdeploy/docker-compose.local.yml146 # =======================================================================
MEDIUMdeploy/docker-compose.local.yml151 # =======================================================================
MEDIUMdeploy/docker-compose.local.yml153 # =======================================================================
MEDIUMdeploy/docker-compose.local.yml1# =============================================================================
MEDIUMdeploy/docker-compose.local.yml3# =============================================================================
MEDIUMdeploy/docker-compose.local.yml182 # ===========================================================================
MEDIUMdeploy/docker-compose.local.yml184 # ===========================================================================
MEDIUMdeploy/docker-compose.local.yml213 # ===========================================================================
MEDIUMdeploy/docker-compose.local.yml215 # ===========================================================================
MEDIUMdeploy/docker-compose.local.yml247# =============================================================================
MEDIUMdeploy/docker-compose.local.yml249# =============================================================================
MEDIUMdeploy/install.sh47# ============================================================
MEDIUMdeploy/install.sh49# ============================================================
MEDIUMdeploy/docker-deploy.sh2# =============================================================================
MEDIUMdeploy/docker-deploy.sh4# =============================================================================
MEDIUMdeploy/docker-deploy.sh12# =============================================================================
MEDIUMdeploy/docker-compose.dev.yml1# =============================================================================
MEDIUMdeploy/docker-compose.dev.yml3# =============================================================================
MEDIUMdeploy/docker-compose.dev.yml9# =============================================================================
164 more matches not shown…
Over-Commented Block324 hits · 298 pts
SeverityFileLineSnippet
LOWfrontend/src/views/auth/README.md201
LOWfrontend/src/views/auth/USAGE_EXAMPLES.md1# Authentication Views Usage Examples
LOWfrontend/src/views/auth/USAGE_EXAMPLES.md21
LOWfrontend/src/views/auth/USAGE_EXAMPLES.md41```typescript
LOWfrontend/src/views/auth/USAGE_EXAMPLES.md61// - On success:
LOWdeploy/docker-compose.local.yml1# =============================================================================
LOWdeploy/docker-compose.local.yml81 # =======================================================================
LOWdeploy/docker-compose.local.yml101 # a random key will be generated on each startup, causing all existing
LOWdeploy/docker-deploy.sh1#!/bin/bash
LOWdeploy/config.example.yaml1# Sub2API Configuration File
LOWdeploy/config.example.yaml21 # 运行模式:"debug" 用于开发,"release" 用于生产环境
LOWdeploy/config.example.yaml41 # Max concurrent streams per connection
LOWdeploy/config.example.yaml61# Run mode: "standard" (default) or "simple" (for internal use)
LOWdeploy/config.example.yaml101 # Allowed hosts for pricing data download
LOWdeploy/config.example.yaml121 # Force-remove response headers from upstream
LOWdeploy/config.example.yaml141 # 不影响 AI 账号网关连接。默认 false:fail-fast 防止 IP 泄露。
LOWdeploy/config.example.yaml161 # Max bytes to read for proxy probe responses (default: 1MB)
LOWdeploy/config.example.yaml181 sora_model_filters:
LOWdeploy/config.example.yaml201 # - account_proxy: 按账户+代理组合隔离(默认,最细粒度)
LOWdeploy/config.example.yaml221 # 该模板作用于 `/v1/messages -> Responses/Codex` 转换链路,且发生在 Claude `system`
LOWdeploy/config.example.yaml341 max_conns_per_host: 1024
LOWdeploy/config.example.yaml361 stream_keepalive_interval: 10
LOWdeploy/config.example.yaml381 # wait 模式等待图片并发槽位的超时时间(秒),0=不等待
LOWdeploy/config.example.yaml401 # Scheduling configuration
LOWdeploy/config.example.yaml441 # 全量重建周期(秒),0 表示禁用
LOWdeploy/config.example.yaml461 level: "info"
LOWdeploy/config.example.yaml481 # Enable file output (default path auto-derived)
LOWdeploy/config.example.yaml501 # Compress rotated files
LOWdeploy/config.example.yaml521# =============================================================================
LOWdeploy/config.example.yaml541 max_poll_attempts: 600
LOWdeploy/config.example.yaml561 # Disable TLS fingerprint for Sora upstream
LOWdeploy/config.example.yaml581 session_reuse_enabled: true
LOWdeploy/config.example.yaml601 # Max download bytes
LOWdeploy/config.example.yaml621 # Whether OpenAI refresh flow is allowed to sync linked Sora accounts
LOWdeploy/config.example.yaml641 negative_ttl_seconds: 30
LOWdeploy/config.example.yaml661 # 新鲜阈值(秒);命中后处于该窗口视为新鲜数据
LOWdeploy/config.example.yaml681 # Lookback window (seconds) for late-arriving data
LOWdeploy/config.example.yaml701 hourly_days: 180
LOWdeploy/config.example.yaml721 # 执行器轮询间隔(秒)
LOWdeploy/config.example.yaml741 processing_timeout_seconds: 30
LOWdeploy/config.example.yaml761# Database Configuration (PostgreSQL)
LOWdeploy/config.example.yaml781 # SSL 模式:disable(禁用), prefer(优先加密,默认), require(要求), verify-ca(验证CA), verify-full(完全验证)
LOWdeploy/config.example.yaml801redis:
LOWdeploy/config.example.yaml821 # 是否启用 TLS/SSL 连接
LOWdeploy/config.example.yaml841jwt:
LOWdeploy/config.example.yaml861 # 重要:设置固定的 TOTP 加密密钥。
LOWdeploy/config.example.yaml941 # 初始管理员账户(首次运行时创建)
LOWdeploy/config.example.yaml961 # 费率倍数(影响计费计算)
LOWdeploy/config.example.yaml981 # Hash verification URL (optional)
LOWdeploy/config.example.yaml1001billing:
LOWdeploy/config.example.yaml1021# Turnstile 人机验证配置
LOWdeploy/config.example.yaml1041# 2. AI Studio OAuth(不需要 project_id)
LOWdeploy/config.example.yaml1061 # Optional: local quota simulation for Gemini Code Assist (local billing).
LOWdeploy/config.example.yaml1081 # Flash 模型每日请求数
LOWdeploy/config.example.yaml1101 # Proxy URL for accessing GitHub (used for online updates and pricing data)
LOWdeploy/docker-compose.yml1# =============================================================================
LOWdeploy/docker-compose.yml81 - ADMIN_PASSWORD=${ADMIN_PASSWORD:-}
LOWdeploy/docker-compose.yml101 - TOTP_ENCRYPTION_KEY=${TOTP_ENCRYPTION_KEY:-}
LOWdeploy/docker-compose.standalone.yml1# =============================================================================
LOWbackend/.golangci.yml61 confidence: high
264 more matches not shown…
Hyper-Verbose Identifiers270 hits · 281 pts
SeverityFileLineSnippet
LOWfrontend/src/composables/useSwipeSelect.ts284 function shouldPreferNativeTextSelection(target: HTMLElement): boolean {
LOWfrontend/src/composables/useSwipeSelect.ts300 function shouldPreferNativeSelectionOutsideRows(target: HTMLElement): boolean {
LOWfrontend/src/composables/useNavigationLoading.ts119export function useNavigationLoadingState() {
LOWfrontend/src/composables/useModelWhitelist.ts324export async function fetchAntigravityDefaultMappings(): Promise<{ from: string; to: string }[]> {
LOWfrontend/src/composables/useModelWhitelist.ts384export function getPresetMappingsByPlatform(platform: string) {
LOWfrontend/src/stores/adminSettings.ts88 function setOpsMonitoringEnabledLocal(value: boolean) {
LOWfrontend/src/stores/adminSettings.ts94 function setOpsRealtimeMonitoringEnabledLocal(value: boolean) {
LOWfrontend/src/stores/adminSettings.ts106 function setOpsQueryModeDefaultLocal(value: string) {
LOWfrontend/src/stores/auth.ts31function normalizePendingAuthTokenField(value: unknown): PendingAuthTokenField {
LOWfrontend/src/stores/auth.ts35function getPersistedPendingAuthSession(): PendingAuthSessionSummary | null {
LOWfrontend/src/stores/auth.ts63function persistPendingAuthSession(session: PendingAuthSessionSummary): void {
LOWfrontend/src/stores/auth.ts67function clearPendingAuthSessionStorage(): void {
LOWfrontend/src/utils/registrationEmailPolicy.ts12export function normalizeRegistrationEmailSuffixDomain(raw: string): string {
LOWfrontend/src/utils/registrationEmailPolicy.ts22export function normalizeRegistrationEmailSuffixDomains(
LOWfrontend/src/utils/registrationEmailPolicy.ts42export function parseRegistrationEmailSuffixWhitelistInput(input: string): string[] {
LOWfrontend/src/utils/registrationEmailPolicy.ts62export function normalizeRegistrationEmailSuffixWhitelist(
LOWfrontend/src/utils/registrationEmailPolicy.ts68function extractRegistrationEmailDomain(email: string): string {
LOWfrontend/src/utils/registrationEmailPolicy.ts83export function isRegistrationEmailSuffixAllowed(
LOWfrontend/src/utils/registrationEmailPolicy.ts108export function formatRegistrationEmailSuffixWhitelistForMessage(
LOWfrontend/src/utils/registrationEmailPolicy.ts125function normalizeRegistrationEmailSuffixDomainStrict(raw: string): string {
LOWfrontend/src/utils/registrationEmailPolicy.ts134export function isRegistrationEmailSuffixDomainValid(domain: string): boolean {
LOWfrontend/src/utils/registrationEmailPolicy.ts144function normalizeRegistrationEmailSuffixToken(value: string, strict: boolean): string {
LOWfrontend/src/utils/registrationEmailPolicy.ts163function toCanonicalRegistrationEmailSuffix(domain: string): string {
LOWfrontend/src/utils/ccswitchImport.ts22export function resolveCcSwitchImportConfig(
LOWfrontend/src/utils/ccswitchImport.ts52export function buildCcSwitchImportDeeplink(input: CcSwitchImportDeeplinkInput): string {
LOWfrontend/src/utils/usageServiceTier.ts1export function normalizeUsageServiceTier(serviceTier?: string | null): string | null {
LOWfrontend/src/utils/platformColors.ts149export function platformGradientTextClass(p: string): string {
LOWfrontend/src/utils/platformColors.ts153export function platformGradientSubtextClass(p: string): string {
LOWfrontend/src/utils/subscriptionQuota.ts24export function getRemainingDurationParts(
LOWfrontend/src/utils/oauthAffiliate.ts10export function normalizeOAuthAffiliateCode(value?: unknown): string {
LOWfrontend/src/utils/oauthAffiliate.ts25export function storeAffiliateReferralCode(value?: unknown, now = Date.now()): void {
LOWfrontend/src/utils/oauthAffiliate.ts44export function loadAffiliateReferralCode(now = Date.now()): string {
LOWfrontend/src/utils/oauthAffiliate.ts67export function clearAffiliateReferralCode(): void {
LOWfrontend/src/utils/oauthAffiliate.ts78export function resolveAffiliateReferralCode(...values: unknown[]): string {
LOWfrontend/src/utils/oauthAffiliate.ts125export function clearAllAffiliateReferralCodes(): void {
LOWfrontend/src/utils/format.ts311export function formatCountdownWithSuffix(targetDate: string | Date | null | undefined): string | null {
LOWfrontend/src/utils/format.ts322export function formatRelativeWithDateTime(date: string | Date | null | undefined): string {
LOWfrontend/src/utils/usagePricing.ts24export function calculateTokenPricePerMillion(
LOWfrontend/src/utils/usagePricing.ts36export function formatTokenPricePerMillion(
LOWfrontend/src/components/payment/currency.ts8function paymentCurrencyFractionDigits(currency: string): number {
LOWfrontend/src/components/payment/paymentFlow.ts233export function createPaymentRecoverySnapshot(
LOWfrontend/src/components/payment/paymentFlow.ts243export function writePaymentRecoverySnapshot(
LOWfrontend/src/components/payment/paymentFlow.ts251export function clearPaymentRecoverySnapshot(
LOWfrontend/src/components/payment/paymentFlow.ts258export function readPaymentRecoverySnapshot(
LOW…ntend/src/components/payment/PaymentProviderDialog.vue296function providerSupportsPaymentMode(providerKey: string): boolean {
LOW…ts/admin/announcements/AnnouncementTargetingEditor.vue222function defaultSubscriptionCondition(): AnnouncementCondition {
LOW…onents/user/profile/ProfileIdentityBindingsSection.vue311function resolveLegacyCompatibleWeChatSettings(
LOW…onents/user/profile/ProfileIdentityBindingsSection.vue407function isProviderEnabledForBinding(provider: BindableProvider): boolean {
LOW…nents/user/profile/__tests__/ProfileAvatarCard.spec.ts99function installAvatarCompressionMocks(blobSize = 8 * 1024) {
LOWfrontend/src/components/account/EditAccountModal.vue2492function parsePoolModeRetryStatusCodes(input: string): number[] {
LOWfrontend/src/components/account/EditAccountModal.vue2509function formatPoolModeRetryStatusCodes(value: unknown): string {
LOWfrontend/src/components/account/EditAccountModal.vue3517function formatTempUnschedKeywords(value: unknown) {
LOWfrontend/src/components/account/CreateAccountModal.vue3384function parsePoolModeRetryStatusCodes(input: string): number[] {
LOWfrontend/src/api/user.ts132function resolveWeChatOAuthBindingMode(
LOWfrontend/src/api/user.ts141export function buildOAuthBindingStartURL(
LOWfrontend/src/api/auth.ts227function serializeOAuthAdoptionDecision(
LOWfrontend/src/api/auth.ts254export function getPendingOAuthBindLoginKind(
LOWfrontend/src/api/auth.ts260export function isPendingOAuthCreateAccountRequired(
LOWfrontend/src/api/auth.ts266export function hasPendingOAuthSuggestedProfile(
LOWfrontend/src/api/auth.ts284export async function prepareOAuthBindAccessTokenCookie(): Promise<void> {
210 more matches not shown…
Fake / Example Data64 hits · 67 pts
SeverityFileLineSnippet
LOWfrontend/src/stores/__tests__/app.spec.ts261 contact_info: 'test@test.com',
LOWfrontend/src/stores/__tests__/auth.spec.ts42 email: 'admin@example.com',
LOWfrontend/src/stores/__tests__/auth.spec.ts304 store.register({ email: 'user@example.com', password: 'secret-123' })
LOWfrontend/src/stores/__tests__/auth.spec.ts325 await store.login({ email: 'admin@example.com', password: '123456' })
LOW…nd/src/utils/__tests__/registrationEmailPolicy.spec.ts83 expect(isRegistrationEmailSuffixAllowed('user@example.com', [])).toBe(true)
LOW…nd/src/utils/__tests__/registrationEmailPolicy.spec.ts87 expect(isRegistrationEmailSuffixAllowed('user@example.com', ['@example.com'])).toBe(true)
LOW…s/auth/__tests__/PendingOAuthCreateAccountForm.spec.ts67 email: 'user@example.com',
LOW…s/auth/__tests__/PendingOAuthCreateAccountForm.spec.ts142 email: 'user@example.com'
LOW…s/auth/__tests__/PendingOAuthCreateAccountForm.spec.ts157 await wrapper.get('[data-testid="linuxdo-create-account-email"]').setValue('user@example.com')
LOW…s/auth/__tests__/PendingOAuthCreateAccountForm.spec.ts201 email: 'user@example.com',
LOW…nd/src/views/auth/__tests__/WechatCallbackView.spec.ts586 await emailInput.setValue('user@example.com')
LOWfrontend/src/views/setup/SetupWizardView.vue311 placeholder="admin@example.com"
LOW…/admin/ops/utils/__tests__/errorDetailResponse.spec.ts21 user_email: 'user@example.com',
LOWdeploy/config.example.yaml942 admin_email: "admin@example.com"
LOWbackend/internal/handler/auth_dingtalk_oauth_test.go158 email: "user@example.com",
LOW…kend/internal/handler/dto/user_mapper_activity_test.go20 Email: "admin@example.com",
LOW…kend/internal/handler/admin/admin_service_stub_test.go79 Email: "user@example.com",
LOW…kend/internal/handler/admin/admin_service_stub_test.go159 user := service.User{ID: id, Email: "user@example.com", Status: service.StatusActive}
LOW…kend/internal/repository/user_repo_integration_test.go502 Email: "user@example.com",
LOWbackend/internal/repository/email_cache_test.go19 email: "user@example.com",
LOWbackend/internal/setup/cli.go167 cfg.Admin.Email = promptString(reader, "Admin Email", "admin@example.com")
LOWbackend/internal/server/middleware/admin_auth_test.go27 Email: "admin@example.com",
LOWbackend/internal/service/auth_service_register_test.go412 _, user, err := service.Register(context.Background(), "user@example.com", "password")
LOWbackend/internal/service/auth_service_register_test.go482 Email: "test@test.com",
LOWbackend/internal/service/auth_service_register_test.go507 require.Equal(t, "test@test.com", claims.Email)
LOWbackend/internal/service/auth_service_register_test.go513 Email: "test@test.com",
LOWbackend/internal/service/auth_service_register_test.go558 Email: "test@test.com",
LOW…nd/internal/service/auth_service_identity_sync_test.go150 token, user, err := svc.Register(ctx, "user@example.com", "password")
LOW…nd/internal/service/auth_service_identity_sync_test.go165 authidentity.ProviderSubjectEQ("user@example.com"),
LOWbackend/internal/service/balance_notify_service_test.go248 {Email: "user@example.com", Verified: true},
LOWbackend/internal/service/gateway_request_test.go1130 b.WriteString(fmt.Sprintf(`{"role":"user","content":"This is user message number %d with some extra padding text to m
LOWbackend/internal/service/gateway_request_test.go1130 b.WriteString(fmt.Sprintf(`{"role":"user","content":"This is user message number %d with some extra padding text to m
LOWbackend/internal/service/content_moderation_test.go1650 UserEmail: "user@example.com",
LOWbackend/internal/service/content_moderation_test.go1666 userRepo := &contentModerationTestUserRepo{user: &User{ID: 1001, Email: "user@example.com", Status: StatusDisabled}}
LOWbackend/internal/service/content_moderation_test.go1682 userRepo := &contentModerationTestUserRepo{user: &User{ID: 1001, Email: "user@example.com", Status: StatusActive}}
LOW…end/internal/service/registration_email_policy_test.go32 require.True(t, IsRegistrationEmailSuffixAllowed("user@example.com", []string{"@example.com"}))
LOWbackend/internal/service/balance_notify_check_test.go243 s.checkQuotaDimCrossings(account, nil, 10, []string{"admin@example.com"}, "TestSite")
LOWbackend/internal/service/balance_notify_check_test.go244 s.checkQuotaDimCrossings(account, []quotaDim{}, 10, []string{"admin@example.com"}, "TestSite")
LOWbackend/internal/service/balance_notify_check_test.go261 s.checkQuotaDimCrossings(account, dims, 50, []string{"admin@example.com"}, "TestSite")
LOWbackend/internal/service/balance_notify_check_test.go278 s.checkQuotaDimCrossings(account, dims, 50, []string{"admin@example.com"}, "TestSite")
LOWbackend/internal/service/balance_notify_check_test.go296 s.checkQuotaDimCrossings(account, dims, 50, []string{"admin@example.com"}, "TestSite")
LOWbackend/internal/service/balance_notify_check_test.go314 s.checkQuotaDimCrossings(account, dims, 50, []string{"admin@example.com"}, "TestSite")
LOWbackend/internal/service/balance_notify_check_test.go332 s.checkQuotaDimCrossings(account, dims, 50, []string{"admin@example.com"}, "TestSite")
LOWbackend/internal/service/balance_notify_check_test.go350 s.checkQuotaDimCrossings(account, dims, 50, []string{"admin@example.com"}, "TestSite")
LOWbackend/internal/service/balance_notify_check_test.go367 s.checkQuotaDimCrossings(account, dims, 50, []string{"admin@example.com"}, "TestSite")
LOWbackend/internal/service/balance_notify_check_test.go403 s.checkQuotaDimCrossings(account, dims, 50, []string{"admin@example.com"}, "TestSite")
LOW…nd/internal/service/notification_email_service_test.go210 require.NoError(t, queue.EnqueueVerifyCode("user@example.com", "Sub2API", "zh-CN"))
LOW…nd/internal/service/notification_email_service_test.go211 require.NoError(t, queue.EnqueuePasswordReset("user@example.com", "Sub2API", "https://example.com/reset", "en-US"))
LOW…nd/internal/service/notification_email_service_test.go242 unsubscribed, err := svc.IsUnsubscribed(ctx, "user@example.com", NotificationEmailEventBalanceLow)
LOW…nd/internal/service/notification_email_service_test.go246 transactionalToken, err := svc.createUnsubscribeToken(ctx, "user@example.com", NotificationEmailEventBalanceRechargeSuc
LOW…nd/internal/service/notification_email_service_test.go252 authToken, err := svc.createUnsubscribeToken(ctx, "user@example.com", NotificationEmailEventAuthVerifyCode)
LOW…nd/internal/service/notification_email_service_test.go264 require.Equal(t, "zh", svc.ResolveRecipientLocale(ctx, 42, "user@example.com"))
LOW…nd/internal/service/notification_email_service_test.go265 require.Equal(t, "zh", svc.ResolveRecipientLocale(ctx, 0, "user@example.com"))
LOW…nd/internal/service/notification_email_service_test.go283 "user@example.com",
LOW…nd/internal/service/notification_email_service_test.go290 "user@example.com",
LOW…nd/internal/service/notification_email_service_test.go298 "user@example.com",
LOW…nd/internal/service/notification_email_service_test.go313 require.Equal(t, key, notificationEmailPreferenceKey(NotificationEmailEventSubscriptionExpiryReminder, "user@example.co
LOW…nd/internal/service/notification_email_service_test.go315 legacyKey := legacyNotificationEmailPreferenceKey(NotificationEmailEventSubscriptionExpiryReminder, "user@example.com")
LOW…nd/internal/service/notification_email_service_test.go365 RecipientEmail: "user@example.com",
LOWbackend/internal/service/notification_email_service.go849 "recipient_email": "user@example.com",
4 more matches not shown…
Verbosity Indicators30 hits · 59 pts
SeverityFileLineSnippet
LOWbackend/internal/handler/auth_dingtalk_oauth.go353 // Step 2: 必须 — UnionID 是全局唯一,作为 subject + 合成邮箱种子;nick 是用户在 App 自设的昵称
LOWbackend/internal/payment/load_balancer.go94 // Step 1: query enabled instances matching payment type.
LOWbackend/internal/payment/load_balancer.go100 // Step 2: batch-fetch daily usage for all candidates.
LOWbackend/internal/payment/load_balancer.go103 // Step 3: filter by limits.
LOWbackend/internal/payment/load_balancer.go112 // Step 4: pick by strategy.
LOWbackend/internal/service/update_service.go239 // Step 1: Move current binary to backup
LOWbackend/internal/service/update_service.go244 // Step 2: Move new binary to target location (atomic, same filesystem)
LOWbackend/internal/service/openai_fast_policy_ws_test.go655 // Step 1: parse Anthropic request (mirrors openai_gateway_messages.go:38-50).
LOWbackend/internal/service/openai_fast_policy_ws_test.go662 // Step 2: BetaFastMode header → service_tier="priority" (mirrors line 58-61).
LOWbackend/internal/service/openai_fast_policy_ws_test.go669 // Step 3: marshal & apply fast policy (mirrors line 78 + 149).
LOWbackend/internal/service/openai_fast_policy_ws_test.go677 // Step 4: default policy must preserve the explicit fast/priority request.
LOWbackend/internal/service/oauth_service.go188 // Step 1: Get organization info using sessionKey
LOWbackend/internal/service/oauth_service.go194 // Step 2: Generate PKCE values
LOWbackend/internal/service/oauth_service.go206 // Step 3: Get authorization code using cookie
LOWbackend/internal/service/oauth_service.go212 // Step 4: Exchange code for token
LOWbackend/internal/service/claude_code_validator.go58// Step 1: User-Agent 检查 (必需) - 必须是 claude-cli/x.x.x
LOWbackend/internal/service/claude_code_validator.go59// Step 2: 对于非 messages 路径,只要 UA 匹配就通过
LOWbackend/internal/service/claude_code_validator.go60// Step 3: 检查 max_tokens=1 + haiku 探测请求绕过(UA 已验证)
LOWbackend/internal/service/claude_code_validator.go61// Step 4: 对于 messages 路径,进行严格验证:
LOWbackend/internal/service/claude_code_validator.go68 // Step 1: User-Agent 检查
LOWbackend/internal/service/claude_code_validator.go74 // Step 2: 非 messages 路径,只要 UA 匹配就通过
LOWbackend/internal/service/claude_code_validator.go80 // Step 3: 检查 max_tokens=1 + haiku 探测请求绕过
LOWbackend/internal/service/claude_code_validator.go86 // Step 4: messages 路径,进行严格验证
LOWbackend/internal/pkg/tlsfingerprint/dialer.go146 // Step 1: Create SOCKS5 dialer
LOWbackend/internal/pkg/tlsfingerprint/dialer.go169 // Step 2: Establish SOCKS5 tunnel to target
LOWbackend/internal/pkg/tlsfingerprint/dialer.go178 // Step 3: Perform TLS handshake on the tunnel with utls fingerprint
LOWbackend/internal/pkg/tlsfingerprint/dialer.go187 // Step 1: TCP connect to proxy server
LOWbackend/internal/pkg/tlsfingerprint/dialer.go208 // Step 2: Send CONNECT request to establish tunnel
LOWbackend/internal/pkg/tlsfingerprint/dialer.go231 // Step 3: Read CONNECT response
LOWbackend/internal/pkg/tlsfingerprint/dialer.go249 // Step 4: Perform TLS handshake on the tunnel with utls fingerprint
Redundant / Tautological Comments11 hits · 16 pts
SeverityFileLineSnippet
LOWdeploy/install.sh328# Check if running interactively (can access terminal)
LOWdeploy/install.sh331 # Check if /dev/tty is available (works even when piped)
LOWdeploy/install.sh420# Check if running as root
LOWdeploy/install.sh537 # Check if the release exists
LOWdeploy/install.sh808 # Check if Sub2API is installed
LOWdeploy/install.sh850 # Check if Sub2API is installed
LOWdeploy/install.sh867 # Check if same version
LOWdeploy/install.sh891 # Set LATEST_VERSION to the target version for download_and_extract
LOWdeploy/docker-deploy.sh48# Check if command exists
LOWdeploy/docker-deploy.sh61 # Check if openssl is available
LOWdeploy/docker-deploy.sh67 # Check if deployment already exists
Example Usage Blocks2 hits · 3 pts
SeverityFileLineSnippet
LOWdeploy/docker-compose.dev.yml6# Usage:
LOWdeploy/docker-compose.standalone.yml7# Usage:
Deep Nesting2 hits · 2 pts
SeverityFileLineSnippet
LOWtools/check_pnpm_audit_exceptions.py23
LOWtools/check_pnpm_audit_exceptions.py64
Slop Phrases1 hit · 1 pts
SeverityFileLineSnippet
LOWfrontend/src/i18n/locales/en.ts6716 description: '<div style="line-height: 1.7;"><p style="margin-bottom: 12px;">Click the button to create your fir