城堡準則（英文：castle doctrine，又叫做堡壘原則），仲有城堡法（castle law）同居所防禦法（defense of habitation law）幾個名，係一個法律原則畀人有居住防衛權，呢個概念係由羅馬法度來，喺英美法地區度通行。準則係賦予咗他人喺住屋或其他合法佔用場地（似私家車同屋企，美國一啲洲仲包含咗返工地等場地）擁有防衛與​​豁免嘅權利，允許咗他人面對進犯者陣可用武力（包括致命武力）防衛同對抗，並豁免由之引起嘅法律責任。
The castle doctrine (also known as the castle doctrine), also known as the castle law and the defense of habitation law, is a legal principle that allows people to have the right to defend their residence, a concept that came from Roman law and is common in the common law region. The norm gives others the right of defense and immunity in a house or other lawfully occupied place (such as a private car and home, and in the case of workplaces in the United States), allows others to defend and confront the invading front by force, including lethal force, and exempts them from legal liability arising therefrom.