does anyone calculate substitution risk?

So a company can post collateral to borrow money (repo agreement) and they may have different options of collateral to post. I have to pay a return on their collateral while I hold it. Since, at the end of the day a human has to post that, they might not post collateral that gets the best return. If they do an audit or something and find that they can sub a bunch of stuff for a better return, I'll end up having to pay more.

Is there any way I can hedge that risk?

Until the borrower defaults, the performance of the collateral belongs to the borrower. If the collateral performs poorly, they can be asked to post additional collateral. Higher risk collateral usually requires a larger haircut. For example, if I want to post treasury bonds as collateral, I will likely be able to borrow \$99 for every \$100 of treasury bonds I post as collateral. If I want to use stocks, I might only be able to borrow \$30 per$100 of stocks posted. If the agreement gives me the flexibility to post different securities as collateral, it will likely come with a schedule of what is eligible how large the haircut will be and the interest rate depending on what I pick.