The New Testament makes it clear that to preserve your soul for eternal life, you must be victorious over the devil (1 Cor. 6; Gal. 5; Rev. 2-3, 21-22).
How does one overcome the devil?
Faith in Christ is the main requirement (1 John 5:4-5), which is understandable as the keeping of Christ's commandments and other words (John 15:10-14, Luke 6:46-49 etc.).
Altogether there are seven parts of the armor of God: truth, righteousness, faith, salvation, readiness of the gospel of peace, the sword of the Holy Spirit (which is God's Word), and prayer (Ephesians 6:10-19).