What are the possible challenges in balancing national security with individual rights when addressing illegal infiltration?

PM Modi announced a demographic mission to tackle illegal infiltration. I am curious about the difficulties governments face in ensuring security while protecting the rights of individuals, especially in sensitive issues like infiltration.