Well.. that's exactly what happened to Solarwinds last year, didn't it?
Actually smarter than that - they got into the build system and added the malicious code in the build process so you couldn't see it in the repository.
Do you think it's that difficult for a state sponsored body to infiltrate into a commercial company?