Assessing security implications of using generative AI in software development in Tanzania: A quantitative study

Authors

DOI:

https://doi.org/10.51867/ajernet.7.4.126

Keywords:

Generative AI,, software development, AI Assistants, cybersecurity, chatGPT

Abstract

Generative artificial intelligence (AI) is increasingly used in software development, raising concerns about the security of AI-generated code. This study assessed the security implications of generative AI use in software development in Tanzania. A quantitative, cross-sectional survey design, guided by the Technology Acceptance Model (TAM) and Protection Motivation Theory (PMT), was employed to collect structured questionnaire responses from 77 software developers. Descriptive statistics and non-parametric tests, including Spearman’s rank correlation and the Kruskal–Wallis test, were used to examine four hypotheses. The findings showed that 78% of respondents used generative AI tools daily or several times a week, with ChatGPT being the most commonly used tool (68.8%). Respondents generally perceived these tools as easy to use (mean = 3.94), while trust in the security of AI-generated code was relatively low (mean = 2.93). Programming experience was significantly associated with trust in AI-generated code security (H(4)=17.431, p=.002). Respondents with less than one year of programming experience reported higher trust than several more-experienced groups. However, no statistically significant relationships were found between AI usage frequency and perceived security risk, AI tool choice and reported security issues, or perceived ease of use and perceived security risk. The findings highlight the importance of reviewing AI-generated code, applying secure coding practices, and conducting security testing. Larger studies incorporating objective code-security assessments are recommended to strengthen the evidence.

Downloads

Download data is not yet available.

Author Biography

  • Mr Kelvin Vedasto Katto, College of business Education (CBE)

    Department of ICT and Mathematics, College of Business Education, Tanzania.

References

Annapureddy, R., Fornaroli, A., & Gatica-Perez, D. (2025). Generative AI Literacy: Twelve Defining Competencies. Digital Government: Research and Practice, 6(1), 1-21. https://doi.org/10.1145/3685680

Asare, O., Nagappan, M., & Asokan, N. (2023). Is GitHub's Copilot as bad as humans at introducing vulnerabilities in code? Empirical Software Engineering, 28(6), 129. https://doi.org/10.1007/s10664-023-10380-1

Banyasz, P., Szadeczky, T., & Vaczi, K. B. (2024). The relationship between generative artificial intelligence and cybersecurity. Proceedings of the Central and Eastern European eDem and eGov Days 2024, 209-215. https://doi.org/10.1145/3670243.3670781

Binamungu, L. P., Maro, S., Justo, G., & Ndanguzi, J. (2024). Assessing Software Safety Knowledge and Skill Gaps in Tanzania. 2024 IST-Africa Conference (IST-Africa), 1-8. https://doi.org/10.23919/IST-Africa63983.2024.10569763

https://doi.org/10.23919/IST-Africa63983.2024.10569763

Brown, A., D'Angelo, S., Murillo, A., Jaspan, C., & Green, C. (2024). Identifying the Factors That Influence Trust in AI Code Completion. Proceedings of the 1st ACM International Conference on AI-Powered Software, 1-9. https://doi.org/10.1145/3664646.3664757

Bull, C., & Kharrufa, A. (2023). Generative AI Assistants in Software Development Education: A vision for integrating Generative AI into educational practice, not instinctively defending against it. https://doi.org/10.48550/ARXIV.2303.13936

Cotroneo, D., Improta, C., Liguori, P., & Natella, R. (2024). Vulnerabilities in AI Code Generators: Exploring Targeted Data Poisoning Attacks. Proceedings of the 32nd IEEE/ACM International Conference on Program Comprehension, 280-292. https://doi.org/10.1145/3643916.3644416

Dakhel, A. M., Majdinasab, V., Nikanjam, A., Khomh, F., Desmarais, M. C., Ming, Z., & Jiang. (2023). GitHub Copilot AI pair programmer: Asset or Liability? (arXiv:2206.15331). arXiv. https://doi.org/10.48550/arXiv.2206.15331

