Files
rclone/docs/PERMISSIONS.md
T
Lucas WintherandClaude Opus 5.5 fd7a0dc98d chore: allow golangci-lint run in the Claude Code settings
The owner added the rule; docs/PERMISSIONS.md already listed it in the
Allow tier. Also record that the force-with-lease deny rule misses the
`--force-with-lease=` form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 09:53:08 +01:00

4.3 KiB

Agent permissions

Fork-only. Source of truth for what AI coding agents may run here. Tool files are renderings of this page: .claude/settings.json, .codex/config.toml, .codex/rules/project.rules, .gemini/settings.json. Change this page and every tool file in the same commit. Review changes to these files and to AGENTS.md like CI config: one line redirects agent behaviour repo-wide.

Verified commands

Run on the host on 2026-11-12 with Go 1.27.4 (~/.local/opt/go) and golangci-lint 2.15.0 (~/.local/bin), from the repository root, with RCLONE_CONFIG=/notfound set so no test can reach a real remote. The rows marked (container) are from 2026-11-11, before Go was on the host, run in the golang:1.26 container and not repeated.

Only worked rows may appear in a tier, a tool file, or AGENTS.md.

Command Result
go mod download worked
go build worked - binary reports rclone v1.77.0-DEV
go test ./backend/memory/ worked
go test -run 'TestIntegration/FsMkdir/FsPutFiles/FsCopy' ./backend/memory/ worked
go test ./backend/protondrive/... worked - the contract suite runs against the fake server; the live TestProtonDrive: suite skips without a config
go vet ./backend/protondrive/... worked
gofmt -l backend/protondrive worked - no output
golangci-lint run ./backend/protondrive/... worked - 0 issues
golangci-lint run ./... worked - 0 issues
go run ./fstest/test_all -backends protondrive -remotes TestProtonDriveFake: -maxtries 1 -n 4 worked - starts the fake server through fstest/testserver/init.d/TestProtonDriveFake
RCLONE_CONFIG=/notfound go test ./... failed - only cmd/serve/s3, undiagnosed (2026-11-11, docs/TODO.md "Known issues"); in the container 7 packages failed: backend/smb, cmd/gitannex, cmd/mount, cmd/mount2, cmd/serve/docker, cmd/serve/nfs, fs/logger (container)
make, make quicktest, make racequicktest not run - make is in Ask

Tiers

Tier Commands Why
Allow git status, git diff, git log, git show, git branch --list, git rev-parse, git add, git commit, go mod download, go build, go test, go vet, gofmt -l, golangci-lint run Inspection and the verified dev loop; no prompt needed.
Ask git push, git merge, git rebase, git switch, git restore, git commit --amend, rm (any), go get, go mod tidy, go install, make (any target), docker (any) Leaves the machine, rewrites work, changes dependencies, or is unverified.
Deny git push --force / -f / --force-with-lease, git reset --hard, git clean (any), git add -f / --force, git commit --no-verify / -n, rm -r / -R / -rf / -fr / -Rf / -fR / --recursive, sudo; reading .env, .env.*, secrets/** Destroys work, skips checks, or exposes secrets.

Known gaps

  • The Claude Code deny rule git push --force-with-lease:* does not match git push --force-with-lease=<ref>:<sha> ... (no word boundary before =); a force-push the owner approved on 2026-11-12 went through it.
  • Allowlists save prompts; they are not a security boundary. Use the tool's sandbox for isolation.
  • Prefix rules are bypassable: git -C dir push, flags placed later (git push origin main --force), +refspec pushes. Claude Code's :* matches at a word boundary, so each flag cluster must be listed - which is why git clean is denied whole and rm always asks.
  • Allowed test and build commands run code from the repo; an agent that can edit Go files or tests can run anything through go test.
  • Denying reads of .env does not stop a program that opens it itself, and git can print staged or committed secrets. Rclone test credentials live in the user's rclone config, outside this repository - keep them there.
  • Codex: loaded only once the project is trusted; approval_policy here can loosen a stricter user setting. No allow rules are written because in Codex allow means "run outside the sandbox". Codex cannot deny file reads. --force-with-lease=<ref>, +refspec and late flags only match Ask.
  • Gemini CLI: ignored until the folder is trusted; no Ask tier (anything not allowed already asks); cannot deny file reads.
  • Cursor and Copilot files are not written: nothing in the repository shows the fork uses them (.vscode is gitignored).