mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-05-10 09:50:10 +02:00
5.5 KiB
5.5 KiB
Permissions Configuration
This document records the current permission requirements for AI agents operating in this repository.
Scope
| Environment | Policy |
|---|---|
| Personal workstation | Restrictive - protect user's daily workflow |
| Homelab VMs | Permissive - agents have full autonomy |
The permissions below apply to personal workstation only. For homelab VMs, almost everything is allowed except destructive operations on production systems.
Default Policy
| Tool | Permission |
|---|---|
* (all others) |
ask |
File Read Permissions
| Pattern | Permission |
|---|---|
* (all files) |
allow |
*.env |
deny |
*.env.* |
deny |
*.env.example |
allow |
*.pem |
deny |
*.key |
deny |
*kubeconfig* |
deny |
.ssh/** |
deny |
.aws/** |
deny |
.kube/** |
deny |
.gnupg/** |
deny |
Always Allowed Tools
These tools run without prompting:
globgreplspquestionskillwebfetch
Bash Command Permissions
Always Allowed (Read-only operations)
Git:
git status,git diff,git log,git show,git branch,git remote
Kubernetes:
kubectl get,kubectl describe,kubectl logs,kubectl topkubectl api-resources,kubectl api-versionskubectl config view,kubectl config get-contextskubectl kustomize,kustomize build,kustomize versionkubectl explain
Terraform:
terraform plan,terraform show,terraform state list,terraform state showterraform output,terraform version,terraform providers,terraform fmt
GitHub CLI:
gh repo view/list,gh issue view/list,gh pr view/list/diff/checksgh api,gh search,gh gist list/viewgh release view/list,gh workflow list/view,gh run list/viewgh status,gh auth status
Helm:
helm list,helm get,helm show,helm searchhelm repo list,helm status,helm version,helm template
Google Cloud:
gcloud * list,gcloud * describe,gcloud * get-iam-policygcloud config list,gcloud auth list,gcloud version
Nix:
nix eval,nix build,nix flake show,nix flake metadatanix flake check,nix flake locknix profile list,nix profile historynix store verify,nix store ls,nix store path-infonix search,nix doctor,nix --versionnixos-rebuild build,darwin-rebuild buildnom build
Just:
just --list,just --show,just --dry-run
Linters & Formatters:
statix check,deadnix,nixfmt --checkshellcheck,hadolint,actionlintruff check,clippy,prettier --checktokei
System diagnostics:
systemctl status,systemctl list-units,systemctl showjournalctl -u,journalctl --sincelspci,lsusb,lsblk,df,free,uptime,uname -asensors,lsof
Git (extended):
git tag,git blame,git reflog,git stash listgit lfs status,git lfs ls-files
Development tools:
go version,go env,go list,go doc,go vetcargo --version,cargo tree,cargo metadatapython3 --version,python3 -m py_compilenode --version,pnpm list,uv pip list
General utilities:
rg,fd,cp,mv,chmodls,cat,head,tail,wc,find,whichecho,pwd,date,env,printenvfile,stat,du,tree,bat,ezajq,yq,tldrmkdir,rmdir,grep
Requires Confirmation
| Command | Permission |
|---|---|
rm * |
ask |
rm -rf * |
ask |
Always Denied
| Command | Permission |
|---|---|
sudo * |
deny |
Homelab VM Permissions
For agents running in dedicated homelab VMs, permissions are significantly relaxed:
| Category | Permission |
|---|---|
bash |
allow (most commands) |
edit |
allow |
write |
allow |
task |
allow |
external_directory |
allow |
rm |
allow |
Still restricted in homelab VMs:
- Production cluster destructive operations (
kubectl delete,helm uninstall) - Infrastructure teardown (
terraform destroy) - Secret exposure in logs
Other Tool Permissions
| Tool | Permission |
|---|---|
edit |
allow |
write |
allow |
task |
ask |
external_directory |
ask |
doom_loop |
deny |
Summary
- File operations:
read,glob,grep,edit,writeall allowed in workspace - Nix operations: Build/eval/flake commands auto-allowed (writes to store only)
- Linting & formatting: All check commands auto-allowed
- System diagnostics: Read-only system info auto-allowed
- Sensitive files: Credentials, keys, and cloud configs are blocked
- Destructive operations:
rmrequires explicit user confirmation - Privilege escalation:
sudois completely blocked - Scope control:
taskandexternal_directoryrequire approval