feat(install): deny Edit and Write on the council config and state in every session
New scripts/council-deny.js holds the deny rules (SPOT) for ~/.claude/agents-council/** and, new, ~/.local/state/agents-council/**, where the skills' scripts keep state only they may change. enable-plugins.js takes them from it for <TARGET>/.claude/settings.local.json as before. The global install now also merges them into ~/.claude/settings.json, the only user-wide settings file, because a settings.local.json binds only sessions rooted in its own repository; the operator no longer edits settings by hand. The writer follows a settings symlink (dangling included), keeps the file mode, writes a 0600 wx temp file and renames it, and refuses invalid JSON or a non-object with exit 1 and the file untouched. Tests: tests/test_dream.py 26 passed (denies once beside existing rules, user settings kept through a symlink with mode, dangling link kept, invalid JSON untouched with exit 1); two independent reviews, round 2 holds. 🎯 Fix: 93 % 💥 Break: 3 % 💸 Cost: 100 % ⏱️ Time: 100 % 🛡️ Security: 100 % 🏆 Score: 90 🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 % Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3418738993
commit
c17ac79258
5 files changed
+111
-6
No files matched your search
@@ -62,9 +62,7 @@ data.env = data.env || {};
|
||||
if (!data.env.CLAUDE_CODE_AUTO_COMPACT_WINDOW) data.env.CLAUDE_CODE_AUTO_COMPACT_WINDOW = "500000";
|
||||
const PYTHON = "/usr/bin/python3 -I";
|
||||
const ABSOLUTE = { python3: PYTHON, bash: "/usr/bin/bash" };
|
||||
const COUNCIL_CONFIG_DENY = "Edit(~/.claude/agents-council/**)";
|
||||
data.permissions = data.permissions || {};
|
||||
data.permissions.deny = [...new Set([...(data.permissions.deny || []), COUNCIL_CONFIG_DENY])];
|
||||
require("./council-deny").withCouncilDeny(data);
|
||||
|
||||
const pluginRepos = new Set(Object.values(MARKETPLACES).map((entry) => entry.source.repo));
|
||||
const lock = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "skills-lock.json"), "utf8"));
|
||||
|
||||
Reference in new issue
Block a user