plugins: homebrew: Add "brew audit" to allowlist#494
Conversation
|
If you're new to commit signing, there are different ways to set it up: Sign commits with
|
Signed-off-by: Matt Coster <opensource@mtcoster.net>
aaf5a6f to
1590938
Compare
edif2008
left a comment
There was a problem hiding this comment.
Thank you for your contribution! 😄
I've left only one question that is related to backwards compatibility when it comes to adding authentication for the Shell plugin to new subcommands that didn't require it before.
| needsauth.NotForHelpOrVersion(), | ||
| needsauth.IfAny( | ||
| needsauth.ForCommand("search"), | ||
| needsauth.ForCommand("audit"), |
There was a problem hiding this comment.
How will this affect current users that don't expect to be asked to authorize the Shell plugin for this subcommand?
Is this something that we want to accept from now on?
There was a problem hiding this comment.
Just quickly checked brew audit usage and it does seem like there are use cases where you would not require authentication.
So I think we need to scope this down so that auth is only provided when it's required. For:
- Security: provide access least privilege only when needed.
- Productivity: only bother user with authorization prompt when needed.
I imagine a flag like --online or --tap may indicate there's a need for auth, but I'll defer to @MTCoster who has more context on the use cases for this command.
We can implement using needsauth.IfAll combined with the current needsauth.ForCommand and a new to be created in needsauth/helpers.go WhenContainsArgs (which can share most of its logic with existing NotWhenContainsArgs).
|
@MTCoster Just wanted to see if you were still interested in taking this PR forward. There are some minor changes and decisions that need to be made before finalizing things. Happy to give this a review after the current changes are addressed! |
Overview
Allow the homebrew plugin to provide the token for the
auditsubcommand. Also re-sort the existing subcommands.Type of change
How To Test
Changelog