If there is a security ship on the ground or a pad then it is there to guard the base. You will normally only see these for +++ bases. If you still want to attack the base you will have to deal with the ship first (sometimes more than one, but I rarely find that). If you bus the base before landing and take a shot at the ship on the pad then boos away to get out of range of the turrets, the security ship will follow you. You can then take it out before landing to launch your srv.
If there is a security ship just flying about, then it is just there by coincidence. Fly around for a bit and it will eventually leave the planet and you can get on with attacking the base in peace