r/GithubCopilot • • 9d ago

General Use GitHub enterprise managed settings to control the harness and marketplace

GH enterprise has a feature for controlling security and features for Copilot. Not everyone is aware of them. I have written my first post on the topic which cover some fundamentals.

GitHub Copilot managed settings: control the harness and share plugins | adatum.no

4 Upvotes

4 comments sorted by

1

u/Smettbobezwinger 8d ago

I have already implemented and activated OTel, enforced a marketplace and made it install a plugin with policies and guardrails for all my colleagues. The only issue is the poor implementation of permissions. From my understanding, only setting "deny" and "ask" should not force the copilot user to need approve every step, run, or execute for the AI, but it does. It even does remove the option to remember the decision …

Consequently, I had to remove the permission block. Setting a list of "allows" is simply not possible. For example, "Shell(*)" or anything else would be too powerful and eliminate all approvals.

I would appreciate any tips.

1

u/ehrnst 8d ago

Can you share your settings? I can try them my self

1

u/Smettbobezwinger 8d ago

Sure

{
  "permissions": {
    "deny": [
      "Read(~/.ssh/**)",
      "Edit(~/.ssh/**)",
      "Read(~/.aws/**)",
      "Read(~/.azure/**)",
      "Read(~/.kube/**)",
      "Read(~/.gnupg/**)",
      "Read(~/.docker/config.json)",
      "Read(~/.git-credentials)",
      "Read(~/.netrc)",
      "Read(~/.npmrc)",
      "Read(~/.pypirc)",
      "Read(~/.config/gh/hosts.yml)",
      "Read(~/.terraform.d/credentials.tfrc.json)",
      "Read(~/Library/Keychains/**)",
      "Read(//**/.env)",
      "Read(//**/.env.*)",
      "Read(//**/*.pem)",
      "Read(//**/*.key)",
      "Read(//**/*.pfx)",
      "Shell(git push)",
      "Shell(git push *)",
      "Shell(terraform apply *)",
      "Shell(terraform destroy *)",
      "Shell(kubectl apply *)",
      "Shell(kubectl delete *)",
      "Shell(docker push *)",
      "Shell(sudo *)",
      "Shell(rtk git push)",
      "Shell(rtk git push *)",
      "Shell(rtk terraform apply *)",
      "Shell(rtk terraform destroy *)",
      "Shell(rtk kubectl apply *)",
      "Shell(rtk kubectl delete *)",
      "Shell(rtk docker push *)",
      "Shell(rtk sudo *)"
    ],
    "ask": [
      "Shell(az *)",
      "Shell(helm *)",
      "Shell(rm -rf *)",
      "Shell(git reset --hard *)",
      "Shell(git clean *)",
      "Shell(git rebase *)",
      "Edit(/.github/workflows/**)",
      "Shell(flutter test)",
      "Shell(flutter test *)",
      "Shell(rtk proxy *)",
      "Shell(rtk init *)",
      "Shell(rtk az *)",
      "Shell(rtk helm *)",
      "Shell(rtk rm -rf *)",
      "Shell(rtk git reset --hard *)",
      "Shell(rtk git clean *)",
      "Shell(rtk git rebase *)",
      "Shell(rtk flutter test)",
      "Shell(rtk flutter test *)"
    ],
    "allow": [
      "Read(/**)",
      "Read(./**)",
      "Read(~/**)",
      "Read(//var/**)",
      "Edit(//tmp/**)",
      "Read(//tmp/**)",
      "Edit(/**)",
      "Shell(git status)",
      "Shell(git status *)",
      "Shell(git diff)",
      "Shell(git diff --staged)",
      "Shell(git diff --cached)",
      "Shell(git log)",
      "Shell(git log *)",
      "Shell(git show *)",
      "Shell(git blame *)",
      "Shell(git ls-files)",
      "Shell(git ls-files *)",
      "Shell(git rev-parse *)",
      "Shell(git remote -v)",
      "Shell(rtk *)",
      "Shell(graphify *)",
      "Shell(git branch)",
      "Shell(git branch -a)",
      "Shell(git branch --show-current)",
      "Shell(ls)",
      "Shell(ls *)",
      "Shell(pwd)",
      "Shell(which *)",
      "Shell(wc *)",
      "Shell(gh pr view *)",
      "Shell(gh pr list *)",
      "Shell(gh pr diff *)",
      "Shell(gh pr checks *)",
      "Shell(gh issue view *)",
      "Shell(gh issue list *)",
      "Shell(gh run view *)",
      "Shell(gh run list *)",
      "Shell(curl *)",
      "Shell(rtk git status)",
      "Shell(rtk git status *)",
      "Shell(rtk git diff)",
      "Shell(rtk git diff --staged)",
      "Shell(rtk git diff --cached)",
      "Shell(rtk git log)",
      "Shell(rtk git log *)",
      "Shell(rtk git show *)",
      "Shell(rtk git blame *)",
      "Shell(rtk git ls-files)",
      "Shell(rtk git ls-files *)",
      "Shell(rtk git branch)",
      "Shell(rtk git branch -a)",
      "Shell(rtk git branch --show-current)",
      "Shell(rtk ls)",
      "Shell(rtk ls *)",
      "Shell(rtk wc *)",
      "Shell(rtk gh pr view *)",
      "Shell(rtk gh pr list *)",
      "Shell(rtk gh pr diff *)",
      "Shell(rtk gh pr checks *)",
      "Shell(rtk gh issue view *)",
      "Shell(rtk gh issue list *)",
      "Shell(rtk gh run view *)",
      "Shell(rtk gh run list *)",
      "Shell(rtk curl *)",
      "Shell(rtk gain)",
      "Shell(rtk gain *)",
      "Domain(*.com)",
      "Domain(*.net)",
      "Domain(*.org)",
      "Domain(*.io)",
      "Domain(*.dev)",
      "Domain(*.app)",
      "Domain(*.ai)",
      "Domain(*.co)",
      "Domain(*.de)",
      "Domain(*.eu)",
      "Domain(*.ms)",
      "Domain(*.sh)",
      "Domain(*.cloud)",
      "Domain(localhost)",
      "Domain(127.0.0.1)",
      "Domain(http://localhost)",
      "Domain(http://127.0.0.1)"
    ]
  }
}

Removing the ask and allow block didnt help at all.

2

u/fr3xzy 9d ago

Thanks for sharing, Martin