Maybe you can get away with it in C

computing

(Image credit: Shutterstock / BEST-BACKGROUNDS)

A paper (opens in new tab) by researchers at Stanford University has found that coders who employed AI assistants such as GitHub Copilot and Facebook InCoder actually ended up writing less secure code. 

What’s more, such tools also lull developers into a false sense of security, with many believing that they produce better code using the help.

Nearly 50 subjects, each with varying levels of expertise, were given five coding tasks, using various languages, with some aided by an AI tool, and others without any help at all.

Language games

The authors of the paper – Neil Perry, Megha Srivastava, Deepak Kumar, and Dan Boneh – stated that there were “particularly significant results for string encryption and SQL injection”.

read more

> You’ll soon be able to show off your coding skills in Google Docs (opens in new tab)


>
OpenAI reveals 3D model-building AI tool (opens in new tab)


>
Microsoft is being sued over Github Copilot piracy (opens in new tab)

They also referenced previous research which found that around 40% of programs created with assistance from GitHub Copilot contained vulnerable code, although a follow-up study found that coders using Large Language Models (LLM), such as OpenAI’s code-cushman-001 codex – on which GitHub Copilot is based – only resulted in 10% more critical security bugs.

However, the Stanford researchers explained that their own study looked at OpenAI’s codex-davinci-002 model, a more recent model than cushman, which is also used by GitHub Copilot.

They also looked at multiple programming languages, including Python, Javascript and C, whereas the other paper only focused on the latter, which the authors attribute to its inconclusive findings. In fact, in the Stanford paper, those using AI to code in C didn’t result in significantly more errors either.

One of the five tasks involved writing a code in Python, and here code was more likely to be erroneous and insecure when using an AI helper. What’s more, they were also “significantly more likely to use trivial ciphers, such as substitution ciphers (p < 0.01), and not conduct an authenticity check on the final returned value."

The authors hope that their study leads to further improvements in AI rather than dismissing the technology altogether, due to the potential productivity improvements such tools can offer. They just maintain that they should be used cautiously since they can mislead programmers into thinking they are infallible.

They also think AI assistants can encourage more people to get involved with coding regardless of their experience, who may also be put off by the air of gatekeeping around the discipline.

    Via The Register (opens in new tab)

    Are you a pro? Subscribe to our newsletter

    Sign up to theTechRadar Pro newsletter to get all the top news, opinion, features and guidance your business needs to succeed!

    By submitting your information you agree to the Terms & Conditions (opens in new tab) and Privacy Policy (opens in new tab) and are aged 16 or over.

    Lewis Maddison

    Graduate Junior Writer

    Lewis Maddison is a Graduate Junior Writer at TechRadar Pro. His coverage ranges from online security to the usage habits of technology in both personal and professional settings.

    His main areas of interest lie in technology as it relates to social, political and economic issues around the world, and revels in uncovering stories that might not otherwise see the light of day.

    He has a BA in Philosophy from the University of London, with a year spent studying abroad in the sunny climes of Malta.

    TECH NEWS RELATED

    This Tiny MSI PC is Packed With Power

    MSI Following the example set by the Mac Mini, many Windows-powered compact PCs have popped up recently with solid hardware. If none have quite caught your eye, though, maybe this PC by MSI will. MSI has just released a new tiny PC called the Cubi 5 12M, and it’s ...

    View more: This Tiny MSI PC is Packed With Power

    Logitech’s New Colorful Keyboards and Mice Look Great

    Logitech Logitech makes some of the best keyboards and best mice around, and you might be familiar with the company’s RGB-packed gaming products. These new peripherals are really packed with color, but we’re not really talking about lights. Logitech has announced a range of new colors for a bunch ...

    View more: Logitech’s New Colorful Keyboards and Mice Look Great

    “Part of the Journey Is the End;” Marvel’s Avengers Seems to be Shutting Down

    Whether it be purely the lackluster quality of the game or the general distaste for live service games, Marvel’s Avengers never truly found its footing in the two years since it was released. Despite the fact that both the Marvel and Avengers labels should guarantee a happy, comic-lover audience, ...

    View more: “Part of the Journey Is the End;” Marvel’s Avengers Seems to be Shutting Down

    Satechi Thunderbolt 4 Slim Hub review: A sleek and portable laptop hub

    Thunderbolt 4 docks are now much more widely available, meaning that it’s much easier to get a high speed dock that works with your laptop. But unfortunately, while they’re relatively widely available now, they’re still quite expensive. Thankfully, however, that price seems to now be coming down a little through ...

    View more: Satechi Thunderbolt 4 Slim Hub review: A sleek and portable laptop hub

    Wi-Fi routers are being hit by a dangerous new Android malware with extra DNS hacks

    With the DNS changed, users are redirected to malicious pages

    View more: Wi-Fi routers are being hit by a dangerous new Android malware with extra DNS hacks

    Servant unleashes a bed bug blitz [Apple TV+ recap]

    Just when you thought things couldn't get any worse … bed bugs! Photo: Apple TV+ Dorothy is back in the bizarre Turner household this week on Apple TV+ thriller Servant — and she’s not happy to be home. Leanne insists on normalcy, but considering the things that have happened, ...

    View more: Servant unleashes a bed bug blitz [Apple TV+ recap]

    Hostinger quietly shutters Zyro to focus on Hostinger Website Builder service

    Will Zyro website builder still exist soon?

    View more: Hostinger quietly shutters Zyro to focus on Hostinger Website Builder service

    Redmi Note 12 Turbo Tipped to get Snapdragon 7-series SoC

    The Xiaomi Redmi Note 12 Series arrived in China and India last year. With that being said, we might see another offering in the Redmi Note series phone in the coming months where it will be powered by the Snapdragon 7-series chipset onboard. The information comes from a notable ...

    View more: Redmi Note 12 Turbo Tipped to get Snapdragon 7-series SoC

    Avatar 2 animators tricked James Cameron into believing some shots were practical

    Super Bowl 2023 live stream: how to watch the game, commercials and halftime show from anywhere

    The Minecraft Community Answers the Age-old Question: “Can it Run Doom?”

    Mark Hamill Hints That His Time as the Joker Is Over

    Deadpool joins Marvel's Midnight Suns next week, adding new story missions

    Chic-Fil-A’s Training Program Apparently Features a Familiar Fallout Face

    Nintendo is reportedly increasing Switch production ahead of Breath of the Wild 2

    Ex-Halo dev believes those who pushed for a better game ‘got laid off for it’

    There are two clear winners in the PSVR 2 launch lineup

    A nuclear-powered data center is opening this year

    Anker’s New Monitor Stand Doubles as an All-In-One Docking Station

    Naked Elden Ring Player Counter’s Placidusax’ Attack With Chaotic Results

    OTHER TECH NEWS

    Top Car News Car News