I don't think I've ever had this problem come up in my 40 years of reporting so I really don't know what I would do. Assuming there was no "f--" with just the letter "F" verbalized (that's the word you're referring to I take it) I think I would just use a dash. It's sorta like the speaker is changing what he/she wanted to say mid-sentence, mid-word, or 'tween words. I think I would do: I asked her, "What the -- was going on." with the quotation marks, indicating the direct quote.
I like first instincts. I think the clearest transcription is : I asked her what the ____ was going on. I think it's clear the witness did not say: what the "blank" was going on and the most common reading would be to simply "stutter step" over the blank, as it was heard. I think the (sic) is okay but sort of confuses in a way.
I've had a slight variation on this. Being Irish, we're known for our "colorful" language and I had a witness recently who actually sanitized her own testimony. It went something like this:
A. Well, I just said 'what the beep are ya doin' over there, ya beepin' beeper?' And then he called me a fat beep! Well, I'm not having that, so I let him have it, just you know, 'Get out of my face you mother-beeper'.
But can I just say that I didn't actually say 'beep' Judge, I really said...
JUDGE: ...Thank you so much, Mrs Clancy, I think everyone here understands exactly what you mean.
It certainly raised a few eyebrows :)
But back on point, I agree with Phil, if she didn't say anything then I'd use the dash.