A code of conduct or code of behavior was a set of rules that governed one's actions.
In 2151, when speculating about how Matthew Ryan might react towards the starship that attacked him, Travis Mayweather suggested he would destroy it. Jonathan Archer disagreed, saying that Humans' innate codes of behavior were the same whether they were Starfleet officers or space boomers, like Ryan, and revenge wasn't their driving force. (ENT: "Fortunate Son")
Members of Starfleet were governed by a uniform code of conduct. Included in the code were non-violent dispute resolution processes. Members of Starfleet were expected to use with each other in the event they came in to conflict with others instead of physical combat. (DIS: "If Memory Serves")
The Dopterian Gorta had a personal code of conduct which prohibited sharing but allowed trading. In 2370, when marooned with Geordi La Forge and Data on Kalla III, he mentioned this fact when Data asked him to share information with them. La Forge questioned whether that same code affirmed that it was unwise to try to make a deal when there was no way of escaping the planet he was on, a point the Dopterian conceded. (TNG: "Firstborn")
Also that year, the Maquis Sakonna found the creation of the Rules of Acquisition, what she described as "a code of behavior for business transactions", to be both logical and reassuring, agreeing with Quark on the former. (DS9: "The Maquis, Part I")