-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
feat(cli): shorthands for --allow-* flags #19549
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I'm against this because it degrades the permission system by obscuring the meaning of the permission flags.
How could it not? All shorthands do; you can't preserve much meaning with a single letter. They only allow those that are aware of them to be quicker and more productive. E.g. |
Exactly. That's a huge issue for people who aren't aware of what the shorthand flags mean because this relates to Deno's security model. Looking at a deno command on the command line should be easily auditable for what permissions are being allowed. |
I'd argue that shorthands are as easily auditable as their longer form the more people use them. That's why some people aren't even aware of |
I disagree with the ls, vim, and tailwind comparison because those don't expand a security sandbox. I think it's less auditable because it requires looking up or knowing what each shorthand does. It also requires people to be on their toes about new shorthand flags that could open up the security sandbox. It's especially harmful to beginners who might accidentally open their security sandbox for scripts they don't want to because they never realized Deno even had short non-descriptive flags that opened the security sandbox and they just copy and pasted some command. |
I guess you are right. I'll wait the ending words of #19530 before closing this PR. |
I don't think this should land as stated by reviewer, but if its going to happen somehow, instead of reserving new ones I think these short flags make more sense:
|
As per #19530, adds the following short flags: