-
-
Notifications
You must be signed in to change notification settings - Fork 2k
security: Improve trust model with plugin authors by controlling executed code #1293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
note: I know #954 was opened previously, this is effectively restarting that convo. The threat of a supply chain attack on vim plugins isn't impossible and I think we can make this project more secure pretty easily. It would also be quite helpful to register programs to call on plugin updates when they do occur, so users can have an opportunity to perform additional security validation of new code arriving. |
I want to surface this again and reframed it slightly as a security related concern (but it has user experience benefits too). |
I think there is some misunderstanding. When you run Here's an example.
call plug#begin()
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
Plug 'junegunn/seoul256.vim'
call plug#end()
" Generated by vim-plug
" Sat Mar 1 10:50:21 2025
" :source this file in vim to restore the snapshot
" or execute: vim -S snapshot.vim
silent! let g:plugs['fzf'].commit = '3ba82b6d87348b119f9a7fd168ad8a597a18b4b2'
silent! let g:plugs['fzf.vim'].commit = '6cda389bdea953c9c66a3cfe57e40463ffd61ae9'
silent! let g:plugs['seoul256.vim'].commit = 'b21c9e63f7c2d543db8b34a393a0b42ec7e9b891'
PlugUpdate!
call plug#begin()
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
Plug 'junegunn/seoul256.vim'
silent! let g:plugs['fzf'].commit = '3ba82b6d87348b119f9a7fd168ad8a597a18b4b2'
silent! let g:plugs['fzf.vim'].commit = '6cda389bdea953c9c66a3cfe57e40463ffd61ae9'
silent! let g:plugs['seoul256.vim'].commit = 'b21c9e63f7c2d543db8b34a393a0b42ec7e9b891'
call plug#end()
The process is a little cumbersome, but the functionality is there. Maybe the user can write a custom script to automate/simplify the process, but I guess it would be nice if vim-plug could help in some way. |
Uh oh!
There was an error while loading. Please reload this page.
Currently vim-plug doesn't appear to have a well supported means of controlling what source code is included+executed when vim starts up since the latest content is pulled in by default.
I think we should implement lockfile system for the following reasons:
The current snapshot feature, while useful, has limitations:
A lockfile approach would:
This feature would enhance vim-plug's utility for users prioritizing stability, reproducibility, and performance in their Vim/Neovim setups.
The text was updated successfully, but these errors were encountered: