I recall reading somewhere once that installing software while logged in as SU is very bad for security, but DNF will only run under root authority. Is using SUDO the safe way to run my software installation script or do I need to do something different?

Thanks in advance for your help