What is the correct use of "safety" and "security"?

Solution 1:

I found a very interesting paper on the differences of safe and secure. Here's the summary:

enter image description here

Although the paper is mainly about these words in the economical context, I think it explains quite clearly the differences in general. If I were to summarize the above table into a single line, I would agree with your friend in that roughly

"Safety" is about accidental causes, and "security" is about intentional causes.