We need to ramp up our space exploration efforts, however. The longevity of the species is highly dependent upon not being overly dependent on the mother planet.
Failing that, however, human DNA samples should be sent into deep space, so just in case humanity on Earth is wiped out, the human legacy will survive and perhaps, extraterrestrial beings with advanced technology might be able to reverse engineer human beings (why they would do it even if they could isn't well-defined, but if you have a chance, you've got to take it).
Five billion years from now, if Earth still exists, the sun will engulf it. This is inevitable.unless Earth got engulfed by Sun, aliens attacking Earth. Can happen?
The attack by ETs, not so much.