[bug] settings.system.json: single-slash permission rules miss system dirs
Maintainer thường phản hồi trong vòng 5 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
- 78/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ệ
- typescript
- Lĩnh vực
- tooling
Hướng nghiên cứu
Tìm nơi settings.system.json định nghĩa tám quy tắc quyền và kiểm tra cách các cài đặt hệ thống cùng các lớp phủ cài đặt được kết hợp. Đọc điểm vào kiểm tra hoặc lint cài đặt được đề cập trong codebase, nếu có. Cập nhật các quy tắc để dùng hai dấu gạch chéo ở đầu và đảm bảo các lớp phủ có mảng deny riêng không rỗng cũng nhận được chỉnh sửa tương tự; hoàn tất khi cả tám quy tắc đều nhắm đến các đường dẫn hệ thống tệp được mô tả và lỗi hồi quy dùng một dấu gạch chéo được phát hiện.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happened
settings.system.json writes its system-directory permission rules with one leading slash, so Claude Code resolves them under the settings root and they do not protect the system directories they name. On a case-insensitive volume the bin rule blocks edits to the install's own Bin folder instead.
Summary
What happens
settings.system.json writes eight permission path rules with one leading slash. Claude Code reads a single leading slash as relative to the settings root, and a double slash as the filesystem root. So these rules point inside the install, not at the system.
Deny rules affected (rule text shown without its leading slash, so a path scrubber leaves it readable): Edit(System/**), Edit(bin/**), Edit(etc/**), Edit(sbin/**), Edit(usr/**).
Allow rules affected, same notation: Edit(private/tmp/**), Edit(tmp/**), Edit(var/folders/**).
Effect
- The five deny rules give no protection to the system directories.
- On a case-insensitive volume, the macOS default, the
binrule matches the install's ownBinfolder. The assistant is refused when it edits a script there: "File is in a directory that is denied by your permission settings". - The three allow rules grant edits under same-named folders inside the install, not the temp directories.
How I confirmed it (8.761.0, macOS)
- An Edit of a script in the install's
Binfolder was refused with the message above. - I changed the
binrule to the double-slash form. The same Edit then succeeded. - I moved the other deny rules to the double-slash form and probed each with an Edit against a file that does not exist. The system
usr,bin,sbin,Systemandetcdirectories each refused with the deny message. A control inside the install'sBinfolder returned "File does not exist", so it was no longer blocked.
Suggested fix
Write all eight rules with the double leading slash. A lint in the settings check that rejects any Edit(, Read( or Write( rule starting with exactly one slash would stop it coming back.
One note for whoever picks this up: an install whose overlay carries its own non-empty deny array replaces the system list, so that overlay needs the same correction.
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
- 20.7k
- Fork
- 2.6k
- 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
- Đọ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 danielmiessler/LifeOS
-
Interceptor LaunchTestProfile.sh: no Windows (Git Bash/MSYS) branch, test profile never launchesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
danielmiessler/LifeOS#3150 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
danielmiessler/LifeOS#3135 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
danielmiessler/LifeOS#3038 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
danielmiessler/LifeOS#2977 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Accepting a proposal in Pulse returns ok, but CENSVS refuses the move and the two records stay apartĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
danielmiessler/LifeOS#3149 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày
Tất cả issue của danielmiessler/LifeOS
Issue tương tự
-
Media browser returns "Not found" for repositories using the SHA-256 object formatCó thể đã có người làm @adamchodera đã nhận hôm nay. Đang mở
Độ 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
-
Follow-ups from #312Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
janhesters/remixcn#318 ·
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
Maintainer thường phản hồi trong vòng 1 ngày
-
Make the "%" unit spacing the same in the web and in A10Có thể đã có người làm @kragent66-glitch đã nhận hôm nay. Đang mởbug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
maiychrus25/OpenTea-DX-OS#226 · 1 bình luận ·
-
NP OSS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
siteboon/claudecodeui#1905 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày