I believe that if they do not enter Ukraine territory as combatants, it is not violating any laws. But then Russia has assumed that a bunch of Ukraine territory is Russian now. That is not recognized in law though. If they enter that territory as combatants I assume it is illegal. Thus raising the stakes.
Putin likes to use the technicality of law. But he also says the territories are Russian now. He just might test out his iffy legal theories.