How to compare the energies of sigma and pi bonds in molecular orbitals of diatomic heteronuclear species?
Actually, the gist idea is the difference of energy between the  orbitals $E_{2s(\mathrm{A})}-E_{2p(\mathrm{B})}$ and $E_{2s(\mathrm{B})}-E_{2p(\mathrm{A})}$.
If the difference is less than 10 eV in absolute value, there are interactions between the orbitals $2s$ and $2p$ and the diagram for diatomic homo-nuclear species with $Z&lt;8$ is valid. (with a slight difference is that the levels of energy of the atomic orbitals of the  more electronegative atom are more negative than the those of the other one). This is the case for the molecules you propose, i.e. $\ce{CO}$ and $\ce{NO}$.