Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
194 commits
Select commit Hold shift + click to select a range
d1ba579
feat: add native TypeSafe Jev System One support
aofee Sep 20, 2026
0da18e4
feat(admin): inline quick-adjust stepper for account priority
william-drakemond Sep 27, 2026
58d6050
fix(admin): keep disabled priority stepper hidden until hover
william-drakemond Sep 27, 2026
cf19f30
fix(payment): rate-limit anonymous public order verify endpoint
william-drakemond Sep 28, 2026
d359196
fix(antigravity): sanitize upstream error body before returning to cl…
william-drakemond Sep 28, 2026
b1ce3c6
fix(email): atomic verify-code attempts and hashed single-use reset t…
william-drakemond Sep 28, 2026
a4ea805
fix(openai): recover rejected encrypted reasoning signatures
wucm667 Sep 29, 2026
5ace069
fix(pricing): preserve exponents when trimming scaled prices
ouchihao Sep 29, 2026
e180a93
fix(users): show normalized errors when bulk updating limits
ouchihao Sep 29, 2026
636faa6
fix(profile): ignore obsolete notification email code responses
ouchihao Sep 29, 2026
7d0bf9c
fix(usage): preserve zero user multipliers in cost details
ouchihao Sep 29, 2026
3a1a37b
fix(ops): retain byte units for sub-byte throughput
ouchihao Sep 29, 2026
cee7603
fix(announcements): report failed read confirmations accurately
ouchihao Sep 29, 2026
8bc375b
fix(batch-image): allow access lookup retries after request failures
ouchihao Sep 29, 2026
8a495b0
fix(usage): ignore obsolete cleanup task list responses
ouchihao Sep 29, 2026
8167d85
fix(ui): close selectors when they become disabled
ouchihao Sep 29, 2026
2e2b8f6
fix(auth): avoid starting OAuth code cooldowns after unmount
ouchihao Sep 29, 2026
00a922c
fix(backup): prevent polling from restarting after navigation
ouchihao Sep 29, 2026
e0019da
fix(ui): limit Escape to the most recently opened dialog
ouchihao Sep 29, 2026
c641453
fix(auth): share pending step-up verification prompts
ouchihao Sep 29, 2026
42bc7f6
chore: sync VERSION to 0.2.11 [skip ci]
github-actions[bot] Sep 30, 2026
7542046
fix(plugins): ignore obsolete configuration UI sessions
ouchihao Sep 30, 2026
21d90fb
fix(auth): keep cleared compliance state isolated from pending requests
ouchihao Sep 30, 2026
2e3c2cf
fix(i18n): correct the custom error codes warning text
william-drakemond Sep 30, 2026
0094074
fix(deps): upgrade axios to 1.20.0 to pass security audit
william-drakemond Sep 30, 2026
3613174
fix(grok): fail over silent-refusal empty response.completed on Grok …
YahooYuan666 Sep 30, 2026
27f4a17
test(grok): cover empty response.completed failover for PlatformGrok
YahooYuan666 Sep 30, 2026
73381fc
fix(openai-ws): bill each later turn with the current group pricing
SPHINX998 Oct 1, 2026
fdce5b8
修复 Grok CLI 版本门槛并对齐官方无界面请求头
lyen1688 Oct 1, 2026
ad05eda
依据正常交互式 CLI 抓包修正 Grok 身份头
lyen1688 Oct 1, 2026
5315858
升级 Axios 至 1.20.0 修复前端安全审计
lyen1688 Oct 1, 2026
d6adebd
Merge pull request #7780 from lyen1688/fix/grok-cli-identity-1-0-46
Wei-Shaw Oct 1, 2026
71e97d1
fix(models): enforce account mappings for remote Codex discovery
lyy0709 Oct 1, 2026
f3d7526
fix(apicompat): flatten named chat tool_choice for Responses
SPHINX998 Oct 1, 2026
9a8ab4f
fix(apicompat): keep chat developer messages as developer role
SPHINX998 Oct 1, 2026
7a767d5
fix(apicompat): pair legacy chat function calls with their results
SPHINX998 Oct 1, 2026
15f469c
fix(gateway): ignore negative content block index in buffered Anthrop…
SPHINX998 Oct 1, 2026
775c1a3
fix(apicompat): preserve refusals when converting Responses to Chat
SPHINX998 Oct 1, 2026
b6a157c
fix(openai): account image input usage on WS passthrough
SPHINX998 Oct 1, 2026
1888de1
fix(models): list composite exact route aliases
wucm667 Oct 1, 2026
4407849
fix(channels): 追加模型时不再改写已留空的价格条目
duckducktw Oct 1, 2026
1b1039f
feat(payment): 充值赠送阶梯(按金额档位额外赠送到账额度)
feeeei Oct 1, 2026
1aa34d4
feat(payment): 充值优惠阶梯支持折扣模式,快捷金额角标改为促销价签
feeeei Oct 1, 2026
0cecf3c
feat(keys): support sorting API keys by group name
william-drakemond Oct 1, 2026
7225538
merge: sync Jev support with latest upstream main
aofee Oct 2, 2026
bb97ab3
fix(typesafe): align System One validation with upstream schema
aofee Oct 2, 2026
2d8a386
fix(typesafe): 补齐平台迁移、审计覆盖、端点隔离与错误策略
Wei-Shaw Oct 2, 2026
9eb394e
fix(typesafe): 堵住校验解析差异与审计盲区,收紧模型列表口径
Wei-Shaw Oct 2, 2026
fa49647
test(model): 错误透传平台列表守卫纳入 typesafe
Wei-Shaw Oct 2, 2026
34fe845
Merge pull request #7425 from aofee/codex/jev-system-one
Wei-Shaw Oct 2, 2026
5637f46
Merge pull request #7802 from feeeei/feat/recharge-promotion-tiers
Wei-Shaw Oct 2, 2026
f3dc083
Merge pull request #7673 from william-drakemond/fix/public-order-veri…
Wei-Shaw Oct 2, 2026
7190130
Merge pull request #7803 from william-drakemond/feat/api-key-group-sort
Wei-Shaw Oct 2, 2026
43c4c88
Merge pull request #7674 from william-drakemond/fix/antigravity-sanit…
Wei-Shaw Oct 2, 2026
2529371
Merge pull request #7676 from william-drakemond/fix/email-code-token-…
Wei-Shaw Oct 2, 2026
46f5f5e
Merge pull request #7773 from william-drakemond/fix/custom-error-code…
Wei-Shaw Oct 2, 2026
5106065
Merge pull request #7630 from william-drakemond/feat/account-priority…
Wei-Shaw Oct 2, 2026
458b92a
chore: sync VERSION to 0.2.12 [skip ci]
github-actions[bot] Oct 2, 2026
c0e5a46
fix(codex): never advertise null service_tiers in models manifest
kingsleydon Oct 2, 2026
dd7ee21
style(codex): use tagged switch for capability conflict fallback
kingsleydon Oct 2, 2026
66a9e2e
fix(billing): allow upstream billing probe for TypeSafe API-key accounts
kingsleydon Oct 2, 2026
8b9788e
test(billing): drop added comments
kingsleydon Oct 2, 2026
1838039
chore(codex): drop added comments
kingsleydon Oct 2, 2026
d9d4333
docs: add security policy with private vulnerability reporting
Wei-Shaw Oct 2, 2026
99efaa4
docs(security): add dev@sub2api.org as fallback reporting email
Wei-Shaw Oct 2, 2026
ae501cc
Merge pull request #7814 from Wei-Shaw/docs/security-policy
Wei-Shaw Oct 2, 2026
c2d5bbd
fix(billing): settle usage when the API key is deleted before billing…
Wei-Shaw Oct 2, 2026
432a6a4
chore(billing): simplify comment
Wei-Shaw Oct 2, 2026
f5aca74
Merge pull request #7816 from Wei-Shaw/fix/usage-billing-deleted-key
Wei-Shaw Oct 2, 2026
3040209
Merge pull request #7813 from kingsleydon/fix/typesafe-upstream-billi…
Wei-Shaw Oct 2, 2026
b8dece9
chore: sync VERSION to 0.2.13 [skip ci]
github-actions[bot] Oct 2, 2026
4b6ed15
fix(custom-pages): ignore obsolete Markdown responses
ouchihao Oct 2, 2026
1c996fe
fix(payment): stop late Stripe callbacks after leaving the page
ouchihao Oct 2, 2026
abdfbb7
fix(web): bypass bare API aliases from embedded frontend fallback
neotan Oct 2, 2026
5800abf
fix(models): preserve composite catalog isolation after base update
wucm667 Oct 3, 2026
852f0f8
fix(anthropic): preserve requested tool change beta headers
Achordchan Oct 3, 2026
abbe42a
fix(profile): preserve email binding draft during user refresh
ShanYi-Hui Oct 3, 2026
856d7ea
fix: expose mapped antigravity test models
yJader Oct 3, 2026
f385bba
docs: keep connectivity test fix out of README
yJader Oct 3, 2026
8f63651
fix(admin): keep scheduled test results scoped to the expanded plan
ouchihao Oct 3, 2026
4551fb0
fix(monitor): ignore obsolete template manager list responses
ouchihao Oct 3, 2026
b472042
fix(ops): discard stale alert event pages after filter changes
ouchihao Oct 3, 2026
81bd85e
fix(ops): require loaded settings before saving
ouchihao Oct 3, 2026
b07b1fb
fix(ops): validate alert rule durations as whole minutes
ouchihao Oct 3, 2026
da4419e
fix(anthropic): keep cache TTL order valid on the mimic path
cyhhao Oct 3, 2026
bbba01d
fix: enable API-key discovery for remote Codex catalogs
ZeroClover Oct 3, 2026
679a718
feat(accounts): compact account search and filters
wucm667 Oct 4, 2026
9f84204
fix(streaming): preserve chat stream heartbeat comments
wucm667 Oct 4, 2026
412718e
fix(apicompat): always include `signature` on Anthropic thinking blocks
3219378872 Oct 5, 2026
0173861
fix(channel-monitor): build zhipu probe URL from the configured endpoint
hezhaoqian1 Oct 6, 2026
5ef517d
fix(accounts): attribute connectivity test failure logs
Achordchan Oct 6, 2026
54810f8
fix(grok): include consent token and origin in SSO device approval
whhphd Oct 6, 2026
d1aac6b
fix(payment): close EasyPay forged-callback sign reuse (fixes #7881)
honestTai Oct 6, 2026
0dccd7b
fix(opencode): correct Zen qwen3.8-max endpoint and reject unsupporte…
aishangwuji Oct 6, 2026
aa3b049
fix(opencode): cap Retry-After hint at 24h for usage refresh backoff
aishangwuji Oct 6, 2026
480f668
fix(opencode): cap Retry-After hint for billing probe schedule
aishangwuji Oct 6, 2026
df89228
fix(opencode): report 403 as neutral forbidden in usage snapshot
aishangwuji Oct 6, 2026
33d9e72
Merge pull request #7851 from ZeroClover/fix/remote-model-catalog-dis…
Wei-Shaw Oct 7, 2026
d97ccc9
Merge pull request #7888 from honestTai/fix/easypay-callback-forgery
Wei-Shaw Oct 7, 2026
6e31561
fix(setup): stop shipping guessable admin credentials on fresh instal…
Wei-Shaw Oct 7, 2026
0f9d460
fix(deps): resolve frontend audit failures (vue, source-map-js, xlsx …
Wei-Shaw Oct 7, 2026
0363b8c
Merge pull request #7893 from Wei-Shaw/fix/issue-7850-admin-bootstrap…
Wei-Shaw Oct 7, 2026
3f1a2ea
chore: sync VERSION to 0.2.14 [skip ci]
github-actions[bot] Oct 7, 2026
d5f490e
fix(usage): replace misleading long-context multiplier badge
wucm667 Oct 7, 2026
7b1aa93
fix(groups): preserve numeric values when editing RPM overrides
ouchihao Oct 7, 2026
795a7e2
fix(payment): stop Airwallex checkout after leaving the page
ouchihao Oct 7, 2026
f022a04
fix(admin): use the saved passthrough rule enabled state
ouchihao Oct 7, 2026
3f2f66f
fix(profile): preserve username edits made during save
ouchihao Oct 7, 2026
8811c12
fix(groups): ignore stale rate multiplier loads
ouchihao Oct 7, 2026
61e1afd
perf(openai): lazily rebuild input when stripping namespaces
liuyh06 Oct 7, 2026
6f6a27f
feat(usage): show per-request output TPS by default
lyy0709 Oct 7, 2026
38dd23f
chore: remove PR screenshots
lyy0709 Oct 7, 2026
1817a84
feat(ops): show per-request output TPS percentiles
lyy0709 Oct 7, 2026
18182f1
style(ops): align output TPS tooltip indentation
lyy0709 Oct 7, 2026
7cd3dc8
fix(channel-monitor): require request samples before health scoring
wucm667 Oct 8, 2026
db29b3a
Merge pull request #7811 from kingsleydon/fix/codex-service-tiers-nul…
Wei-Shaw Oct 8, 2026
6db4171
Merge pull request #7779 from SPHINX998/fix/ws-turn-group-pricing
Wei-Shaw Oct 8, 2026
ef16f8a
Merge pull request #7792 from SPHINX998/fix/ws-passthrough-image-usage
Wei-Shaw Oct 8, 2026
f087fdb
Merge pull request #7785 from SPHINX998/fix/apicompat-chat-named-tool…
Wei-Shaw Oct 8, 2026
f9bd97c
Merge pull request #7786 from SPHINX998/fix/apicompat-chat-developer-…
Wei-Shaw Oct 8, 2026
8d50466
Merge pull request #7787 from SPHINX998/fix/apicompat-chat-legacy-fun…
Wei-Shaw Oct 8, 2026
9d49d27
Merge pull request #7788 from SPHINX998/fix/apicompat-responses-refus…
Wei-Shaw Oct 8, 2026
cc4a1e3
Merge pull request #7789 from SPHINX998/fix/anthropic-buffered-negati…
Wei-Shaw Oct 8, 2026
e473fba
Merge pull request #7869 from 3219378872/fix/thinking-signature-key
Wei-Shaw Oct 8, 2026
f19cd4f
Merge pull request #7844 from cyhhao/fix/anthropic-cache-ttl-order
Wei-Shaw Oct 8, 2026
1293692
Merge pull request #7827 from Achordchan/fix/anthropic-tool-change-betas
Wei-Shaw Oct 8, 2026
2afe7d4
Merge pull request #7910 from liuyh06/codex/fix-responses-namespace-noop
Wei-Shaw Oct 8, 2026
6cacccc
Merge pull request #7775 from YahooYuan666/fix/grok-empty-completed-s…
Wei-Shaw Oct 8, 2026
90afaf1
Merge pull request #7854 from wucm667/fix/issue-7852-chat-stream-hear…
Wei-Shaw Oct 8, 2026
bbf1d37
Merge pull request #7891 from aishangwuji/fix/opencode-go-usage-retry…
Wei-Shaw Oct 8, 2026
3c27476
Merge pull request #7889 from aishangwuji/fix/opencode-zen-routing-an…
Wei-Shaw Oct 8, 2026
bb0d4a5
Merge pull request #7887 from whhphd/fix/grok-sso-consent
Wei-Shaw Oct 8, 2026
4b8c557
Merge pull request #7877 from hezhaoqian1/fix/upstream-channel-monito…
Wei-Shaw Oct 8, 2026
3a7fd4a
Merge pull request #7837 from yJader/fix/antigravity-account-test-models
Wei-Shaw Oct 8, 2026
458865e
Merge pull request #7878 from Achordchan/fix/account-test-log-context
Wei-Shaw Oct 8, 2026
bc63bd2
Merge pull request #7782 from lyy0709/codex/fix-remote-model-catalog
Wei-Shaw Oct 8, 2026
7ff5cff
Merge pull request #7822 from neotan/fix/issue-7670-bare-api-alias-by…
Wei-Shaw Oct 8, 2026
4bcad06
Merge pull request #7800 from duckducktw/fix/pricing-entry-autofill-a…
Wei-Shaw Oct 8, 2026
7fc5332
Merge pull request #7904 from ouchihao/codex/bug-group-rate-load-race
Wei-Shaw Oct 8, 2026
b126b94
Merge pull request #7903 from ouchihao/codex/bug-profile-username-draft
Wei-Shaw Oct 8, 2026
cdbf1d6
Merge pull request #7902 from ouchihao/codex/bug-passthrough-toggle-s…
Wei-Shaw Oct 8, 2026
c2f0edc
Merge pull request #7901 from ouchihao/codex/bug-airwallex-navigation
Wei-Shaw Oct 8, 2026
1865f28
Merge pull request #7900 from ouchihao/codex/bug-rpm-edit-number
Wei-Shaw Oct 8, 2026
d1202be
Merge pull request #7843 from ouchihao/codex/bug-alert-rule-integer-d…
Wei-Shaw Oct 8, 2026
486b226
Merge pull request #7842 from ouchihao/codex/bug-ops-settings-load-guard
Wei-Shaw Oct 8, 2026
02aad47
Merge pull request #7841 from ouchihao/codex/bug-alert-events-paginat…
Wei-Shaw Oct 8, 2026
2c6bd63
Merge pull request #7840 from ouchihao/codex/bug-monitor-template-lis…
Wei-Shaw Oct 8, 2026
f3bcad3
Merge pull request #7839 from ouchihao/codex/bug-scheduled-results-race
Wei-Shaw Oct 8, 2026
4747827
Merge pull request #7819 from ouchihao/codex/bug-stripe-payment-unmount
Wei-Shaw Oct 8, 2026
b949744
Merge pull request #7818 from ouchihao/codex/bug-custom-page-request-…
Wei-Shaw Oct 8, 2026
48c647b
Merge pull request #7833 from ShanYi-Hui/fix/preserve-email-binding-d…
Wei-Shaw Oct 8, 2026
ba3af61
Merge pull request #7897 from wucm667/fix/issue-7894-long-context-marker
Wei-Shaw Oct 8, 2026
0ac774e
Merge pull request #7853 from wucm667/feat/issue-7847-compact-account…
Wei-Shaw Oct 8, 2026
8e2c4fa
Merge pull request #7793 from wucm667/fix/issue-7784-composite-route-…
Wei-Shaw Oct 8, 2026
745ff1d
Merge pull request #7911 from lyy0709/codex/usage-output-tps
Wei-Shaw Oct 8, 2026
2eb7ccb
Merge pull request #7703 from wucm667/fix/issue-7700-thinking-signature
Wei-Shaw Oct 8, 2026
9e46f2d
Merge pull request #7732 from ouchihao/codex/bug-step-up-concurrent-p…
Wei-Shaw Oct 8, 2026
0682393
Merge pull request #7765 from ouchihao/codex/bug-compliance-reset-race
Wei-Shaw Oct 8, 2026
2c13fb5
Merge pull request #7764 from ouchihao/codex/bug-plugin-config-sessio…
Wei-Shaw Oct 8, 2026
3dc2a9c
Merge pull request #7731 from ouchihao/codex/bug-dialog-escape-stack
Wei-Shaw Oct 8, 2026
0b51cbe
Merge pull request #7729 from ouchihao/codex/bug-backup-polling-unmount
Wei-Shaw Oct 8, 2026
3149d62
Merge pull request #7724 from ouchihao/codex/bug-cleanup-task-race
Wei-Shaw Oct 8, 2026
6cfa0f4
Merge pull request #7723 from ouchihao/codex/bug-batch-image-access-r…
Wei-Shaw Oct 8, 2026
9663b5c
Merge pull request #7722 from ouchihao/codex/bug-announcement-read-fa…
Wei-Shaw Oct 8, 2026
b0c2c4d
Merge pull request #7720 from ouchihao/codex/bug-usage-zero-rate
Wei-Shaw Oct 8, 2026
a618338
Merge pull request #7719 from ouchihao/codex/bug-notify-email-timers
Wei-Shaw Oct 8, 2026
d068b86
Merge pull request #7718 from ouchihao/codex/bug-bulk-user-error-message
Wei-Shaw Oct 8, 2026
5a6e826
Merge pull request #7716 from ouchihao/codex/bug-scaled-price-exponent
Wei-Shaw Oct 8, 2026
80dd728
Merge pull request #7728 from ouchihao/codex/bug-oauth-code-unmount
Wei-Shaw Oct 8, 2026
3a012ac
Merge pull request #7725 from ouchihao/codex/bug-select-disabled-open
Wei-Shaw Oct 8, 2026
3e69643
Merge pull request #7721 from ouchihao/codex/bug-fractional-byte-rate
Wei-Shaw Oct 8, 2026
5fc0e48
Merge pull request #7916 from wucm667/fix/issue-7914-monitor-request-…
Wei-Shaw Oct 8, 2026
c063a40
refactor(provider): 以 provider profile 收敛多协议供应商默认端点表
SavitarC Sep 27, 2026
3f8eea0
refactor(provider): profile 端点改为按协议登记,Responses 路径约定并入 profile
SavitarC Sep 27, 2026
8ac2936
refactor(gateway): 三个入站入口的上游协议分流收敛为 resolveUpstreamProtocol
SavitarC Sep 27, 2026
105c955
fix(gateway): /v1/responses 转 Anthropic 时统一以去空白的请求模型兜底映射
SavitarC Sep 27, 2026
3b89cc0
refactor(platform): 后端平台列表改由平台清单派生
SavitarC Oct 2, 2026
eefa7dd
refactor(platform): 平台白名单由数据库约束改为应用层校验
SavitarC Oct 2, 2026
c556aee
refactor(platform): 多协议供应商的转发与探测判断改查 profile
SavitarC Sep 27, 2026
7ffa38a
feat(frontend): 平台列表与多协议账号表单改由平台清单驱动
SavitarC Sep 27, 2026
e2939cd
feat(platform): 接入 Command Code 平台
SavitarC Oct 3, 2026
874871a
feat(platform): 接入 Cline 平台
SavitarC Oct 3, 2026
9264414
fix(provider): 修复 Claude 计费与钱包冷却并隔离模型目录缓存
SavitarC Oct 9, 2026
7ca08d5
fix(frontend): 按平台能力展示模型同步入口并同步 Zen 规则
SavitarC Oct 9, 2026
387ee20
test(platform): 补录制路由基准与平台约束迁移防护
SavitarC Oct 9, 2026
c61f6eb
fix(security): 升级 Go 1.27.2 与 x/net 修复安全扫描
SavitarC Oct 9, 2026
5f93bb3
fix(ci): 升级 lint 支持 Go 1.27.2 并保留 HTTP2 兼容检查
SavitarC Oct 9, 2026
d85cebe
fix(ci): 升级 schema 导入器支持 Go 1.27.2 导出格式
SavitarC Oct 9, 2026
d0392ed
Merge pull request #7618 from SavitarC/feat/provider-profile
Wei-Shaw Oct 9, 2026
dab3b87
fix(openai): declare web_search when OAuth history replays web_search…
IrisRainbowNeko Oct 8, 2026
64caa9a
fix(openai): declare web_search via additional_tools for Responses Lite
IrisRainbowNeko Oct 8, 2026
85e3110
fix(lint): check type assertions in web_search history helper and test
Wei-Shaw Oct 9, 2026
f2669c8
Merge pull request #7939 from IrisRainbowNeko/fix/issue-7927-web-sear…
Wei-Shaw Oct 9, 2026
fb9430d
chore(release): merge SUB2API 0.2.15 for 1.1.10
Oct 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
107 changes: 107 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Security Policy

[English](#english) | [中文](#中文)

## English

### Reporting a Vulnerability

**Please do not report security vulnerabilities through public GitHub issues, pull requests, or discussions.**

Report them privately through GitHub's private vulnerability reporting:

**[Report a vulnerability](https://github.com/Wei-Shaw/sub2api/security/advisories/new)**

(Repository → **Security** tab → **Report a vulnerability**.) Only the maintainers can see the report, and the advisory becomes the place to discuss, fix, and eventually publish the issue.

If you cannot use GitHub private vulnerability reporting, email **dev@sub2api.org** instead, with `[Security]` in the subject line.

A useful report includes:

- The affected component and version (release tag or commit)
- Impact: what an attacker can do and which privileges they need
- Minimal reproduction steps or a proof of concept
- Any non-default configuration required to trigger the issue
- A suggested fix, if you have one

### Supported Versions

Sub2API releases frequently, and fixes ship in a new release rather than being backported.

| Version | Supported |
| ------- | --------- |
| Latest release | ✅ |
| Older releases | ❌ |

Please confirm that the issue reproduces on the latest release or on `main` before reporting.

### Scope

In scope: the Sub2API backend, frontend, official Docker images, and deployment files in this repository.

Usually out of scope:

- Issues that require already-compromised admin credentials or server access
- Risks arising from explicitly weakening documented security settings (for example, disabling `security.url_allowlist`)
- Vulnerabilities in upstream AI providers or third-party dependencies with no Sub2API-specific impact (please report those upstream)
- Missing best-practice headers or scanner output without a demonstrated impact

### Disclosure Process

1. We acknowledge the report and assess its validity and severity.
2. We develop a fix privately in the advisory and may ask you to verify it.
3. We publish a release containing the fix, then publish the GitHub Security Advisory (with a CVE when applicable), crediting you unless you prefer to stay anonymous.

Please keep details private until the advisory is published. This is a volunteer-maintained project, so response times are best effort.

## 中文

### 报告漏洞

**请不要通过公开的 Issue、Pull Request 或 Discussion 报告安全漏洞。**

请使用 GitHub 私密漏洞报告功能提交:

**[提交漏洞报告](https://github.com/Wei-Shaw/sub2api/security/advisories/new)**

(仓库 → **Security** 标签页 → **Report a vulnerability**。)报告仅维护者可见,后续的讨论、修复与公告发布都在该安全公告中进行。

如果无法使用 GitHub 私密漏洞报告,也可以发送邮件至 **dev@sub2api.org**,邮件标题请注明 `[Security]`。

报告中建议包含:

- 受影响的组件与版本(Release tag 或 commit)
- 影响:攻击者能做什么、需要什么权限
- 最小复现步骤或 PoC
- 触发问题所需的非默认配置
- 修复建议(如有)

### 支持的版本

Sub2API 发版频繁,安全修复随新版本发布,不向旧版本回移。

| 版本 | 是否支持 |
| ---- | -------- |
| 最新 Release | ✅ |
| 更早的版本 | ❌ |

报告前请先确认问题在最新 Release 或 `main` 上仍可复现。

### 范围

范围内:本仓库中的 Sub2API 后端、前端、官方 Docker 镜像与部署文件。

通常不在范围内:

- 需要事先已掌握管理员凭据或服务器权限才能利用的问题
- 因主动关闭文档中的安全配置(如关闭 `security.url_allowlist`)而产生的风险
- 上游 AI 服务商或第三方依赖自身的漏洞,且对 Sub2API 无特定影响(请向上游报告)
- 仅缺少最佳实践响应头或扫描器输出,但未证明实际影响

### 披露流程

1. 我们确认收到报告,并评估其有效性与严重程度。
2. 我们在安全公告中私下开发修复,可能请你协助验证。
3. 我们先发布包含修复的版本,再公开 GitHub 安全公告(适用时申请 CVE),并致谢报告者(如你希望匿名则不署名)。

在公告发布前请勿公开漏洞细节。本项目由志愿者维护,响应时间尽力而为。
12 changes: 6 additions & 6 deletions .github/audit-exceptions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ exceptions:
- package: xlsx
advisory: "GHSA-4r6h-8v6p-xvw6"
severity: high
reason: "Admin export only; switched to dynamic import to reduce exposure (CVE-2023-30533)"
mitigation: "Load only on export; restrict export permissions and data scope"
expires_on: "2026-10-06"
reason: "Write-only: admin UsageView lazily imports xlsx solely for XLSX.write export; the advisory requires parsing a crafted file and no XLSX.read path exists (CVE-2023-30533)"
mitigation: "Never parse untrusted spreadsheets with xlsx; no patched version on npm, migrate to SheetJS CDN build or another writer before expiry"
expires_on: "2027-01-06"
owner: "security@your-domain"
- package: xlsx
advisory: "GHSA-5pgg-2g8v-p4x9"
severity: high
reason: "Admin export only; switched to dynamic import to reduce exposure (CVE-2024-22363)"
mitigation: "Load only on export; restrict export permissions and data scope"
expires_on: "2026-10-06"
reason: "Write-only: admin UsageView lazily imports xlsx solely for XLSX.write export; the advisory requires parsing a crafted file and no XLSX.read path exists (CVE-2024-22363)"
mitigation: "Never parse untrusted spreadsheets with xlsx; no patched version on npm, migrate to SheetJS CDN build or another writer before expiry"
expires_on: "2027-01-06"
owner: "security@your-domain"
- package: lodash
advisory: "GHSA-r5fr-rjxr-66jc"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/backend-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
cache-dependency-path: backend/go.sum
- name: Verify Go version
run: |
go version | grep -q 'go1.27.0'
go version | grep -q 'go1.27.2'
- name: Unit tests
working-directory: backend
run: make test-unit
Expand Down Expand Up @@ -73,10 +73,10 @@ jobs:
cache-dependency-path: backend/go.sum
- name: Verify Go version
run: |
go version | grep -q 'go1.27.0'
go version | grep -q 'go1.27.2'
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.13
version: v2.14.0
args: --timeout=30m
working-directory: backend
2 changes: 1 addition & 1 deletion .github/workflows/security-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
cache-dependency-path: backend/go.sum
- name: Verify Go version
run: |
go version | grep -q 'go1.27.0'
go version | grep -q 'go1.27.2'
- name: Run govulncheck
working-directory: backend
run: |
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# =============================================================================

ARG NODE_IMAGE=node:24-alpine
ARG GOLANG_IMAGE=golang:1.27.0-alpine
ARG GOLANG_IMAGE=golang:1.27.2-alpine
ARG ALPINE_IMAGE=alpine:3.21
ARG POSTGRES_IMAGE=postgres:18-alpine
ARG GOPROXY=https://goproxy.cn,direct
Expand Down
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ FRONTEND_CRITICAL_VITEST := \
src/components/account/__tests__/OpenAIReferralCell.spec.ts \
src/components/account/__tests__/OpenAIReferralCell.transport.spec.ts \
src/components/account/__tests__/OpenAIQuotaResetCell.spark_shadow.spec.ts \
src/constants/__tests__/platforms.spec.ts \
src/components/account/__tests__/credentialsBuilder.platformCatalog.spec.ts \
src/components/account/__tests__/CreateAccountModal.spec.ts \
src/components/account/__tests__/EditAccountModal.spec.ts \
src/components/account/__tests__/credentialsBuilder.spec.ts \
src/components/account/__tests__/OpenCodeGoProtocolRulesEditor.spec.ts \
src/components/keys/__tests__/BulkEditKeysModal.spec.ts \
src/components/admin/user/__tests__/UserPlatformQuotaModal.spec.ts \
src/views/user/__tests__/KeysView.spec.ts \
Expand All @@ -18,10 +24,12 @@ FRONTEND_CRITICAL_VITEST := \
src/views/user/__tests__/PaymentResultView.spec.ts \
src/views/user/__tests__/ChannelStatusView.mode.spec.ts \
src/components/user/profile/__tests__/ProfileInfoCard.spec.ts \
src/components/user/profile/__tests__/ProfileIdentityBindingsSection.spec.ts \
src/views/admin/__tests__/SettingsView.spec.ts \
src/features/channel-monitor-v2/__tests__/designSystem.structure.spec.ts \
src/features/channel-monitor-v2/__tests__/monitorFormat.spec.ts \
src/features/channel-monitor-v2/__tests__/monitorZoom.spec.ts
src/features/channel-monitor-v2/__tests__/monitorZoom.spec.ts \
src/components/admin/channel/__tests__/PricingEntryCard.modelDefaultPrice.spec.ts

# 一键编译前后端
build: build-backend build-frontend
Expand Down
35 changes: 31 additions & 4 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,10 @@ JWT_SECRET=your_jwt_secret_here
TOTP_ENCRYPTION_KEY=your_totp_key_here

# 可选:管理员账号
ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=your_admin_password
# 留空则首次启动时自动生成随机邮箱(登录用户名)和密码,并输出到日志。
# 请勿使用 admin@example.com 这类可被猜中的值,它们是暴力破解的目标。
ADMIN_EMAIL=
ADMIN_PASSWORD=

# 可选:自定义端口
SERVER_PORT=8080
Expand Down Expand Up @@ -442,9 +444,9 @@ docker compose -f docker-compose.local.yml logs -f sub2api

在浏览器中打开 `http://你的服务器IP:8080`

如果管理员密码是自动生成的,在日志中查找:
如果管理员邮箱(登录用户名)或密码是自动生成的,在日志中查找:
```bash
docker compose -f docker-compose.local.yml logs sub2api | grep "admin password"
docker compose -f docker-compose.local.yml logs sub2api | grep "Generated admin"
```

#### 升级
Expand Down Expand Up @@ -743,6 +745,31 @@ OAuth / Setup Token 图片请求使用 Responses 主控模型调用 `image_gener

---

## TypeSafe / Jev 使用说明

Sub2API 支持使用 TypeSafe API Key 账户,通过 Jev 原生、非流式的 System One 协议调用模型。

- 平台:`typesafe`;账号类型:API Key
- 默认上游:`https://api.typesafe.ai`
- 对外端点:`POST /v1/systemone`
- 模型:`jev-latest`,TypeSafe 分组的 `/v1/models` 也会返回该模型
- 问题类型:`noul`、`choice`、`score`

请求和成功响应保持 System One 原生 JSON 结构。该端点不兼容 Chat Completions、Responses、Anthropic Messages 或流式客户端。

问题校验遵循 TypeSafe OpenAPI 的线上协议 schema(SDK v0.5.7 也使用该 schema)。所有问题的 `instructions` 都可以省略或为 `null`。Noul 的 `criteria` 可以省略或为 `null`,其中 `true`/`false` 的描述和 Choice 描述支持字符串、对象、数组或 `null`。Score 的 `criteria` 必须是至少包含一档描述的数组,每档支持字符串、对象或数组;单档也合法。SDK 的整数键 Score 映射会由 SDK 在发送前转换为数组。

```bash
curl https://your-sub2api.example.com/v1/systemone \
-H 'Authorization: Bearer sk-your-sub2api-key' \
-H 'Content-Type: application/json' \
--data '{"model":"jev-latest","state":"待评估文本","questions":{"safety":{"type":"noul","instructions":"评估文本是否不安全"}}}'
```

`jev-latest` 内置价格为输入 `$0.042/百万 tokens`、输出 `$0`,渠道定价可以覆盖。凭据、欠费、权限、限流、过载、服务端和网络错误(`401`、`402`、`403`、`429`、`529`、`5xx`、传输错误)沿用现有账号错误策略(含自定义错误码与临时不可调度规则)并切换账号;请求错误(`400`、`413`、`422`)不会切换账号重试,也不会改变账号状态。TypeSafe 分组(以及路由到 TypeSafe 的 Composite 请求)调用 Messages、Chat Completions、Responses、count_tokens 时返回 `404`。

---

## Antigravity 使用说明

Sub2API 支持 [Antigravity](https://antigravity.so/) 账户,授权后可通过专用端点访问 Claude 和 Gemini 模型。
Expand Down
10 changes: 6 additions & 4 deletions README_JA.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,10 @@ JWT_SECRET=your_jwt_secret_here
TOTP_ENCRYPTION_KEY=your_totp_key_here

# オプション: 管理者アカウント
ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=your_admin_password
# 空欄の場合、初回起動時にランダムなメールアドレス(ログインユーザー名)とパスワードが自動生成され、ログに出力されます。
# admin@example.com のような推測されやすい値は総当たり攻撃の標的になるため避けてください。
ADMIN_EMAIL=
ADMIN_PASSWORD=

# オプション: カスタムポート
SERVER_PORT=8080
Expand Down Expand Up @@ -405,9 +407,9 @@ docker compose -f docker-compose.local.yml logs -f sub2api

ブラウザで `http://YOUR_SERVER_IP:8080` を開いてください。

管理者パスワードが自動生成された場合は、ログで確認できます:
管理者メールアドレス(ログインユーザー名)またはパスワードが自動生成された場合は、ログで確認できます:
```bash
docker compose -f docker-compose.local.yml logs sub2api | grep "admin password"
docker compose -f docker-compose.local.yml logs sub2api | grep "Generated admin"
```

#### アップグレード
Expand Down
9 changes: 9 additions & 0 deletions backend/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,15 @@ linters:

exclusions:
rules:
# x/net v0.60 deprecated the HTTP/2 compatibility adapters. Keep their
# existing per-protocol idle timeout and PING configuration in this CI fix.
- path: 'internal/(repository/http_upstream(_http2_keepalive_test)?|server/http)\.go$'
linters: [ staticcheck ]
text: 'SA1019: (\(golang\.org/x/net/http2\.(Server|Transport)\)\.|golang\.org/x/net/http2\.(ConfigureServer|ConfigureTransports|Server|Transport)\b)'
# Upstream libraries can still return the legacy typed GOAWAY error.
- path: 'internal/service/openai_codex_models_service(_test)?\.go$'
linters: [ staticcheck ]
text: 'SA1019: golang\.org/x/net/http2\.GoAwayError\b'
# G703/G704 污点分析在测试文件中只会命中 httptest mock 与测试者自设的
# 环境变量路径,不构成攻击面;且该分析跨环境结果不稳定(本地/CI 报告的
# 位置集合不同),逐点 nolint 无法收敛,故按路径豁免。生产代码不豁免,
Expand Down
2 changes: 1 addition & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.27.0-alpine
FROM golang:1.27.2-alpine

WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion backend/cmd/server/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.8
1.1.10
19 changes: 10 additions & 9 deletions backend/ent/migrate/schema.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading