In the original movie, "The Day The Earth Stood Still" mankind was warned about exporting nuclear weapons to outer space. This was against Galactic Law and if continued a robot enforcer like "Gort" above would stop it.
All nations have a legal system that classifies some activities as criminal behavior. A good example is "The Canadian Justice Code". All civilized societies on Earth follow the principle of "Rule of Law". No ruler or governing body is above the law and this was stated 1000 years ago in "The Magna Carta".
A legal system on a Galactic level would be similar to the ones on Earth, but it would probably focus on crimes that are difficult to enforce on a terrestrial level. These would be:
- Human Slavery on other planets
- Mass murder of populations/genocide and murder
- Mind Control of Populations
- Human abduction and kidnapping without consent by aliens or military personnel.
- Impeding judicial procedures and investigations of crimes against humanity.
- Plans for depopulating the planet.
- Suppressing inventions that would assist humanity.
- Monopolistic control of financial and corporate businesses by a small elite.
- Public disinformation campaigns on UFOs and ufologists.
- Making illegal agreements with extraterrestrials without public knowledge or oversight.
- Unacknowledged black operations that have cost the U.S. trillions of dollars.
- The theft of human DNA by "extraterrestrial farmers".