Agree with HK. Tack a 0.1 uF ceramic cap directly the ULN's GND and COM pins with the shortest possible leads, and see if the transient waveform is altered (or eliminated). If (hopefully) attenuated, tack on another one to see if things improve more. If yes, then you have a solution path to...