← Latest papers
💻 computer science

Leveraging Large Language Models for Trustworthiness Assessment of Web Applications

This paper proposes an empirical methodology that leverages Large Language Models to automate the trustworthiness assessment of web applications by verifying secure coding practices and integrating their outputs into a hierarchical Quality Model to generate a holistic trustworthiness score.

Original authors: Oleksandr Yarotskyi, José D'Abruzzo Pereira, João R. Campos

Published 2026-03-26
📖 5 min read🧠 Deep dive

Original authors: Oleksandr Yarotskyi, José D'Abruzzo Pereira, João R. Campos

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are the manager of a massive, bustling restaurant (the Web Application). Your customers (users) expect the food to be safe, the service to be smooth, and the kitchen to be spotless. If a single chef cuts their finger and doesn't wash their hands, or if a waiter forgets to check a customer's ID, the whole restaurant could get shut down or lose its reputation.

In the digital world, this "safety" is called Trustworthiness.

For years, checking if a restaurant is safe has been like hiring a team of super-expert health inspectors to walk through the kitchen, taste every dish, and read every recipe book. This is slow, expensive, and hard to scale. If you open 1,000 new restaurants a day, you can't hire 1,000 inspectors.

This paper asks a big question: Can we use a super-smart AI (a Large Language Model or LLM) to act as our health inspector?

Here is the story of how they tried it, what went wrong, and what finally worked.

The Problem: The "Checklist" is Too Hard

Traditionally, security tools look for specific "bugs" (like a broken lock on a door). But what if the lock is fine, but the chef is just lazy and leaves the back door open? That's a Secure Coding Practice issue.

Checking these practices usually requires a human expert to read code and say, "Yes, this chef followed the rule," or "No, they didn't." This is too slow for the modern internet.

The Experiment: The AI Inspector

The researchers decided to test five different AI "inspectors" (like GPT-4, Gemini, etc.) to see if they could read the code and check if the chefs were following the rules. They focused on one specific rule: Input Validation (making sure no one sneaks a dirty ingredient into the kitchen).

They tried four different ways to talk to the AI (called Prompting Strategies):

1. The "Just Ask" Approach (Baseline)

  • The Analogy: You walk up to the AI and say, "Is this code safe?" without giving it any context.
  • The Result: The AI guessed okay for simple things, but it was often confused. It was like asking a tourist if a building is structurally sound without showing them the blueprints. It worked for obvious things but missed the tricky details.

2. The "Show Me the Bad Examples" Approach (Few-Shot)

  • The Analogy: You show the AI a picture of a chef who didn't wash their hands and say, "Don't do this."
  • The Result: This helped the smartest AI (GPT-4) get even better. But for the smaller, cheaper AIs, it was like giving a toddler a textbook on advanced chemistry—they got overwhelmed by the extra information and made more mistakes.

3. The "Show the Whole Kitchen" Approach (Structural Context)

  • The Analogy: You think, "Maybe the chef is safe, but the helper they talk to isn't!" So, you give the AI the code for the main chef plus the code for every helper they talk to.
  • The Result: Disaster. The AI got confused. It was like giving a detective a library of books instead of just the crime scene. The extra information was "noise." The AI couldn't find the needle in the haystack. It actually performed worse than when you gave it less info.

4. The "Strict Rulebook" Approach (Rule-Based)

  • The Analogy: Instead of showing examples or huge libraries, you give the AI a simple, strict checklist:
    • Rule 1: If the input comes from a user, it MUST be checked.
    • Rule 2: If it's not checked, mark it as FAIL.
  • The Result: This was the winner. By giving the AI clear, step-by-step instructions (like a recipe), even the smaller, cheaper AIs became surprisingly good inspectors. They stopped guessing and started following the rules.

The Final Score: The "Trust Score"

The researchers didn't just want the AI to say "Yes" or "No." They wanted a Trust Score (from 0 to 100) for the whole application.

  • Attempt A: They asked the AI, "Give me a score from 0 to 100."
    • Result: The AI was terrible at math. It gave random numbers. It couldn't weigh the importance of different mistakes.
  • Attempt B: They used the AI to check the checklist, and then used a Math Formula (called a Quality Model) to calculate the score based on the AI's "Yes/No" answers.
    • Result: Perfect. The AI did the hard work of reading the code, and the math formula did the work of calculating the score. This created a reliable, scalable way to tell if a web app is trustworthy.

The Big Takeaways

  1. More Info isn't Always Better: Giving the AI too much code (the "Whole Kitchen" approach) confused it. Sometimes, less is more.
  2. Rules Beat Examples: For security checks, giving the AI a strict rulebook works better than showing it examples of bad code.
  3. AI + Math = Trust: You shouldn't ask the AI to be the mathematician. Let the AI be the reader, and let a formula do the scoring. This combination creates a system that can check thousands of apps quickly and accurately.

Why This Matters

In the future, instead of waiting months for a human security team to check your app, you could plug your code into this system. It would instantly tell you, "Your app is 85% trustworthy, but you missed one rule in the login section." This makes the internet safer, faster, and cheaper to build.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →