  Context: To effectively defend against ever-evolving cybersecurity threats,
software systems should be made as secure as possible. To achieve this,
software developers should understand potential vulnerabilities and apply
secure coding practices. To prepare these skilled professionals, it is
important that cybersecurity concepts are included in programming courses
taught at universities. Objective: To present a comprehensive and unbiased
literature review on teaching of cybersecurity concepts in programming courses
taught at universities. Method: We perform a Systematic Mapping Study. We
present six research questions, define our selection criteria, and develop a
classification scheme. Results and Conclusions: We select 24 publications. Our
results show a wide range of research contributions. We also outline guidelines
and identify opportunities for future studies. The guidelines include coverage
of security knowledge categories and evaluation of contributions. We suggest
that future studies should cover security issues, negative impacts, and
countermeasures, as well as apply evaluation techniques that examine students'
knowledge. The opportunities for future studies are related to advanced
courses, security knowledge frameworks, and programming environments.
Furthermore, there is a need of a holistic security framework that covers the
security concepts identified in this study and is suitable for education.
