It sounds like you are tapping the alternator output of one of those "Inverter" type of generators (e.g. Honda EU1000i), and it looks as though the spikes are probably the result of circulating currents in an inadvertent ground loop.
One thing that is not entirely clear is whether or not those spikes are the result of some other phenomenon and not related to the inverter. Several questions to ask include:
1 - Any obvious ground loops in the set up of the scope? If the scope is being powered from the mains voltage "black box" inverter on the generator, all bets are off. (Is the original "black box" mains converter still present? Is its input "floating" or "ground referenced"?
2 - Placement of the connection of the scope leads to make the readings. If the ground lead of the scope was connected on the "common" ground at the input of the switching converter rather than the output, that could affect the magnitude of a pulse seen on the scope.
3 - Is the spike being conducted from the input to the output (perhaps via the ground lead) by input capacitance of the switcher? You didn't mention whether or not the "switching converter" providing the 5 volts was under load or not. If it is under a small/minimal load, place something in series with the voltage input of the switcher (a few ohms resistance, a large chunk of wire in a coil to provide resistance and inductance, etc.) to see if this dramatically effects the size of the pulse. (This may also be a "ground loop" issue - but if the switcher itself is a no-name EvilBay type, all bets are off!)
4 - Is this an artifact of the switcher itself in responding to the spike in the input? Stray reactance could cause the spike on the input to propagate through or cause the switcher itself to do some sort of odd glitching of its own. Again, no-name switchers can be suspect - particularly for buck-type.
I'd bet on #2 or #3 being the most likely (but definitely not rule out #1.)
The fix for this would be to place a significant amount of inductance in series with the input to the switcher - several TENS of microHenries at the very least, preferably a few hundred. Any capacitors to be added - which must be placed "downstream" of any inductance - must absolutely be of the "Low ESR" types intended for switching supplies ("normal" capacitors cannot be expected to work well) and the smallest value that you even want to start messing with would be 470uF - but I suspect that much more will be needed. (Again, if adding capacitance doesn't change anything, suspect a ground loop!)
You did not mention if this switching supply and its loads would be completely isolated (e.g. floating) from the generator in all ways (e.g. not connected in any way - directly or indirectly to its chassis or to the mains voltage converter onboard) but if it IS going to be referenced back somewhere, you will probably want to put such a choke in both the positive and negative input leads of the converter to reduce the probability of circulating currents.
Best of luck!
CT