CRS-自建Claude Code镜像,一站式开源中转服务,让 Claude、OpenAI、Gemini、Droid 订阅统一接入,支持拼车共享,更高效分摊成本,原生工具无缝使用。
This report summarizes scanner evidence for Wei-Shaw/claude-relay-service, a JavaScript project with 12,761 GitHub stars. SynthScan examined 213,446 lines of code across 362 source files, recording 156 pattern matches distributed across 8 syntactic categories. The legacy adjusted pattern signal is 0.9 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 140 finding(s).
Are imports declared and package/API names verified? 5 finding(s).
Are wrappers, guards, and repeated structures necessary? 125 finding(s).
Which changes need focused human review? 156 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 156 distinct pattern matches across 8 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | web/admin-spa/src/views/DashboardView.vue | 1285 | function createApiKeysUsageTrendChart() { | CODE |
| LOW | web/admin-spa/src/views/DashboardView.vue | 1479 | async function updateApiKeysUsageTrendChart() { | CODE |
| LOW | web/admin-spa/src/views/DashboardView.vue | 1485 | function createAccountUsageTrendChart() { | CODE |
| LOW | web/admin-spa/src/views/DashboardView.vue | 1652 | async function handleAccountUsageGroupChange(group) { | CODE |
| LOW | tests/metadataUserIdHelper.integration.test.js | 131 | function oldExtractSessionFromMetadata(userId) { | CODE |
| LOW | tests/metadataUserIdHelper.integration.test.js | 137 | function oldExtractOriginalSessionId(userId) { | CODE |
| LOW | scripts/reset-request-detail-retention-hours.js | 58 | async function resetRequestDetailRetentionHours() { | CODE |
| LOW | src/middleware/auth.js | 29 | async function shouldRejectDueToOverload(apiKeyId, timeoutMs, queueConfig, maxQueueSize) { | CODE |
| LOW | src/utils/signatureCache.js | 43 | function getOrCreateSessionCache(sessionId) { | CODE |
| LOW | src/utils/testPayloadHelper.js | 303 | function createChatCompletionsTestPayload(model = 'gpt-4o-mini', options = {}) { | CODE |
| LOW | src/utils/requestDetailHelper.js | 133 | function extractOpenAIReasoningInfo(payload) { | CODE |
| LOW | src/utils/requestDetailHelper.js | 147 | function extractAnthropicReasoningInfo(payload) { | CODE |
| LOW | src/utils/requestDetailHelper.js | 205 | function extractGeminiReasoningInfo(payload) { | CODE |
| LOW | src/utils/requestDetailHelper.js | 243 | function extractRequestReasoningInfo(payload) { | CODE |
| LOW | src/utils/requestDetailHelper.js | 289 | function extractPreviewReasoningInfo(preview) { | CODE |
| LOW | src/utils/requestDetailHelper.js | 363 | function resolveRequestDetailReasoning(detail = {}) { | CODE |
| LOW | src/utils/requestDetailHelper.js | 515 | function sanitizeRequestBodySnapshot(body, options = {}) { | CODE |
| LOW | src/utils/requestDetailHelper.js | 590 | function finalizeRequestDetailMeta(requestMeta = null) { | CODE |
| LOW | src/utils/requestDetailHelper.js | 607 | function extractOpenAICacheReadTokens(usage = {}) { | CODE |
| LOW | src/utils/requestDetailHelper.js | 658 | function getRequestDetailCacheMetrics(detail = {}) { | CODE |
| LOW | src/utils/oauthHelper.js | 105 | function generateSetupTokenAuthUrl(codeChallenge, state) { | CODE |
| LOW | src/utils/antigravityUpstreamDump.js | 67 | async function dumpAntigravityUpstreamRequest(requestInfo) { | CODE |
| LOW | src/utils/grokHelper.js | 314 | function normalizeKnownBaseURLPath(raw) { | CODE |
| LOW | src/utils/grokHelper.js | 392 | function defaultBaseUrlForAuthType(authType) { | CODE |
| LOW | src/utils/grokHelper.js | 466 | function supportsXHighReasoningEffort(model) { | CODE |
| LOW | src/utils/grokHelper.js | 472 | function normalizeReasoningEffortValue(raw, model) { | CODE |
| LOW | src/utils/grokHelper.js | 507 | function normalizeChatCompletionsBody(body) { | CODE |
| LOW | src/utils/grokHelper.js | 581 | function shouldApplyCLIProxyHeaders(targetUrl) { | CODE |
| LOW | src/utils/grokHelper.js | 741 | async function exchangeAuthorizationCode({ | CODE |
| LOW | src/utils/grokHelper.js | 835 | function extractAccountInfoFromTokens(tokens = {}) { | CODE |
| LOW | src/utils/anthropicResponseDump.js | 55 | function summarizeAnthropicResponseBody(body) { | CODE |
| LOW | src/utils/anthropicResponseDump.js | 102 | async function dumpAnthropicNonStreamResponse(req, statusCode, body, meta = {}) { | CODE |
| LOW | src/utils/anthropicResponseDump.js | 110 | async function dumpAnthropicStreamSummary(req, summary, meta = {}) { | CODE |
| LOW | src/utils/antigravityUpstreamResponseDump.js | 68 | async function dumpAntigravityUpstreamResponse(responseInfo) { | CODE |
| LOW | src/utils/antigravityUpstreamResponseDump.js | 105 | async function dumpAntigravityStreamEvent(eventInfo) { | CODE |
| LOW | src/utils/antigravityUpstreamResponseDump.js | 133 | async function dumpAntigravityStreamSummary(summaryInfo) { | CODE |
| LOW | src/utils/contents.js | 316 | function getTrailingPlaceholderAnchor(template) { | CODE |
| LOW | src/utils/contents.js | 339 | function trimRawValueByTrailingPlaceholder(rawValue, template) { | CODE |
| LOW | src/utils/contents.js | 404 | function normalizeValueForTemplate(normalizedValue, template, normalizedTemplate) { | CODE |
| LOW | src/utils/contents.js | 425 | function matchesTemplateIgnoringPlaceholders(normalizedValue, parts) { | CODE |
| LOW | src/utils/contents.js | 450 | function bestSimilarityByTemplates(value) { | CODE |
| LOW | src/utils/warmupInterceptor.js | 69 | function isTitleExtractionSystemPrompt(systemText) { | CODE |
| LOW | src/utils/grokQuota.js | 165 | function normalizeSubscriptionTier(raw) { | CODE |
| LOW | src/utils/grokQuota.js | 200 | function subscriptionTierFromClaims(payload = {}) { | CODE |
| LOW | src/utils/performanceOptimizer.js | 62 | function getHttpsAgentForNonStream() { | CODE |
| LOW | src/utils/anthropicRequestDump.js | 89 | async function dumpAnthropicMessagesRequest(req, meta = {}) { | CODE |
| LOW | src/utils/accountRollingUsage.js | 60 | function extractModelUsageFromHourlyHash(data = {}) { | CODE |
| LOW | src/utils/antigravityModel.js | 99 | function normalizeAntigravityModelInput(model, defaultModel = DEFAULT_ANTIGRAVITY_MODEL) { | CODE |
| LOW | src/utils/antigravityModel.js | 114 | function getAntigravityModelMetadata(modelName) { | CODE |
| LOW | src/utils/antigravityModel.js | 132 | function mapAntigravityUpstreamModel(model) { | CODE |
| LOW | src/routes/unified.js | 557 | function buildGeminiRequestFromOpenAI(body) { | CODE |
| LOW | src/routes/openaiGeminiRoutes.js | 24 | function ensureAntigravityProjectId(account) { | CODE |
| LOW | src/routes/openaiGeminiRoutes.js | 143 | function convertGeminiResponseToOpenAI(geminiResponse, model, stream = false) { | CODE |
| LOW | src/routes/admin/apiKeys.js | 409 | async function getApiKeysSortedByCostPrecomputed(options) { | CODE |
| LOW | src/routes/admin/apiKeys.js | 517 | async function getApiKeysSortedByCostCustom(options) { | CODE |
| LOW | src/routes/admin/sync.js | 52 | function buildModelMappingFromSupportedModels(supportedModels) { | CODE |
| LOW | src/handlers/geminiHandlers.js | 203 | function ensureGeminiPermissionMiddleware(req, res, next) { | CODE |
| LOW | src/handlers/geminiHandlers.js | 259 | function sanitizeFunctionResponsesForApiKey(contents) { | CODE |
| LOW | src/handlers/geminiHandlers.js | 322 | async function normalizeAxiosStreamError(error) { | CODE |
| LOW | src/handlers/geminiHandlers.js | 1806 | async function handleStreamGenerateContent(req, res) { | CODE |
| 54 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | src/utils/contents.js | 100 | text: '## Insights\nIn order to encourage learning, before and after writing code, always provide brief educational | CODE |
| MEDIUM⚡ | src/utils/contents.js | 105 | text: 'You are an interactive CLI tool that helps users with software engineering tasks. In addition to software eng | CODE |
| MEDIUM⚡ | src/utils/contents.js | 110 | text: 'You are an interactive CLI tool that helps users with software engineering tasks. In addition to software eng | CODE |
| MEDIUM | src/routes/userRoutes.js | 764 | // ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | src/routes/userRoutes.js | 766 | // ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | src/routes/admin/quotaCards.js | 11 | // ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | src/routes/admin/quotaCards.js | 13 | // ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | src/routes/admin/quotaCards.js | 166 | // ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | src/routes/admin/quotaCards.js | 168 | // ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | src/services/apiKeyService.js | 2716 | // ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | src/services/apiKeyService.js | 2718 | // ═══════════════════════════════════════════════════════════════════════════ | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | web/admin-spa/src/views/AccountsView.vue | 5581 | // 监听排序选择变化 - 已重构为 handleDropdownSort,此处注释保留原逻辑参考 | COMMENT |
| LOW | web/admin-spa/src/views/DashboardView.vue | 1741 | // 切换自动刷新 | COMMENT |
| LOW | web/admin-spa/src/views/ApiKeysView.vue | 4301 | } | COMMENT |
| LOW | web/admin-spa/src/views/ApiKeysView.vue | 4321 | // if (!key.weeklyOpusCostLimit || key.weeklyOpusCostLimit === 0) return 0 | COMMENT |
| LOW | web/admin-spa/src/views/ApiKeysView.vue | 4381 | COMMENT | |
| LOW | cli/index.js | 621 | // async function listClaudeAccounts() { | COMMENT |
| LOW | cli/index.js | 641 | // account.email || '-', | COMMENT |
| LOW | src/middleware/auth.js | 321 | // 槽位所有权转移说明: | COMMENT |
| LOW | src/middleware/auth.js | 581 | // 当第一个请求正在处理,第二个请求进入排队时,它们共用同一个 socket | COMMENT |
| LOW | src/middleware/auth.js | 2001 | COMMENT | |
| LOW | src/middleware/auth.js | 2021 | // points: 1000, // 请求数量 | COMMENT |
| LOW | src/utils/modelHelper.js | 161 | // Match: -{major}-{minor}-{date} or -{major}-{date} or -{major} | COMMENT |
| LOW | src/routes/grokRoutes.js | 61 | // | COMMENT |
| LOW | src/routes/api.js | 221 | const isStream = req.body.stream === true | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/utils/contents.js | 70 | text: 'You are an interactive CLI tool that helps users __PLACEHOLDER__ Use the instructions below and the tools ava | CODE |
| MEDIUM⚡ | src/utils/contents.js | 165 | text: 'Your job is to create a custom output style, which modifies the Claude Code system prompt, based on the user\ | CODE |
| MEDIUM⚡ | src/utils/contents.js | 165 | text: 'Your job is to create a custom output style, which modifies the Claude Code system prompt, based on the user\ | CODE |
| MEDIUM | src/routes/openaiRoutes.js | 26 | "You are Codex, based on GPT-5. You are running as a coding agent in the Codex CLI on a user's computer.\n\n## General | CODE |
| MEDIUM | src/routes/openaiRoutes.js | 26 | "You are Codex, based on GPT-5. You are running as a coding agent in the Codex CLI on a user's computer.\n\n## General | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | README_EN.md | 124 | ### Step 1: Environment Setup | COMMENT |
| LOW | README_EN.md | 149 | ### Step 2: Download and Configure | COMMENT |
| LOW | README_EN.md | 164 | ### Step 3: Configuration File Setup | COMMENT |
| LOW | README_EN.md | 193 | ### Step 4: Start Service | COMMENT |
| LOW⚡ | src/utils/contents.js | 165 | text: 'Your job is to create a custom output style, which modifies the Claude Code system prompt, based on the user\ | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | web/admin-spa/src/components/common/ModelSelector.vue | 22 | :placeholder="placeholder" | CODE |
| LOW | web/admin-spa/src/views/SettingsView.vue | 1797 | placeholder="user@example.com" | CODE |
| LOW | web/admin-spa/src/views/SettingsView.vue | 1853 | placeholder="admin@example.com" | CODE |
| LOW | tests/grokAccountModes.test.js | 198 | email: 'user@example.com' | CODE |
| LOW | src/services/relay/droidRelayService.js | 1050 | headers['x-api-key'] = 'placeholder' | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/utils/contents.js | 70 | text: 'You are an interactive CLI tool that helps users __PLACEHOLDER__ Use the instructions below and the tools ava | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | src/utils/contents.js | 165 | text: 'Your job is to create a custom output style, which modifies the Claude Code system prompt, based on the user\ | CODE |