There are many scriptures that seem to contradict eternal security. For example, John 15:2 (key word IN ME), Romans 11:20-22, the parable Jesus gave in the gospels about salt losing it's flavor, Hebrews 6:4-6, Hebrews 10:24-27, 2 Peter 2:20-22, and many others. These verses seem to me that if I don't keep up the good fight of faith, keep doing my good works, then I could lose salvation.
True Christians do not leave the faith! That is the message of the Holy Spirit in the pages of scripture. Christians do not leave the faith for several reasons.
God Protects Us
First, Jesus said that He would not lose any Christian.
All that the Father gives Me shall come to Me, and the one who comes to Me I will certainly not cast out . . . And this is the will of Him who sent Me, that of all that He has given Me I lose nothing, but raise it up on the last day . . . No one can come to Me, unless the Father who sent Me draws him; and I will raise him up on the last day . . . And He was saying, “For this reason I have said to you, that no one can come to Me, unless it has been granted him from the Father.” (NASB) John 6:37, 39, 44, 65
In these passages, Jesus says that He “will not cast” and “I will raise him up.” The salvation of true Christians depends on Jesus and not on us. There are other New Testament passages which say the same thing (John 10:28-29; John 17:11-12; Romans 8:30, 38-39; Philippians 1:6, Jude 1).
The Evidence of No Faith
Second, Jesus illustrates true faith in the parable of the sower of the seed (Matt. 13:18-23); those who “hear and understand the Word” are saved.
Hear then the parable of the sower. When anyone hears the word of the kingdom, and does not understand it, the evil one comes and snatches away what has been sown in his heart. This is the one on whom seed was sown beside the road. And the one on whom seed was sown on the rocky places, this is the man who hears the word, and immediately receives it with joy; yet he has no firm root in himself, but is only temporary, and when affliction or persecution arises because of the word, immediately he falls away. And the one on whom seed was sown among the thorns, this is the man who hears the word, and the worry of the world, and the deceitfulness of riches choke the word, and it becomes unfruitful. And the one on whom seed was sown on the good soil, this is the man who hears the word and understands it; who indeed bears fruit, and brings forth, some a hundredfold, some sixty, and some thirty. (NASB) Matt. 13;18-23
There are four different kinds of soil in this parable: soil beside the road, rocky soil, soil with thorns, and good soil. In each of Jesus’ illustrations about the first three soils, the person heard and did not understand. Jesus said that only the last soil hears and understands. It is only the last soil that gives the evidence of true faith since it produces a lot of fruit. Some have said the first three examples are Christians who have fallen away. But Jesus says the first three never understood. Only the last soil type or person heard and understood. 1 Corinthians 2:10-15 explains why the last person is a Christian. A person needs the Holy Spirit in order to understand. This means the first three did not have the Holy Spirit. They were not Christians.
True Christians Remain
1 John 2:19 is the most significant passage in dealing with this question.
They went out from us, but they were not really of us; for if they had been of us, they would have remained with us; but they went out, in order that it might be shown that they all are not of us. (NASB) 1 John 2:19
True Christians remain.
Explanations of the passages you mentioned can be found at this site. Your questions about Hebrews 6:4-6 and Heb. 10:24-27 are found by paying careful attention to the Greek language and illustrations within the verses themselves. I would encourage you to read the explanations at these links and then read the follow-up study to Hebrews 6:4-6.
Jesus’ illustration of the vine and branches is an illustration of those who think they are Christians and those who are Christians.
I am the true vine, and My Father is the vinedresser. Every branch in Me that does not bear fruit, He takes away; and every branch that bears fruit, He prunes it, that it may bear more fruit . . . I am the vine, you are the branches; he who abides in Me, and I in him, he bears much fruit; for apart from Me you can do nothing. If anyone does not abide in Me, he is thrown away as a branch, and dries up; and they gather them, and cast them into the fire, and they are burned. (NASB) John 15:1-2, 5-6
The key to unlocking this passage is to note that in verse two Jesus refers to those who are “in Me,” but in the remaining verses He talks about those who “abide in Me and I in them” (V. 4, 5, and 7). Later in verses 5 and 6 Jesus says that those who are in Him “bear much fruit for apart from Me you can do nothing.” Jesus actually explains “in Me.” Jesus says that those who “abide in Me” will produce fruit. So if someone does not produce fruit, they were never abiding in Him. Jesus is being careful with His words. “Abiding” is the issue. Those who are “in Me” are not necessarily Christians. Judas was in Jesus, but he did not abide because he did not produce fruit. He was eventually cut off.
The Romans 11:20-22 passage is talking about the nation of Israel and Gentiles. You may want to review an explanation given of Romans 11:17. This section in Romans is not dealing with individuals but with the high position given to Gentiles in the church at this point in time. Paul is talking about the mystery of the church.
For I do not want you, brethren, to be uninformed of this mystery, lest you be wise in your own estimation, that a partial hardening has happened to Israel until the fulness of the Gentiles has come in . . . (NASB) Romans 11:25
2 Peter 2:20-22
The most difficult passage to understand is this one. The key to understanding it is found in the verses before it or in the context. Chapter two is talking about false prophets.
But false prophets also arose among the people, just as there will also be false teachers among you, who will secretly introduce destructive heresies, even denying the Master who bought them, bringing swift destruction upon themselves. (NASB) 2 Peter 2:1
Later in verse 17 the Holy Spirit says they are like “springs without water” and in verse 19 “slaves of corruption.” They are not Christians. These men have come into the church and gained a position of influence and later started teaching error. Jude 4 has some words for these men and women.
For certain persons have crept in unnoticed, those who were long beforehand marked out for this condemnation, ungodly persons who turn the grace of our God into licentiousness and deny our only Master and Lord, Jesus Christ. (NASB) Jude 4
The teachers knew the way of truth and “cleaned up” their life. Externally, they “escaped the defilements.” Judas looked good to the other disciples. During the last supper when Jesus said one of them would betray Him, they were surprised and started asking, “Who?” Yet, Judas was never real. He was stealing their money all along (John 12:6; 13:29). Judas looked good to everyone. These prophets did too.
For if after they have escaped the defilements of the world by the knowledge of the Lord and Savior Jesus Christ, they are again entangled in them and are overcome, the last state has become worse for them than the first. For it would be better for them not to have known the way of righteousness, than having known it, to turn away from the holy commandment delivered to them. (NASB) 2 Peter 2:20-21
They knew the way, but they turned away. They were like the seed which fell fell beside the road, on rocky soil and beside the thorns. The heard but did not understand. They exploited the church but never believed in Jesus.
Is salvation by faith or works? If my works were never good enough to save me (Romans 3:10-12) why should they have any efficacy – spiritual benefit – to keep me saved? Is salvation by works or faith? Yes, my works are the result of being saved because the Holy Spirit produces them in me, but they do not save me. Why should God “unsave” me because of my works after He had already saved me when I was only doing bad works? I was a sinner and not an enemy (Rom. 5:10). Praise God that He saved me and forgave me all of my sins – even the ones I will commit in the future. Praise the Lord, there are no sins that He holds against me now to deny me eternal salvation (Heb. 9:28, 10:10).