Davila, N., Wiese, I., Steinmacher, I., Lucio Da Silva, L., Kawamoto, A., Favaro, G. J. P., & Nunes, I. (2024). An Industry Case Study on Adoption of AI-based Programming Assistants. Proceedings of the 46th International Conference on Software Engineering: Software Engineering in Practice, 92-102. https://doi.org/10.1145/3639477.3643648

Davis, F. D. (1989). Perceived Usefulness, Perceived Ease of Use, and User Acceptance of Information Technology. MIS Quarterly, 13(3), 319. https://doi.org/10.2307/249008

Falcão, F. D. S., & Canedo, E. D. (2024). Investigating Software Development Teams Members' Perceptions of Data Privacy in the Use of Large Language Models (LLMs). Proceedings of the XXIII Brazilian Symposium on Software Quality, 373-382. https://doi.org/10.1145/3701625.3701675

Fu, Y., Liang, P., Tahir, A., Li, Z., Shahin, M., Yu, J., & Chen, J. (2025). Security Weaknesses of Copilot-Generated Code in GitHub Projects: An Empirical Study. ACM Transactions on Software Engineering and Methodology, 3716848. https://doi.org/10.1145/3716848

Hamer, S., d'Amorim, M., & Williams, L. (2024). Just another copy and paste? Comparing the security vulnerabilities of ChatGPT generated code and StackOverflow answers. 2024 IEEE Security and Privacy Workshops (SPW), 87-94. https://doi.org/10.1109/SPW63631.2024.00014

He, J., & Vechev, M. (2023). Large Language Models for Code: Security Hardening and Adversarial Testing. Proceedings of the 2023 ACM SIGSAC Conference on Computer and Communications Security, 1865-1879. https://doi.org/10.1145/3576915.3623175

He, R., Cao, J., & Tan, T. (2025). Generative Artificial Intelligence: A Historical Perspective. National Science Review, nwaf050. https://doi.org/10.1093/nsr/nwaf050

Klemmer, J. H., Horstmann, S. A., Patnaik, N., Ludden, C., Burton, C., Powers, C., Massacci, F., Rahman, A., Votipka, D., Lipford, H. R., Rashid, A., Naiakshina, A., & Fahl, S. (2024). Using AI Assistants in Software Development: A Qualitative Study on Security Practices and Concerns. Proceedings of the 2024 on ACM SIGSAC Conference on Computer and Communications Security, 2726-2740. https://doi.org/10.1145/3658644.3690283

Kudriavtseva, A., Hotak, N. A., & Gadyatskaya, O. (2025). My Code Is Less Secure with Gen AI: Surveying Developers' Perceptions of the Impact of Code Generation Tools on Security. Proceedings of the 40th ACM/SIGAPP Symposium on Applied Computing, 1637-1646. https://doi.org/10.1145/3672608.3707778

May, R., Krüger, J., & Leich, T. (2024). SoK: How Artificial-Intelligence Incidents Can Jeopardize Safety and Security. Proceedings of the 19th International Conference on Availability, Reliability and Security, 1-12. https://doi.org/10.1145/3664476.3664510

Mellinger, C. D., & Hanson, T. A. (2021). Methodological considerations for survey research: Validity, reliability, and quantitative analysis. Linguistica Antverpiensia, New Series - Themes in Translation Studies, 19. https://doi.org/10.52034/lanstts.v19i0.549

Ottenbacher, K. J., Hsu, Y., Granger, C. V., & Fiedler, R. C. (1996). The reliability of the functional independence measure: A quantitative review. Archives of Physical Medicine and Rehabilitation, 77(12), 1226-1232. https://doi.org/10.1016/S0003-9993(96)90184-7

Pearce, H., Tan, B., Ahmad, B., Karri, R., & Dolan-Gavitt, B. (2023). Examining Zero-Shot Vulnerability Repair with Large Language Models. 2023 IEEE Symposium on Security and Privacy (SP), 2339-2356. https://doi.org/10.1109/SP46215.2023.10179324

Perry, N., Srivastava, M., Kumar, D., & Boneh, D. (2023a). Do Users Write More Insecure Code with AI Assistants? Proceedings of the 2023 ACM SIGSAC Conference on Computer and Communications Security, 2785-2799. https://doi.org/10.1145/3576915.3623157

