You're both correct. Front running has legal and illegal versions. Getting any non-public information and using it for trading purposes is illegal, however you can still front-run with public information. Markets react at different speeds and so do indexes, if your machine is set up closer to the exchange and has a faster algorithm you can front-run an index by using information about the changes in the index's stocks.
In the case of this sort of information-speed arbitrage you're not making any stock analysis decisions, you just know an index has to respond a precise way to the stocks within it, and you're able to beat this information to the exchange and buy it ahead of the change.