antigen icon indicating copy to clipboard operation
antigen copied to clipboard

Allow suppressing compinit insecure warning

Open AbbyRH opened this issue 7 years ago • 4 comments

Description

Running zsh/antigen as root/sudo with my normal user's configuration causes a compinit prompt

zsh compinit: insecure directories and files, run compaudit for list.
Ignore insecure directories and files and continue [y] or abort compinit [n]?

I understand that this is to protect the user from using completions that could have been modified by another user and thus might be malicious.

Would it be possible to incorporate a variable test to silently ignore insecure files such as

if [[ $ANTIGEN_DISABLE_COMPAUDIT = true ]]; then
  compinit -d "<zcompdump>"
else
  compinit -i -d "<zcompdump>"
fi

Similar to how oh-my-zsh allows you to ignore insecure files: https://github.com/robbyrussell/oh-my-zsh/blob/master/oh-my-zsh.sh#L65

Steps to reproduce

Minimal steps to reproduce this behavior. Example:

1 - Open terminal
2 - sudo -s
3 - insecure files prompt is displayed

Expected behavior:

- if `$ANTIGEN_DISABLE_COMPAUDIT` is set to true, silently ignore insecure files

Software version

  • Antigen v2.2.2
  • zsh 5.1.1 (x86_64-ubuntu-linux-gnu)
  • Linux myhost 4.4.0-36-generic #55-Ubuntu SMP Thu Aug 11 18:01:55 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Configuration

  • gist of .antigenrc: doesn't exist
  • gist of .zshrc: https://gist.github.com/AbbyRH/a6467ac6ada924db6448bee21e4d4fc5

More information

AbbyRH avatar May 18 '18 17:05 AbbyRH

+1 drives me nuts

karibertils avatar May 31 '19 23:05 karibertils

Any known workarounds?

karloscodes avatar Oct 28 '19 17:10 karloscodes

Should have been fixes on 2.2.3 with PR https://github.com/zsh-users/antigen/pull/634.

goetzc avatar Apr 26 '20 21:04 goetzc

I just installed Antigen, along with a few Zsh plugins and I've got this issue, but without being sudo/root, just with my normal user, but shouldn't this be fixed already?

TakuyaSama avatar Aug 04 '20 15:08 TakuyaSama