I know Cardiff well but haven't lived there since about 7 years, so things might have changed......or they might not.
Are there any dodgy ones or is it all fine?
Emphatically yes - there are definitely dodgy areas. I wouldn't live in Ely or Tremorfa. Splott is a bit mixed but a bit rough around the areas.
Cardiff Bay (aka Tiger Bay) is an odd place. There is a very deprived area right next to swanky flats. The swanky bit feels very soulless, artificial and bland. It didn't feel like a community to me and I think it's do with the newness and design of the place, of the architecture. The whole are can be dodgy at night for women, especially if you walk up that large avenue to the city centre.
Cathays is studentville, and safer, but also dirtier and noisier due to students having houseparties. Seeing vomit in the middle of the road, dog shit and rubbish blowing around was a common occurrence there.
Canton used to be a bit creative, a bit hipster due to the presence of Chapter Arts centre but I'm not sure if it's still like that. When I used to live there, there did used to be higher proportion of men than women, like 60 / 40....and strange men too! I don't know why Canton, and where they came from, but it was noticeable. I got the most sexual harassment when I lived in Canton and my housemates had the same experience.
Roath is mixed - some bits are a bit nicer than others.
Riverside feels a bit rough - I saw several prostitutes there once during the day when I went to see a house to rent.
I agree with @Reddog1 that Rhiwbina, Whitchurch and Heath are nicer places to live. I'm not familiar with Thornhill. I would add Pontcanna and maybe Llandaff North as desirable as well (I think BBC staff live in those areas). Tongwynlais is on the edges, but I'd add that too.