Skip to content

chore(claude): ask before pushes, GitHub API writes and cluster installs - #702

Merged
omattsson merged 1 commit into
mainfrom
chore/claude-settings-ask
Oct 25, 2026
Merged

omattsson merged 1 commit into
mainfrom
chore/claude-settings-ask

Conversation

@omattsson

Copy link
Copy Markdown
Owner

Summary

The shared Claude Code allowlist (.claude/settings.json) let an agent run some commands without a prompt that are hard to undo or that reach outside the machine. These now ask first. Builds, tests, lint and local commits still run without a prompt.

Before (allowed) Risk After
git push:* also matched force pushes ask
gh api:* any API call, including DELETE and POST ask
gh pr:* also create, merge and close view, list and checks allowed; create, merge and close ask
git checkout:* git checkout -- <file> discards uncommitted work replaced by git switch
npm install:* runs install scripts, can change the lockfile npm ci allowed; npm install asks
make:* included make helm-install, helm-upgrade and helm-uninstall against the current kube context still allowed, but those three targets ask

An ask rule wins over an allow rule, so make helm-install asks even though make:* stays allowed.

Personal additions, such as more read-only commands, belong in .claude/settings.local.json, which is not committed.

🤖 Generated with Claude Code

The shared Claude Code allowlist let an agent run some commands without a
prompt that are hard to undo or reach outside the machine:

- `git push:*` also matched force pushes.
- `gh api:*` matched any API call, including DELETE and POST, and
  `gh pr:*` matched creating, merging and closing PRs.
- `git checkout:*` matched `git checkout -- <file>`, which discards
  uncommitted work.
- `npm install:*` runs package install scripts and can change the lockfile.
- `make:*` matched `make helm-install`, `helm-upgrade` and `helm-uninstall`
  against the current kube context.

These now ask first (an `ask` rule wins over an `allow` rule). The allowlist
gets the safe forms instead: `npm ci`, `git switch`, and `gh pr view`,
`list` and `checks`. Builds, tests, lint and local commits still run
without a prompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omattsson omattsson added the security Security vulnerability or hardening label Oct 25, 2026
@coderabbitai

coderabbitai Bot commented Oct 25, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e98823e4-2a2f-4cc8-a88a-6dace1a7e868
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@omattsson
omattsson merged commit 5256d1f into main Oct 25, 2026
7 checks passed
@omattsson
omattsson deleted the chore/claude-settings-ask branch October 25, 2026 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security Security vulnerability or hardening

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant