According to section 10 of the official secrets act 1923, the penalty for harbouring spies or any such person who has committed an offence under section 3 of the act in India will be imprisonment of up to three years or a fine or both.