take precautions in order to avoid some unwanted consequence(verb.social)
Example: Guard against becoming too friendly with the staff.
Guard against infection.
source: wordnet30
To protect from danger; to secure against surprise, attack, or injury; to keep in safety; to defend; to shelter; to shield from surprise or attack; to protect by attendance; to accompany for protection; to care for.(verb)
source: webster1913
To watch by way of caution or defense; to be caution; to be in a state or position of defense or safety; as, careful persons guard against mistakes.(verb)