Perry, N., Srivastava, M., Kumar, D., & Boneh, D. (2023b). Do Users Write More Insecure Code with AI Assistants? Proceedings of the 2023 ACM SIGSAC Conference on Computer and Communications Security, 2785-2799. https://doi.org/10.1145/3576915.3623157

Perry, N., Srivastava, M., Kumar, D., & Boneh, D. (2023c). Do Users Write More Insecure Code with AI Assistants? Proceedings of the 2023 ACM SIGSAC Conference on Computer and Communications Security, 2785-2799. https://doi.org/10.1145/3576915.3623157

Pesesse, P., Vanderthommen, M., Durieux, N., Zubkov, M., & Demoulin, C. (2024). Clinical Value and Reliability of Quantitative Assessments of Lumbosacral Nerve Root Using Diffusion Tensor and Diffusion Weighted MR Imaging: A Systematic Review. Journal of Magnetic Resonance Imaging, jmri.29213. https://doi.org/10.1002/jmri.29213

Pinto, G., De Souza, C., Rocha, T., Steinmacher, I., Souza, A., & Monteiro, E. (2024). Developer Experiences with a Contextualized AI Coding Assistant: Usability, Expectations, and Outcomes. Proceedings of the IEEE/ACM 3rd International Conference on AI Engineering - Software Engineering for AI, 81-91. https://doi.org/10.1145/3644815.3644949

Rachmatullah, A., Vandenberg, J., Shin, S., & Wiebe, E. (2023). Cross-Country Variation in (Binary) Gender Differences in Secondary School Students' CS Attitudes: Re-Validating and Generalizing a CS Attitudes Scale. ACM Transactions on Computing Education, 23(4), 1-22. https://doi.org/10.1145/3630014

Rogers, R. W. (1975). A Protection Motivation Theory of Fear Appeals and Attitude Change1. The Journal of Psychology, 91(1), 93-114. https://doi.org/10.1080/00223980.1975.9915803

Ryan, T. J., Alarcon, G. M., Walter, C., Gamble, R., Jessup, S. A., Capiola, A., & Pfahler, M. D. (2019). Trust in Automated Software Repair: The Effects of Repair Source, Transparency, and Programmer Experience on Perceived Trustworthiness and Trust. In A. Moallem (Ed.), HCI for Cybersecurity, Privacy and Trust (Vol. 11594, pp. 452-470). Springer International Publishing. https://doi.org/10.1007/978-3-030-22351-9_31

Sandoval, G., Pearce, H., Nys, T., Karri, R., Garg, S., & Dolan-Gavitt, B. (2025). Lost at C: A User Study on the Security Implications of Large Language Model Code Assistants.

Sankhe, P., Patil, N., Ghorpade, M., Prasad, P., & Linkesh, M. (2025). Empirical Analysis of AI-Assisted Code Generation Tools Impact on Code Quality, Security and Developer Productivity. International Journal For Multidisciplinary Research, 7(6), 61350. https://doi.org/10.36948/ijfmr.2025.v07i06.61350

Siddiq, M. L., Roney, L., Zhang, J., & Santos, J. C. D. S. (2024). Quality Assessment of ChatGPT Generated Code and their Use by Developers. Proceedings of the 21st International Conference on Mining Software Repositories, 152-156. https://doi.org/10.1145/3643991.3645071

Tuli, F. (2011). The Basis of Distinction Between Qualitative and Quantitative Research in Social Science: Reflection on Ontological, Epistemological and Methodological Perspectives. Ethiopian Journal of Education and Sciences, 6(1). https://doi.org/10.4314/ejesc.v6i1.65384

Wang, R., Cheng, R., Ford, D., & Zimmermann, T. (2024). Investigating and Designing for Trust in AI-powered Code Generation Tools. The 2024 ACM Conference on Fairness, Accountability, and Transparency, 1475-1493. https://doi.org/10.1145/3630106.3658984

Downloads

Published

2026-11-09

How to Cite

Katto, K. (2026). Assessing security implications of using generative AI in software development in Tanzania: A quantitative study. African Journal of Empirical Research, 7(4), 1498-1510. https://doi.org/10.51867/ajernet.7.4.126