In the beginning of Halo 2, Regret invaded the Earth.
But, in Halo: Combat Evolved, Covenant didn't know anything about Earth.
Captain Jacob Keyes: "Report!"
Cortana: "It must have been one of their boarding parties! I'd guess an Antimatter Charge!"
Fire Control Officer: "Ma'am! Fire control to the main cannon is offline!" Cortana: "Captain, the cannon was my last offensive option."
Captain Jacob Keyes: "Alright then. I'm initiating Cole Protocol, Article 2. We're abandoning the Autumn. That means you too, Cortana."
Cortana: "While you do what, go down with the ship?"
Captain Jacob Keyes: "In a manner of speaking. The object we found, I'm going to try and land the Autumn on it."
Cortana: "With all due respect, sir, this war has enough dead heroes."
Captain Jacob Keyes: "I appreciate your concern, Cortana, but it's not up to me. Protocol is clear. Destruction or capture of a shipboard AI is absolutely unacceptable, that means you're leaving the ship. Lock in a selection of emergency landing zones, upload them to my neural lace, and then sort yourself for a hard transfer."
Cortana: "Aye aye, sir."
Captain Jacob Keyes: "Which is where you come in, Chief. Get Cortana off this ship. Keep her safe from the enemy. If they capture her, they'll learn everything. Force deployment, weapons research... Earth."
Master Chief: "I understand."
In the end, 343 Guilty Spark got into data array of Cortana, but data didn't go into the hands of the Covenant.
In Halo 2, Covenant prophets did capture 343 Guilty Spark, but that was after Regret invasion of Earth.
How did Regret get coordinates of Earth to get here?