I was on tour with a local guide, in 3 favelas and I felt safe. There is a lot of favelas, some are better and some are worse. Some are basically "safe" when you live there, normal shops, schools and so on. Petty crime is often worse in the good streets below, because thugs and kids go to steel from tourists. I would not go the by my self at night. But there are big differences between favelas.