Telemetry scrubber: case-insensitive mysql rule redacts an attached port (-P3306) and lets a real password survive in the same command
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 82/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- mysql, typescript
Hướng nghiên cứu
Bắt đầu tại server/src/telemetry/scrub.ts và kiểm tra quy tắc xử lý thông tin xác thực của mysql cùng với quy tắc sshpass liền kề. Bổ sung kiểm thử cho lệnh kết hợp -P3306 và -phunter2, dạng -p3306 viết thường không có khoảng trắng, và mysql -p database; xác nhận rằng cổng và tên cơ sở dữ liệu vẫn được giữ lại trong khi thông tin xác thực thực tế được che đi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
In server/src/telemetry/scrub.ts, the tool-anchored mysql credential rule keeps the i flag:
[
/(\bmysql(?:dump)?\b(?:[^|;&\\\r\n]|\\[\s\S])*?(?:[ \t]|\\\r?\n)-p)("[^"]*"|'[^']*'|[^\s'"-]\S*)/gi,
(_m, lead) => `${lead}${REDACTED}`,
],
i makes (?:[ \t])-p match the uppercase attached port form -P3306 (mysql's syntax for --port attached to a single dash). Because the g continuation after the first match never sees another \bmysql\b anchor, a real password later in the same command line is not redacted.
Repro (upstream tree at e8bb2736)
scrubCommand("mysql -h db -P3306 -phunter2 app")
→ "mysql -h db -P[REDACTED] -phunter2 app"
The port is redacted as if it were a secret, and the actual password -phunter2 survives into OTLP export — contrary to the module header's stated priority ("a secret that survived costs a rotation") and to the sibling sshpass rule, which is deliberately case-sensitive with the comment "Case matters here: -P is sshpass's prompt".
Suggested fix
Drop i from the mysql rule (/gi → /g), matching the sshpass rule's convention:
mysql -h db -P3306 -phunter2 app→mysql -h db -P3306 -p[REDACTED] app- lowercase
-p3306(attached password form) is still redacted mysqldump -phunter2 dbunchanged
Tests worth pinning: the mixed -P/-p command above, the lowercase attached form, and mysql -p database (space form = interactive prompt, database name must not be redacted).
Context: we hit this in a downstream deployment while extending coverage for SSHPASS=… sshpass -e and docker <global-options> login -p …; the case-sensitivity divergence was found by a full-scope review pass. Happy to send a PR if wanted.
- Ngôn ngữ chính
- TypeScript
- Star
- 6.6k
- Fork
- 914
- Merge trung bình
- 22 giờ 44 phút
- Pull request đã merge (30 ngày)
- 137
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của CopilotKit/OpenBot
-
Wrong key location at startupCó thể đã có người làm @charan-rathore đã nhận 3 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
CopilotKit/OpenBot#800 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
setup-learning.ts fails on Windows with "spawn npx.cmd EINVAL"Có thể đã có người làm @Caldas đã nhận 6 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
CopilotKit/OpenBot#792 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Remote AG-UI Bots can't use the browser in chat: `computer_*` calls refused as "unavailable for this headless turn"Có thể đã có người làm @charan-rathore đã nhận 3 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
CopilotKit/OpenBot#804 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 Hơn một tuần Mức phù hợp với người mới 22/100
CopilotKit/OpenBot#786 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
server/tests leaks database connections: 55 files open a pool and never close itCó thể đã có người làm @adamsiwiec1 đã nhận 6 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 70/100
CopilotKit/OpenBot#785 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của CopilotKit/OpenBot
Issue tương tự
-
frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
ranxianglei/billion-context#4172 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
awslabs/threat-composer#362 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Area/Cloud Needs Triage Type/Bug
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 86/100
wso2/product-integrator#2847 ·
Maintainer thường phản hồi trong vòng 1 ngày