Sufficiently large resistors are a sufficient protection, just pick some that limit current to an acceptable range, depending on your logic level. You can later replace them with 0Ohm resistors or put a jumper in parralelparallel to short out the resistors if they are not used. Also note that inIn many cases, SPI works just well with a few hundreds of Ohms in series with the outputs.