How can I be sure that bitcoin mining software is not compromised? I have been interested of generating Bitcoins but how can I be sure that the software that is available for this is not somehow compromised?

My concern is that the software may have some backdoor (reverse shell or otherwise), but to what degree is this a valid concern? Are there any steps I can take to mitigate this risk?
cgminer / bfgminer are both open source, get it from the official repository and you can be fairly sure that some geek will have noticed if there's something suspicious! If you're talking about mining some altcoin with a custom hashing algorithm then you have a valid concern.