mirror of
https://github.com/FiloSottile/mkcert.git
synced 2026-04-25 13:36:02 +03:00
[GH-ISSUE #236] Automatic sudo fallback is scary! #151
Labels
No labels
TLS stack issue
Windows
bug
duplicate
duplicate
enhancement
help wanted
help wanted
pull-request
question
question
root store
waiting for info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mkcert#151
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mgeorge on GitHub (Jan 16, 2020).
Original GitHub issue: https://github.com/FiloSottile/mkcert/issues/236
If the user wants to give mkcert the ability to run as root via sudo then they should explicitly do so.
Having a process fallback to running via sudo automatically itself is very scary. It basically allows mkcert to piggy back root privileges of the back of another unrelated command's sudo timeout window.
This is pretty ripe for abuse. It is also very surprising when you run mkcert without sudo and discover that has somehow magically managed to write to your system trust store. This is exactly what happened to me, and led to me trying to figure out how this happened.
Printing a message saying "That operation requires root - rerun with sudo" should be all that is needed.
@renatofrota commented on GitHub (Feb 11, 2024):
This is actually wonderful. And a great reminder that you must review (or trust) the code you run on your machine, no matter you are adding sudo in front of it (manually) or not.
If you do not trust someone's code (hint: mkcert), do not run it - or fully inspect it before doing so.