Sun Tzu said this quote

You can ensure the safety of your defense if you only hold positions that cannot be attacked.