github / github/copilot.vim

Automatically disable copilot in dotenv files

Đang mở
#135 0 bình luận 9 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Vim Script
Star
11.7k
Fork
810
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

It seems like a big security issue to have Copilot running by default within dotenv files (i.e. `.env`) that contain extremely sensitive information (API keys, access tokens, passwords, etc).

Can this be disabled by default?

I've circumvented this locally with this code in my vimrc:

```vimscript
augroup dotenv_detect
autocmd!
autocmd BufRead,BufNewFile *.env,*.env.* set filetype=dotenv
augroup END

let g:copilot_filetypes = {
\ '*': v:true,
\ 'dotenv': v:false
\ }
```

But this feels like a pretty general best practice that should be opt-out, not opt-in.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.