The "risk" in CDS world refers to default risk, not spread risk. So when you are long risk, you are long default risk, which means you lose when the credit defaults, which means you are selling protection, which means you are harmed by spread widening. Makes sense?