VOOZH about

URL: https://thenewstack.io/copilot-autofix-ais-answer-to-code-vulnerability-woes/

⇱ Copilot Autofix: AI's Answer to Code Vulnerability Woes - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2024-08-19 05:05:03
Copilot Autofix: AI's Answer to Code Vulnerability Woes
AI / Security / Software Development

Copilot Autofix: AI’s Answer to Code Vulnerability Woes

GitHub's new AI-powered code scanning tool promises to revolutionize vulnerability detection and remediation, potentially saving developers hours of work.
Aug 19th, 2024 5:05am by Darryl K. Taft
👁 Featued image for: Copilot Autofix: AI’s Answer to Code Vulnerability Woes
Featured image via Unsplash+.

GitHub this week made its Copilot Autofix advanced AI code scanning and remediation product generally available in GitHub Advanced Security (GHAS).

Copilot Autofix uses AI to find vulnerabilities in code, explain their importance and offer code suggestions to fix them, wrote Mike Hanley, chief security officer and senior vice president of engineering at GitHub, in a post on the company’s blog.

“Code scanning tools detect vulnerabilities, but they don’t address the fundamental problem: remediation takes security expertise and time, two valuable resources in critically short supply,” Hanley wrote in the post. “In other words, finding vulnerabilities isn’t the problem. Fixing them is.”

Copilot Autofix uses AI agents that are capable of making decisions, planning and adapting to new information in real time. In fact, during the public beta for the product, launched in March, Hanley wrote, GitHub learned that developers were fixing code vulnerabilities more than three times faster than those who do so manually.

Overcoming Longtime Struggles

Developers have long struggled with using Application Security Testing (AST) tools to find security vulnerabilities in application source code, David Vance, an analyst at Enterprise Strategy Group, told The New Stack. Legacy AST tools are notoriously slow and prone to false positives. With GitHub’s massive developer community, he said, it’s a natural fit for them to introduce application security features into their platform.

GitHub’s Copilot Autofix is the most recent example of the next wave of application security innovation that also helps reduce security tool friction for developers.

During the beta, developers used Copilot Autofix in their pull requests to quickly fix vulnerabilities in new code before they could get merged into production where they could impact customers.

“By allowing developers to identify security vulnerabilities in their source code as early as possible, it greatly reduces the time and effort required to remediate vulnerabilities after coding has been completed,” Vance said.

The median time for developers to use Copilot Autofix to automatically commit the fix for a pull request-time alert was 28 minutes, compared to 1.5 hours to resolve the same alerts manually, Hanley wrote in his blog post.

“Fixes can be generated for dozens of classes of code vulnerabilities, such as SQL injection and cross-site scripting, which developers can dismiss, edit or commit in their pull request,” he wrote.

Indeed, Copilot Autofix was seven times faster finding and fixing cross-site scripting vulnerabilities — 22 minutes, compared to almost three hours. And it was 12 times faster finding and fixing SQL injection vulnerabilities — 18 minutes, compared to 3.7 hours, the company said.

“Since implementing Copilot Autofix, we’ve observed a 60% reduction in the time spent on security-related code reviews and a 25% increase in overall development productivity,” said Kevin Cooper, a principal engineer at Optum, in a statement.

Moreover, “in the health care space, where security is critical, it helps us act on proven industry solutions quickly. This proactive approach to security helps us prevent potential issues, saving thousands of hours per month that would otherwise be spent on remediation,” Cooper added.

An ‘Intriguing Dichotomy’

“Securing code has always presented an intriguing dichotomy: the individuals responsible for remedying security vulnerabilities—software developers—often lack both the time and the training necessary for this task,” Janet Worthington, an analyst at Forrester Research, told The New Stack.

Static Application Security Testing (SAST) tools, which scan the codebase, provide remediation guidance to developers based on the security flaw and the programming language. However, the advice can be too generic or better suited for security professionals already familiar with security terminology, Worthington said.

Behind the scenes, Copilot Autofix leverages the CodeQL engine, GPT-4o, and a combination of heuristics and GitHub Copilot APIs to generate code suggestions, Hanley said.

“Security tools, such as GitHub’s CodeQL, are leveraging generative AI to alleviate the burden on software developers to fix security defects, while simultaneously reducing risk,” Worthington said.

With innovations like GitHub Copilot Autofix, developers are shown the security flaw alongside an auto-generated fix specific to their code, which the developer can then review and either accept or modify as needed. This not only boosts developer productivity but also improves the likelihood of the issue being effectively resolved.

“While this advancement marks significant progress in code security, it’s important to recognize that generative AI is not flawless,” Worthington said. “Any fix provided by an automated tool must be scrutinized with the same rigor as any other code change, undergoing both SAST, software composition analysis, and peer code reviews before being integrated into the main branch.”

How Copilot Autofix Works

To initiate Copilot Autofix for vulnerabilities in existing code, according to Hanley, simply press the “Generate fix” button on an alert in the GHAS code scanning alert. Copilot Autofix assesses the code and the vulnerability and returns an explanation and code suggestion for review. The developer can then press the “Create PR with fix” button to create a new pull request, which includes code changes to fix the alert.

“Copilot Autofix takes care of cumbersome security tasks, ensuring our existing and new code is always as secure as possible, said Mario Landgraf, community manager for security at Otto (GmbH & Co KG), in a statement. “Vulnerabilities are flagged immediately, and code changes are recommended automatically. It helps our teams to free up time, so they can focus on more strategic initiatives.”

Meanwhile, starting in September, GitHub will add Copilot Autofix in pull requests to the list of tools it offers for all open source projects. That list already includes GitHub’s code scanningsecret scanningdependency management, and private vulnerability reporting tools at no cost.

TRENDING STORIES
Darryl K. Taft covers DevOps, software development tools and developer-related issues from his office in the Baltimore area. He has more than 25 years of experience in the business and is always looking for the next scoop. He has worked...
Read more from Darryl K. Taft
SHARE THIS STORY
TRENDING STORIES
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.