DATABASE connectors keep a connection-string password in plaintext and return it to the browser
维护者通常 1 天内回复
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- mongodb, mysql, postgresql, typescript
调研方向
Start from the connector serialization in toPublicConnector() and the SecretExtractor guard that skips DATABASE. Locate connector create/update handlers to move user:password from base URL into encrypted authConfig. Extend the secret-literal repair script and add tests for pg/mysql/mongodb/mssql/oracle URLs; done means passwords never appear in API responses and existing rows can be repaired.
由索引模型根据 Issue 内容生成。
描述
Problem
A DATABASE connector can be created with its password inside the connection string, e.g. postgresql://app:[email protected]:5432/shop. In that case:
- the password is stored in plaintext in
connectors.base_url, whileauth_configis encrypted andenv_varsare sealed at rest; toPublicConnector()masks env vars and headers but returnsbaseUrlunchanged, so the password goes back to the browser on every connector read (list, detail, update responses) and is visible to every member who can open the connector;- the secret guard that moves literal keys out of base URLs and headers (
SecretExtractor,SECRET_GUARDED_TYPES) deliberately skips DATABASE, and so does the secret-literal report/repair script.
The engine already supports the safe form: DatabaseEngine splices authConfig.username / authConfig.password into pg, mysql and mongodb URLs, and the mssql and oracle drivers read them from authConfig directly. Nothing steers a user there when they paste a full connection string.
Proposal
- On create and update of a DATABASE connector, when the URL carries
user:password@andauthConfigholds no password: move username and password into the encryptedauthConfigand store the URL without the password. The connector connects exactly as before, since the engine puts them back at call time. - In
toPublicConnector(), as a second line of defence, return a DATABASEbaseUrlwith any password replaced by a mask, and keep the stored value when an edit sends the masked URL back (same rule as masked env vars). - Existing rows: extend the secret-literal report/repair script to DATABASE base URLs, so operators can find and repair connectors created before this change.
- Tests for the three parts, including mssql/oracle/hana URLs and URLs that are not parseable (left as they are).
Deployment modes
Same behaviour on Cloud and self-hosted: both store connectors in the same table and serve them through the same API. The repair script is run by whoever operates the instance.
Open question
Whether to also refuse a password in the URL outright (400 with a hint to use the credential fields) instead of moving it silently. Moving it keeps existing API clients and imports working, so the proposal moves it.
- 主要语言
- TypeScript
- 星标
- 856
- 派生
- 82
- 平均合并
- 7 小时 48 分钟
- 30 天内合并 PR
- 274
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
HelpCode-ai/anythingmcp 的其他 Issue
-
good first issue hacktoberfest
难度 2/5 半天 新手友好度 70/100
HelpCode-ai/anythingmcp#996 ·
维护者通常 1 天内回复
-
enhancement good first issue hacktoberfest help wanted
难度 2/5 1-3 小时 新手友好度 78/100
HelpCode-ai/anythingmcp#982 · 10 条评论 ·
维护者通常 1 天内回复
-
Translate the rest of the admin UI (DE, IT)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 4/5 3-5 天 新手友好度 38/100
HelpCode-ai/anythingmcp#1271 ·
维护者通常 1 天内回复
-
Write example prompts and a FAQ for the German ERP satellites (JTL-Wawi, Haufe X360, Sage 100)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭good first issue hacktoberfest
难度 3/5 半天 新手友好度 82/100
HelpCode-ai/anythingmcp#1243 ·
维护者通常 1 天内回复
-
enhancement hacktoberfest help wanted
难度 3/5 半天 新手友好度 85/100
HelpCode-ai/anythingmcp#1240 ·
维护者通常 1 天内回复
查看 HelpCode-ai/anythingmcp 的全部 Issue
相似的 Issue
-
check:passed streams:add
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
-
area:agents area:cost bug platform:macos
难度 2/5 1-3 小时 新手友好度 77/100
anthropics/claude-code#105375 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 79/100
-
难度 2/5 1-3 小时 新手友好度 79/100
galaxyproject/loom#616 ·
维护者通常 1 天内回复
-
e2e-failure ready-to-code
难度 2/5 1-3 小时 新手友好度 79/100
redhat-developer/rhdh-plugin-export-overlays#4580 · 1 条评论 ·
维护者通常 1 天内回复