Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#1,245 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@Riteesh-2k6 đang làm issue này rồi.

Từ ngày 25/10/2026.

  • #1253 của @Riteesh-2k6 — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
mongodb, mysql, postgresql, typescript
Lĩnh vực
api, databases, security

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
856
Fork
82
Merge trung bình
8 giờ 14 phút
Pull request đã merge (30 ngày)
258

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của HelpCode-ai/anythingmcp

Tất cả issue của HelpCode-ai/anythingmcp

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.