Like Spare Parts is suggesting, the place on the engine where the wires exit, there's a black rubber grommet they usually pass through.
I'd get some Silicone window sealer and smear a little around the grommet opening in the left engine casing and inside the grommet where the wires pass through. Leave the magneto cover off while the silicone gel cures, it off gasses Acetic acid for about 48 hours and it will corrode parts.
Silicone the thin gasket to the magneto's cover with a very thin smear of silicone gel. That should seal up the magneto. After testing to see if all of the electrics all work well,( coil and kill switch..) I would also cut away the push on connectors for the coil and kill switch and directly solder them to the wires of the engine, so they are sealed together with heat shrink tubing to keep out the dirt.
I'm recommend fenders for bikes because the rain you will eventually encounter will spray water and road dirt everywhere on your bike. A front fender keep the worst of the dirt off your pedal chain and the front of your engine where the wires exit, the rear fender keep you clean and dry