{"title":"Static Analysis of Security Issues of the Python Packages Ecosystem","authors":"Adam Gorine, Faten Spondon","volume":205,"journal":"International Journal of Computer and Information Engineering","pagesStart":8,"pagesEnd":16,"ISSN":"1307-6892","URL":"https:\/\/publications.waset.org\/pdf\/10013441","abstract":"<p>Python is considered the most popular programming language and offers its own ecosystem for archiving and maintaining open-source software packages. This system is called the Python Package Index (PyPI), the repository of this programming language. Unfortunately, one-third of these software packages have vulnerabilities that allow attackers to execute code automatically when a vulnerable or malicious package is installed. This paper contributes to large-scale empirical studies investigating security issues in the Python ecosystem by evaluating package vulnerabilities. These provide a series of implications that can help the security of software ecosystems by improving the process of discovering, fixing, and managing package vulnerabilities. The vulnerable dataset is generated using the NVD, the National Vulnerability Database, and the Snyk vulnerability dataset. In addition, we evaluated 807 vulnerability reports in the NVD and 3900 publicly known security vulnerabilities in Python Package Manager (Pip) from the Snyk database from 2002 to 2022. As a result, many Python vulnerabilities appear in high severity, followed by medium severity. The most problematic areas have been improper input validation and denial of service attacks. A hybrid scanning tool that combines the three scanners, Bandit, Snyk and Dlint, which provide a clear report of the code vulnerability, is also described.<\/p>","references":"[1]\t\u201cPyPI \u00b7 the Python Package Index,\u201d PyPI. (Online). Available: https:\/\/pypi.org\/. (Accessed: 26-Dec-2022).\r\n[2]\tM. Alfadel, D. E. Costa, and E. Shihab, \u201cEmpirical analysis of security vulnerabilities in python packages,\u201d in 2021 IEEE International Conference on Software Analysis, Evolution, and Reengineering (SANER), 2021.\r\n[3]\t\u201cNVD - home,\u201d Nist.gov. (Online). Available: https:\/\/nvd.nist.gov\/. (Accessed: 26-Dec-2022).\r\n[4]\t\u201cSnyk vulnerability database,\u201d Find detailed information and remediation guidance for vulnerabilities.  Accessed on 26-Dec-22 at: https:\/\/security.snyk.io\/\r\n[5]\t\u201cCommon Vulnerability Scoring System version 3.1, Specification Document, Revision 1\u201d. Accessed on 12-Jan-2023 at: https:\/\/www.first.org\/cvss\/v3-1\/cvss-v31-specification_r1.pdf\r\n[6]\t\u201cCommon Weakness Enumeration,\u201d Mitre.org. Accessed on  26-Dec-2022 at : https:\/\/cwe.mitre.org\/index.html\r\n[7]\tWenliang Du, \u201cComputer & Internet Security: A Hands-on Approach 2nd Edition\u201d, Independently published, May 2019.\r\n[8]\tA. Bagmar, J. Wedgwood, D. Levin, and J. Purtilo, \u201cI Know What You Imported Last Summer: A study of security threats in the python ecosystem,\u201d arXiv (cs.CR), 2021.\r\n[9]\tA. Gkortzis, D. Mitropoulos, and D. Spinellis, \u201cVulinOSS: A dataset of security vulnerabilities in open-source systems,\u201d in Proceedings of the 15th International Conference on Mining Software Repositories - MSR \u201918, 2018.\r\n[10]\tJ. Ruohonen, K. Hjerppe, and K. Rindell, \u201cA large-scale security-oriented static analysis of python packages in PyPI,\u201d in 2021 18th International Conference on Privacy, Security and Trust (PST), 2021.\r\n[11]\tJ. Ruohonen, \u201cAn empirical analysis of vulnerabilities in python packages for web applications,\u201d in 2018 9th International Workshop on Empirical Software Engineering in Practice (IWESEP), 2018.\r\n[12]\tJ. Ruohonen, \u201cThe similarities of software vulnerabilities for interpreted programming languages,\u201d in 2021 IEEE International Conference on Progress in Informatics and Computing (PIC), 2021.\r\n[13]\tG. Antal, M. Keleti, and P. Heged\u016ds, \u201cExploring the security awareness of the python and JavaScript open source communities,\u201d in Proceedings of the 17th International Conference on Mining Software Repositories, 2020.\r\n[14]\tS. Turner, \"Security vulnerabilities of the top ten programming languages: C, Java, C++, Objective-C, C#, PHP, Visual Basic, Python, Perl, and Ruby,\" Journal of Technology Research.\r\n[15]\tJ. Garbajosa, X. Wang, and A. Aguiar, Eds., Agile Processes in Software Engineering and Extreme Programming: 19Th International Conference, XP 2018, Porto, Portugal, May 21-25, 2018, Proceedings, 1st ed. Cham, Switzerland: Springer International Publishing, 2018.\r\n[16]\tJ. Lopez and Y. Wu, Eds., Information security practice and experience: 11Th international conference, ISPEC 2015, Beijing, China, May 5-8, 2015, proceedings, 2015th ed. Basel, Switzerland: Springer International Publishing, 2015.\r\n[17]\tJ. Smith, B. Johnson, E. Murphy-Hill, B. Chu, and H. R. Lipford, \u201cHow developers diagnose potential security vulnerabilities with a static analysis tool,\u201d IEEE Trans. Soft. Eng., vol. 45, no. 9, pp. 877\u2013897, 2019.\r\n[18]\tM. R. Rahman, A. Rahman, and L. Williams, \u201cShare, but be aware: Security Smells in Python Gists,\u201d in 2019 IEEE International Conference on Software Maintenance and Evolution (ICSME), 2019.\r\n[19]\tS. Peng, P. Liu, and J. Han, \u201cA python security analysis framework in integrity verification and vulnerability detection,\u201d Wuhan Univ. J. Nat. Sci., vol. 24, no. 2, pp. 141\u2013148, 2019.\r\n[20]\t\u201cCWE-2022 CWE top 25 most dangerous software weaknesses,\u201d Mitre.org. (Online). Accessed on 26-Dec-2022 at: https:\/\/cwe.mitre.org\/top25\/archive\/2022\/2022_cwe_top25.html. \r\n[21]\tG. Blok Dyk, TensorFlow: A Complete Guide. 5starcooks, 2018.\r\n[22]\t\u201cDenial of Service guidance, National Cyber Security Centre. Accessed on 26-Dec-2022 at:  https:\/\/www.ncsc.gov.uk\/collection\/denial-service-dos-guidance-collection. \r\n[23]\t\u201cRed Hat Bugzilla-Bug 1832472 \u2013 (CVE-2020-11651) CVE-2020-11651 salt: salt-master process ClearFuncs class does not properly validate method calls,\u201d Redhat.com. Accessed on 26-Dec-2023 at: https:\/\/bugzilla.redhat.com\/show_bug.cgi?id=CVE-2020-11651\r\n[24]\t\u201cPython API reference \u2013 airflow documentation,\u201d Apache.org.   Accessed on 19-Dec-2023 at: https:\/\/airflow.apache.org\/docs\/apache-airflow\/stable\/python-api- ref.html. \r\n[25]\tDjango. (2019). The web framework for perfectionists with deadlines | Django. djangoproject.com.2019 (Online). Available at https:\/\/www.djangoproject.com\/.","publisher":"World Academy of Science, Engineering and Technology","index":"Open Science Index 205, 2024"}