Skip to content
GitHub

Fixing security vulnerabilities with AI

Feb 14, 2024Tiferet Gazit11 min read
Opens github.blog
What the post coversAI, from the source post

This post details the technical implementation of GitHub's Code Scanning Autofix feature.

  • It explains how LLMs are prompted with vulnerability details and code snippets to generate suggested fixes.
  • The post covers prompt engineering, pre- and post-processing heuristics for selecting code, adding dependencies, specifying code edit formats, and overcoming model errors.
  • It also outlines the evaluation framework used to iterate on the feature, including automated testing of fix validity (removing alerts, no new alerts, no syntax errors, no test failures) and manual triage, which led to a tripled success rate and reduced LLM compute costs.
Read the full post on github.blog · 11 min (opens in a new tab)

More from the AI-Assisted Code Development and Review trail