arduino's pin number 7, isn't it dangerous without resistor?
Your hypothesis is correct: in input mode, the pins have very high impedance, somewhere along the range of 10s of mega ohms. So there will be little current flowing into pin 7, and it is OK to use it as is. Note that pin 7 is NOT ground so there is no short circuit between power source and ground.

When you press the switch, current will flow primarily through the resistor. The voltage will rise and will be seen by pin 7 as a digital high.