Starfleet officers are expected to uphold Starfleet's General Orders (those that cover the actions of officers when conducting their duties).
JANEWAY: The one that's made of binding principles. We have our own set of rules, which includes the Prime Directive. How many times
have we been in the position of refusing to interfere when some kind
of disaster threatened an alien culture. It's all very well to say we
do it on the basis of an enlightened principle, but how does that feel
to the aliens? I'm sure many of them think the Prime Directive is a
lousy idea.
PARIS: Even we think so sometimes.
Starfleet officers are expected to adhere to (and uphold) Federation Law
NOG: As a Starfleet cadet, it's my duty to report any violation of Federation law to my superiors immediately. But then again, I
haven't been sworn in yet. I'll take ten percent.
DS9: Little Green Men
Starfleet officers are expected to comport themselves with the highest standards of decency and probity at all times, in a manner that befits a gentleman
JANEWAY: Lieutenant Thomas Eugene Paris. You are guilty of insubordination, unauthorised use of a spacecraft, reckless
endangerment, and conduct unbecoming an officer. Do you have anything
to say?
Voy: 30 Days
and
DATA: Perhaps it is best that I do not remember. I trust I did nothing unbecoming to a Starfleet officer?
TNG: The Schizoid Man
Given that Starfleet is largely based on a mixture of US and UK Naval traditions, I think we can be reasonably sure that the concept of CUBO is very much similar.
Every Person subject to this Act who shall be guilty of any profane Oath, Cursing, Execration, Drunkenness, Uncleanness, or other
scandalous Action in derogation of God's Honour and Corruption of good
Manners, shall be dismissed from Her Majesty's Service with Disgrace,
or suffer such other Punishment as is herein-after mentioned.
Every Officer subject to this Act who shall be guilty of Cruelty, or of any scandalous or fraudulent Conduct, shall be dismissed with
Disgrace from Her Majesty's Service; and every Officer subject to this
Act who shall be guilty of any other Conduct unbecoming the Character
of an Officer shall be dismissed, with or without Disgrace, from Her
Majesty's Service.
The Roayl Naval Discipline Act, 1861
and
Conduct violative of this article is action or behavior in an official
capacity which, in dishonoring or disgracing the person as an officer,
seriously compromises the officer’s character as a gentleman, or
action or behavior in an unofficial or private capacity which, in
dishonoring or disgracing the officer personally, seriously
compromises the person’s standing as an officer. There are certain
moral attributes common to the ideal officer and the perfect
gentleman, a lack of which is indicated by acts of dishonesty, unfair
dealing, indecency, indecorum, lawlessness, injustice, or cruelty.
US Uniform Code of Military Justice - Article 133