Since the word beware is included before the word dog, “man’s best friend” should not come to mind as the objective of the idiom. However knowing that dogs are vicious would be the more likely message in the saying. One of the most vicious things that is evil is to gossip. Paul told the saints,
“Beware of dogs, beware of evil workers,…” Philippians 3:2a.
He was warning them to beware of gossipers, for they are vicious.