I wasn't referring specifically to solar flares either, I've made an edit to make that more clear. It's simply flat out wrong to state that ordinary cosmic rays that are dangerous to human beings penetrate through planet sized masses of matter. The only thing that does so is neutrinos and the only way you're going to get sufficient neutrino flux to be hazardous is if you're very close to a type-II supernova, which is an extraordinarily exceptional event.
Just wanted to point out he was talking about cosmic rays with the planet comment. And added the ;) to try and not be a dick about it. Not sure how that worked out.