SonarCloud in GitHub doesn't recognise C# 12 primary constructors and this triggers various false negatives in validation rules.
One example is below, here Sonar interprets a class with primary constructor as an empty class - which is not empty. There are other issues, but it seems like SonarCloud is either not up to date or some configuration might be required?
After some more digging found this :
https://community.sonarsource.com/t/net-8-and-c-12-support/103931
Looks like we'll have to wait until it's sorted out.