-
Notifications
You must be signed in to change notification settings - Fork 3
[项目管理] Git 仓库地址有效性校验与错误提示 #22
Copy link
Copy link
Open
Labels
area:backendBackend / Python / FastAPI relatedBackend / Python / FastAPI relatedarea:frontendFrontend / React / UI relatedFrontend / React / UI relatedarea:securitySecurity hardening, auth, validation, or threat-model relatedSecurity hardening, auth, validation, or threat-model relatedstatus:readyTriaged and ready to pick upTriaged and ready to pick uptype:bugSomething isn't workingSomething isn't working
Milestone
Metadata
Metadata
Assignees
Labels
area:backendBackend / Python / FastAPI relatedBackend / Python / FastAPI relatedarea:frontendFrontend / React / UI relatedFrontend / React / UI relatedarea:securitySecurity hardening, auth, validation, or threat-model relatedSecurity hardening, auth, validation, or threat-model relatedstatus:readyTriaged and ready to pick upTriaged and ready to pick uptype:bugSomething isn't workingSomething isn't working
Summary
当前系统在新建 / 编辑项目填写 Git 仓库地址时,已有一部分安全校验,但错误提示和“明显不是仓库地址”的格式校验仍不够清晰。用户输入无效链接、非仓库页面链接或格式不规范的 remote URL 后,可能要到后续 clone / polling 流程才失败,排障成本较高。
本 issue 关注 Git remote URL 的有效性校验与用户可理解的错误提示,不把 HALF 限制为仅支持 GitHub。
Environment
Steps To Reproduce
github.com/owner/repohttps://github.com/ownerhttps://github.com/owner/repo/tree/mainhttps://notgithub.com/test/repofile:///tmp/repohttp://127.0.0.1/repo.gitExpected Behavior
系统应当对 Git remote URL 做清晰校验,并给出明确错误提示。
建议接受当前产品语义下合法、安全的仓库 remote URL,例如:
https://github.com/owner/repohttps://github.com/owner/repo.gitssh://git@github.com/owner/repo.gitgit@github.com:owner/repo.git建议拒绝并提示:
tree、blob、issue、PR 等非仓库 remote 页面file://、ext::、以-开头的参数注入形式错误提示应尽量告诉用户“应该填写仓库 clone URL,而不是仓库内页面 URL”。
Actual Behavior
当前输入无效或不规范的 Git 仓库地址时,系统没有始终给出足够明确的校验提示,或者进入后续流程后才失败,用户无法快速判断输入格式是否正确。
Logs Or Screenshots