github / github/copilot.vim

Automatically disable copilot in dotenv files

Offen
#135 0 Kommentare 9 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Vim Script
Sterne
11.7k
Forks
810
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.