At the end of 2023, surveys showed there were 15 billion connected digital devices in the world, almost twice as many as there were people. And as the number of online and mobile interactions proliferate, so, too, have the potential for cyberattacks.
Containing the risk of data either compromised, stolen or sold on the dark web is a matter of urgency for governments. Discovering and addressing vulnerabilities in government software is paramount to securing digital government services and keeping data safe from attackers.
To that end, a new research project led by David Lo, a professor of computer science at Singapore Management University (SMU), looks to address this issue in Singapore – and potentially across the world.
Find Weaknesses
“The key objective of the project is to develop an approach to find cybersecurity weaknesses, also known as vulnerabilities, in a software application’s source code,” Lo said. “The user of the to-be-realized solution would be the Government Technology Agency (GovTech) of Singapore’s Cyber Security Group (CSG).”
GovTech is the lead agency delivering Singapore government’s digital services to the public and oversees the infrastructure to drive the implementation of the country’s Smart Nation initiative.
Lo’s project has been awarded a TRANS grant. Smart Nation and Digital Government Translational R&D (TRANS) grants fund translational R&D and technology, or process innovations, to solve public sector challenges, demonstrate the feasibility of new ideas, and encourage agencies to experiment and deploy innovative solutions.
The implications of this research extend beyond the immediate realm of government software. The methodologies and discoveries made here have the potential to influence cybersecurity practices globally.
It is best practice for programming teams that develop bespoke software applications to review source code to discover vulnerabilities. However, manual source code review is a laborious process. Many teams prefer to utilize automated tools, commonly known as Static Application Security Testing (SAST).
Struggle to Keep Up
However, SAST tools often struggle to keep up with the increased complexity of modern code and application development frameworks.

Singapore Management University’s Professor David Lo is building an AI-powered model to identify vulnerabilities in the source code of government software.Source: Singapore Management University
“Many present SAST tools have been reported to have high false alarm rates,” Lo said. “Many warnings these tools generate often do not correspond to real cybersecurity weaknesses. Moreover, they miss many vulnerabilities in source code.”
During the past few years, generative artificial intelligence algorithms ended up used to train large language models (LLMs) to create tools such as ChatGPT, which could have potential applications in cybersecurity.
But these models do not focus on vulnerability discovery and end up provided as black boxes without details or access to their internal workings. They also require data to go to third-party services, which raises concerns.
Lo and his team propose building a localized and specialized LLM solution, in this case a large data model, specifically tuned for vulnerability discovery and contextualized to the government code base.
The tuning process will leverage the corpus of knowledge from open-source projects and communities, such as GitHub, which 100 million developers use worldwide.
Coverage from a large amount of vulnerability data is a priority to effectively train and fine-tune a vulnerability discovery model. Rather than having a static collection, which can become obsolete fairly quickly in light of new types of vulnerabilities, programming languages, constructs, and paradigms, the researchers will create a data pipeline to provide a steady stream of vulnerability code introduced and subsequently fixed by thousands of engineers across the world.
Key points of discovery would include a large number of diverse, high-quality, and relevant code changes of security patches in open-source repositories – a “security patch” is an update made to a software application to fix vulnerabilities. The tuned solution could then flag similar vulnerable code in government source code.
So, how will the vulnerability discovery solution be recognized?
Four Pillars
“This project will realize a large code model-based system that consists of four pillars: Data, Model, Operation and Infrastructure,” Lo said. “The purpose of the Data pillar is to gather high-quality vulnerability data from publicly available sources.
“The purpose of the Model pillar is to transform vulnerability data collected in the Data pillar into a high-performing machine learning model based on large code models to identify vulnerability-introducing commits in continuous integration and continuous delivery pipelines.
“The purpose of the Operation pillar is to refine and adapt the vulnerability detection model created in the Model pillar so that it can work optimally to help software engineers discover vulnerabilities introduced to source code stored in government GitLab project repositories.
“The purpose of the Infrastructure pillar is to provide common services that support the three aforementioned pillars,” Lo said.
The project will build on previously published works co-authored by Lo that produced solutions that curate vulnerability data from public code and vulnerability repositories.
In an era where digital security is more crucial than ever, Lo’s work at Singapore Management University represents hope. The project is testament to the potential of AI in enhancing cybersecurity and also a crucial step toward safeguarding the digital infrastructure. By addressing the intricate challenges of coding vulnerabilities through advanced AI methodologies, this project could elevate the standards of cybersecurity significantly.

