In my opinion, in the maritime world, Security is preparing and preventing against external attack from outside parties such as robbers, pirates etc. while Safety is preparing and preventing accidents and injuries to oneself and others from causes such as fire, slips and falls, explosion, cuts and bruises, enclosed space hazards etc. If persons on board are secure against external threat then they are safe. However, if they are safe does not mean that they are secure. Security is one aspect of safety.
In some contexts the USCG has had two categories to group some of its missions: maritime safety, and maritime security. Similar to how R.Agrawal described in his post, the safety category has to do with non-hostile or non-attack factors such as search and rescue; crew and passenger health, protection from adverse weather, both of which include personal protective equipment (PPE) and other gear; Aids to navigation; Accident investigations; Safety regulations; etc. The security category is about national defense readiness, response, and law enforcement. Other than that, maritime dictionary/thesaurus and other sources might provide insights. Hope it helps.