[bug] settings.system.json system-folder Edit denies use a single leading slash,…

Đang mở Phù hợp với người mới
#2,941 0 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 4 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
88/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ệ
json
Lĩnh vực
tooling

Hướng nghiên cứu

Mở settings.system.json và đi đến dòng 227-231, năm mục từ chối Edit(...) cho System, bin, etc, sbin và usr. So sánh chúng với phần "How path patterns match" trong tài liệu về quyền của Claude Code, phần này nói rằng một dấu gạch chéo đứng đầu duy nhất neo tại nguồn cài đặt và hai dấu gạch chéo đứng đầu là tuyệt đối. Thay đổi từng mục sang dạng hai dấu gạch chéo, ví dụ Edit(//usr/**), và xác nhận tệp vẫn là JSON hợp lệ; hoàn tất khi cả năm quy tắc đều dùng dạng tuyệt đối.

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

Mô tả

What happened

the system-folder Edit denies in settings.system.json use a single leading slash, which Claude Code anchors at the config dir, so the real system folders are not covered

Summary

settings.system.json:227-231 (release 8.761.0, unchanged on main) has five Edit(...) denies for the system folders System, bin, etc, sbin and usr, each written with one leading slash. Claude Code's permission docs (code.claude.com/docs/en/permissions, "How path patterns match") say: "The single leading slash anchors at the settings source, not the filesystem root", and a double leading slash is the absolute form. For user settings the source is the Claude config dir, so these five rules guard folders of those names inside the config dir, not the system folders.

Harm is small today (writing to the real folders needs root), but the rules read as a system-folder guard and do not act as one.

Suggested fix: write each of the five with a double leading slash, e.g. Edit(//usr/**).

Details

  • Kind: bug
  • LifeOS version: 8.761.0

Filed with the LifeOS /feedback command. The reporter approved this exact text before it was sent; paths, secrets and personal details were stripped locally.

Ngôn ngữ chính
TypeScript
Star
19.9k
Fork
2.5k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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 danielmiessler/LifeOS

Tất cả issue của danielmiessler/LifeOS

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.