I got the same message when I too tried to install on Sonoma. I thought my download was bad so I downloaded a new one - same result. I then found a fix online that blocks the Mac from issuing that warning (it was a command in the terminal, but I forgot what it was). That fixed it and it installed fine after- so the fike isn’t corrupted.