Sorry I haven't been clear. I have been scanned with only limpets and they move on. But I am often scanned while mining, while moving from one asteroid to another, after I already have some diamonds. Was attacked four times last night, by different pirates. All within one hotspot. The first chap wanted 644k credits' worth of cargo! That's when the fighter is doing its work while I carry on mining.
Have you got LTDs on board? As you are mining, perhaps they're picking up on a diamond signal and want to mug you. I tend to do this mining stuff when I know I have time to:
a) Let then scan
b) Have a good while lasering
c) Get back to a station to offload.
I lile to start afresh each time so I don't wake up in the hotspot and have nasties spawn on me.