Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

DATABASE connectors keep a connection-string password in plaintext and return it to the browser

未关闭
#1,245 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@Riteesh-2k6 已经在做这个了。

开始于 2026年10月25日。

  • #1253 来自 @Riteesh-2k6 —— 未关闭

评估

难度
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, while auth_config is encrypted and env_vars are sealed at rest;
  • toPublicConnector() masks env vars and headers but returns baseUrl unchanged, 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

  1. On create and update of a DATABASE connector, when the URL carries user:password@ and authConfig holds no password: move username and password into the encrypted authConfig and store the URL without the password. The connector connects exactly as before, since the engine puts them back at call time.
  2. In toPublicConnector(), as a second line of defence, return a DATABASE baseUrl with 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).
  3. Existing rows: extend the secret-literal report/repair script to DATABASE base URLs, so operators can find and repair connectors created before this change.
  4. 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,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

HelpCode-ai/anythingmcp 的其他 Issue

查看 HelpCode-ai/anythingmcp 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。