[bug] settings.system.json: single-slash permission rules miss system dirs

Open Beginner friendly
#2,954 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 5 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
tooling

Research direction

Find where settings.system.json defines the eight permission rules and check how system settings and install overlays are assembled. Read the settings check or lint entry point mentioned in the codebase, if present. Update the rules to use the double leading slash and ensure overlays with their own non-empty deny array receive the same correction; done when all eight rules target the filesystem paths described and the single-slash regression is caught.

Written by the indexing model from the issue text.

Description

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 bin rule matches the install's own Bin folder. 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)

  1. An Edit of a script in the install's Bin folder was refused with the message above.
  2. I changed the bin rule to the double-slash form. The same Edit then succeeded.
  3. 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, System and etc directories each refused with the deny message. A control inside the install's Bin folder 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.

Dominant language
TypeScript
Stars
20.7k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from danielmiessler/LifeOS

All issues in danielmiessler/LifeOS

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.