I'm not tech-savvy myself, but DOSBox is absolutely safe. In fact, every game or patch you download from GOG, whether using ScummVM, DOSBox or whatever, is 100% virus-free and guaranteed to run on almost every modern OS and machine.
You don't even need to download DOSBox, the games come with it and they do everything automatically, which for those -- such as myself -- who don't understand much about modding and meddling with the tech side of things, and have no interest in it, is very welcomed and appreciated. I just download the games and they run, easy as that.
Your anti-virus software might "detect a threat", but whenever that happens it's just a false positive, GOG wouldn't be where they are today if they sold faulty or virulent products. I can assure GOG is trustworthy, DOSBox is just an MS-DOS emulator to make old games run on modern systems.