It is a simple principle that works in pretty much every situation I have encountered.
To live a moral life (ie do the right thing) you can do whatever you want, but don't initiate harm.