The presented work examines the aspects of legal regulation of migration policy and its impact on the planning of defense and security facilities. It notes the threat to national security posed by foreign citizens and stateless persons who enter the country in violation of migration laws. The conclusion is that the planning of defense and security facilities should take into account the proportion of foreign citizens and stateless persons residing in populated areas.