Possibility of viruses from opening dmg file?
If you just opened the .dmg image and didn't manually open any file or run any program located inside it, you're fine: as far as I know, there's no "autorun" functionality on DMG images in macOS.