feat(extensions): add Roast Room, bring Codex to parity, fix audit findings

Roast Room is installed as a managed Git clone under
~/.my-ai-configuration/roast-room, shared by Claude and Codex. A personal
launcher skill runs it from any folder, starts its live room when needed,
and only runs when invoked by name (/roast-room, $roast-room).

Codex now gets what was Claude-only before: the Caveman skill with a
SessionStart hook that keeps it on, PreCompact and session-pointer hooks,
execpolicy deny rules mirroring Claude's permissions.deny, and Impeccable's
custom agents registered in ~/.codex/agents. The command-safety hook checks
both shell dialects for Codex on Windows, where PowerShell text arrives as
Bash, in both the PowerShell and Bash packages.

Audit fixes:
- command-safety blocks git checkout -- / restore / push --force /
  stash clear and find -delete, and treats heredoc bodies as text
- removing a clone clears read-only Git files, git errors no longer abort
  the extension sync, and a lock left by a dead process is replaced
- with-credential passes child flags such as -k or -d through unchanged
  and resolves commands from PATH
- uninstall strips only owned hooks from settings.json and config.toml and
  keeps the selection while another client is installed; update keeps
  CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY; Bash merges write the same bytes as
  PowerShell
- qmd no longer trusts a stale daemon.json after a lost start race and
  prunes collections of deleted repositories
- Bash scripts avoid GNU-only find -printf

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Julian LechnerandClaude Opus 5.5 committed 2026-11-19 09:02:47 +01:00
1 parent 63a36d90e0
commit b35e2254b3
48 files changed
+1059 -98

No files matched your search

+33 -2
View File
@@ -12,9 +12,10 @@ SCRIPTS = ROOT / 'shared/hooks/scripts'
SAFETY = SCRIPTS / 'command-safety.py'
def hook(command, tool='Bash'):
def hook(command, tool='Bash', shell=None):
payload = json.dumps({'hook_event_name': 'PreToolUse', 'tool_name': tool, 'tool_input': {'command': command}})
return subprocess.run([sys.executable, str(SAFETY), '--hook'], input=payload, capture_output=True,
extra = ['--shell', shell] if shell else []
return subprocess.run([sys.executable, str(SAFETY), '--hook', *extra], input=payload, capture_output=True,
encoding='utf-8', timeout=20)
@@ -61,6 +62,26 @@ class HookTests(unittest.TestCase):
self.assertBlocked(command)
self.assertBlocked('Remove-Item build `\n -Recurse -Force', 'PowerShell')
def test_blocks_git_and_find_forms_that_discard_work(self):
for command in ('git checkout -- .', 'git checkout -- src/app.ts', 'git checkout HEAD -- a.txt', 'git checkout .',
'git restore .', 'git restore --worktree src', 'git push --force', 'git push -f origin main',
'git push --force-with-lease', 'git push origin +main', 'git stash clear',
'find . -name "*.tmp" -delete'):
with self.subTest(command=command):
self.assertBlocked(command)
for command in ('git checkout main', 'git checkout -b feat/x', 'git restore --staged file.txt', 'git push',
'git push origin main', 'git stash list', 'find . -name "*.tmp"'):
with self.subTest(command=command):
self.assertAllowed(command)
def test_heredoc_bodies_are_text_not_commands(self):
for command in ("cat > c.sh <<'EOF'\nrm -rf \"$tmp\"\nEOF", 'git commit -F - <<EOF\nfix: avoid git reset --hard\nEOF',
'cat <<-END\n\trm -rf x\n\tEND'):
with self.subTest(command=command):
self.assertAllowed(command)
self.assertBlocked('cat > a.txt <<EOF\nhello\nEOF\nrm -rf build')
self.assertBlocked('cat <<EOF; rm -rf build\nbody\nEOF')
def test_allows_comments_and_hashes_that_are_not_commands(self):
for command in ('ls # rm -rf x', 'git commit -m "fix #12; rm -rf is bad"', 'echo a#b', 'echo "\\"rm -rf x\\""'):
with self.subTest(command=command):
@@ -81,6 +102,13 @@ class HookTests(unittest.TestCase):
self.assertAllowed('Remove-Item build/file.txt', 'PowerShell')
self.assertAllowed('Remove-Item build -Recurse:$false', 'PowerShell')
def test_shell_override_checks_codex_windows_powershell_text_reported_as_bash(self):
for command in ('rm -r build', 'Remove-Item build -Recurse', 'ri build -recurse', 'rm -rf build'):
with self.subTest(command=command):
self.assertEqual(2, hook(command, 'Bash', 'unknown').returncode)
self.assertEqual(0, hook('rm -r build', 'Bash').returncode, 'Claude Git Bash keeps the POSIX meaning of rm -r')
self.assertEqual(0, hook('Get-ChildItem build', 'Bash', 'unknown').returncode)
def test_unknown_shell_checks_both_dialects(self):
self.assertBlocked('rm -r build', 'shell')
self.assertBlocked('rm -rf build', 'shell')
@@ -148,6 +176,9 @@ class WrapperTests(unittest.TestCase):
self.assertEqual(allowed.returncode, 0, allowed.stderr)
cli = command + (['-Command', 'git reset --hard'] if name != 'bash' else ['git reset --hard'])
self.assertEqual(self.run_wrapper(cli).returncode, 1)
# Codex hook commands pass -Shell; the wrapper must stay in hook mode and read the event.
codex = json.dumps({'tool_name': 'Bash', 'tool_input': {'command': 'rm -r build'}})
self.assertEqual(2, self.run_wrapper(command + ['-Shell', 'unknown'], codex).returncode, name)
if __name__ == '__main__':