← Latest papers
🤖 AI

Understanding the Impact of AI Code Assistants on Security API Usage: An Empirical Study

This empirical study of 44 professional developers reveals that while GitHub Copilot improves functional correctness and marginally reduces some insecure patterns, it fails to significantly enhance secure security API usage, often leaving developers unaware of remaining vulnerabilities.

Original authors: Zahra Mousavi, Chadni Islam, M. Ali Babar, Alsharif Abuadbba, Kristen Moore

Published 2026-07-14
📖 5 min read🧠 Deep dive

Original authors: Zahra Mousavi, Chadni Islam, M. Ali Babar, Alsharif Abuadbba, Kristen Moore

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're building a super-secret clubhouse, and you need to install high-tech locks, alarms, and secret tunnels to keep intruders out. These locks are like Security APIs—special tools developers use to protect software. But here's the twist: these locks are tricky. If you install them wrong, the "secret" tunnel might just be a wide-open door for hackers.

Now, imagine you have a super-smart robot assistant named Copilot that can write code for you. You might think, "Great! The robot knows all the rules, so my clubhouse will be Fort Knox!" But a new study by Zahra Mousavi and her team at universities and research labs in Australia decided to put this idea to the test. They didn't just ask the robot to build a lock; they watched 44 real professional developers trying to build these locks, both with the robot's help and without it.

Here is what they found, served up with a side of reality.

The Robot is a Great Helper, But a Bad Security Guard

First, the good news: Copilot is a fantastic speedster. When the developers had to build a complex lock (specifically, a Google OAuth system for accessing user data), the robot helped them finish the job much faster.

  • Without the robot, only 45% of the developers (10 out of 22) actually got the lock working at all.
  • With the robot, 91% of the developers (20 out of 22) got it working.
  • The robot also cut the time it took to finish the complex task by 63%, dropping the average time from 62 minutes down to 23 minutes.

So, if your goal is just to get the door built and swinging, the robot is a huge win.

But here is the catch: Just because the door is built doesn't mean it's locked. In fact, none of the developers, whether they used the robot or not, managed to build a fully secure lock for the tasks they were given. Every single attempt on the evaluated tasks had at least one major flaw.

The "Trust Me" Trap

The study looked at two specific types of locks: JSSE (for secure internet connections) and Google OAuth (for logging into apps). They found that the robot didn't fix the security problems; in many cases, it just helped build the broken locks faster.

  • The "Trust All" Mistake: Imagine a guard who lets anyone in because they look nice. In the study, some developers (and the robot) set up the system to "trust all certificates." This is like telling your guard, "If anyone shows a badge, let them in, even if it's a fake one." This is a huge security hole.
  • The "Secret Code" Mistake: Some developers wrote their secret passwords directly into the code, like writing your house key under the doormat. The robot sometimes suggested this too!
  • The "No Check" Mistake: When connecting to a server, you need to check if you're actually talking to the right person. Many implementations skipped this step, leaving the door open for a "Man-in-the-Middle" attacker (someone pretending to be your friend to steal your stuff).

The researchers found that while the robot helped fix some small mistakes, it didn't stop the big security failures. In fact, 100% of the evaluated tasks resulted in code with security issues. The robot didn't make the code more secure than the humans working alone; it just made the insecure code appear faster.

The Human Blind Spot

Here is the most surprising part of the story. The researchers asked the developers, "Do you think your code is secure?"

  • Even though none of the code was actually secure, most developers said, "Yep, I think I solved this securely!"
  • Only a tiny handful of people realized they had made a mistake.
  • When talking to the robot, almost no one asked, "Hey, is this safe?" They just asked, "Make it work."

It's like a group of people building a bridge and asking a robot for help. The robot helps them lay the bricks quickly, but nobody checks if the bridge can actually hold weight. When asked, "Do you think this bridge will hold?" most people say, "Sure!" even though it's about to collapse.

Can We Teach the Robot Better?

The researchers tried one more thing. They asked the developers to specifically tell the robot, "Hey, check this for security!" or "You are a security expert, fix this!"

  • When they did this, the robot did fix some of the mistakes in the simpler lock (JSSE).
  • However, for the more complex lock (OAuth), the robot still missed many critical security holes, even when told to be careful.

The Bottom Line

This study suggests that while AI assistants like Copilot are amazing at helping us write code quickly and correctly, they are not a magic shield against hackers.

  • The Robot: Great at speed and function, but not a security expert.
  • The Humans: Often too trusting of the robot and not checking the security themselves.
  • The Result: We are building secure-looking systems that are actually full of holes.

The researchers conclude that we can't just rely on the robot to keep us safe. We need to be the ones asking the hard security questions, checking the work, and making sure the "locks" we build are actually locked. The robot is a powerful tool, but it's not a replacement for a security-conscious mind.

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 →