I went to San Jose del Cabo two years ago and it was beautiful, and plenty safe. Walked around town several times off the resort I was at. Additionally, I’ve been to Puerto/Nuevo Vallarta twice in the last 4 years, all perfectly safe. Next year is Riviera Maya.
If you base your travel plans on something like this than don’t even think about traveling to Chicago, LA, New York, etc...
Are you aware that most of those resorts have former military patrol their perimeters at night wearing night vision glasses and carrying real automatic weapons. If they didn’t they’d be overrun with bad guys.
BTW every once in a while the bad guys get through and/or a guest gets shot by security.