Most self tappers. No 8 (or 10 if the hole is worn) and "just" long enough to bite the bulkhead without going too far through. The solenoid is a BA thread, same as for the door striker plates - these screws are available from most suppliers, and a chrome head won't show too much in the engine bay.
If all you have to hand is the "longer " variety of self tappers, a slice of a cork / plastic wine stopper... put on the protruding end of the self tapper..... will prevent injury / shorting out wiring, etc.
At least I have a plausable excuse for enjoying a glass of wine !!