Lying falls under false witness, which is sinful. However, in Joshua 2:3-6, the woman covers for two spies by lying. This is viewed by most as righteous act of faith or courage and not as a sinful act.
I am generally someone who rejects situational ethics (often taught by Jesuits to justify sinful behavior). I think that lying is wrong, but sometimes necessary. Just like steeling is immoral, but sometimes necessary to protect someone from death, which it was believes that the two spies might have been killed had the woman not covered for them.