m0useanswered grow question a year ago They look like caterpillars, they mostly likely eating the plant and then their excrement is going everywhere on on the buds.
I would trim the rot away and toss out anything that was right beside it.
This sucks but happens. I would not use it in anything like smoking or edibles, its trash now that its been soiled.
Good Luck!