Skip to main content
ai-ml

Google's Sashiko: How AI Agents Are Strengthening Linux Kernel Security Through Automated Code Reviews

Google's Sashiko uses Gemini-powered AI agents to review Linux kernel code, identify potential security vulnerabilities and verify software defects. Discover how its multi-agent approach is changing large-scale open-source code review.

Xcademia Team

Nov 19, 202612 min read19 views
Share:
Google's Sashiko: How AI Agents Are Strengthening Linux Kernel Security Through Automated Code Reviews

Google is using Gemini-powered AI agents to improve Linux kernel code reviews, identify potential vulnerabilities and help maintainers detect software defects before they reach production.


Google has shared insights into Sashiko, an open-source, agentic code review system designed to address one of the biggest challenges in large-scale software development: reviewing code accurately and consistently.


Developed by Google's AI and Infrastructure team, Sashiko uses Google's Gemini models to analyse proposed Linux kernel changes, investigate potential defects and verify findings through specialised AI agents.


The project addresses a growing challenge in software engineering. AI coding tools can generate code at increasing speed, but reviewing that code remains a demanding task, particularly in complex systems where a seemingly minor modification can introduce memory issues, concurrency problems or security vulnerabilities.


Google's experience with Sashiko highlights how agentic AI can support software maintainers by combining automated investigation with evidence-based verification and human oversight.


Why Google Built Sashiko

The Linux kernel is one of the most important components of modern computing infrastructure. It powers billions of Android devices, supports major cloud environments and runs on nearly every supercomputer.


However, maintaining such a large and complex codebase requires significant engineering effort.


According to Google, the Linux kernel contains more than 35 million lines of code, with over 85,000 changes submitted every year.


Although automated build systems and fuzzing tools can identify compilation failures and certain runtime crashes, they cannot replace the deeper reasoning required for comprehensive code reviews.


Human maintainers must examine proposed changes for problems such as:

  • Memory leaks and resource management errors.

  • Deadlocks and concurrency issues.

  • Race conditions in multi-threaded execution.

  • Security vulnerabilities.

  • Incorrect assumptions about existing system behaviour.


The increasing use of AI coding assistants introduces another challenge. More generated code and automated security reports can increase the volume of submissions requiring review.


Some AI-generated changes are useful, while others contain subtle defects or misunderstand the systems they modify. Similarly, automatically generated security reports can include duplicate or inaccurate findings.


This creates a bottleneck in which code generation becomes faster, but the review process remains dependent on a limited number of experienced maintainers.


Sashiko was developed to help address this imbalance.


Understanding Sashiko: An Agentic AI Code Review System

Google's Sashiko is an open-source code review system powered by Gemini. It was developed by Google's AI and Infrastructure team and donated to the Linux Foundation earlier in 2026.


The name Sashiko comes from the Japanese word 刺し子, referring to a traditional stitching technique used to reinforce worn fabric.


The concept reflects the project's purpose: strengthening existing software by identifying weaknesses in proposed code changes.


Rather than relying on one AI model to review an entire patch, Sashiko divides the investigation into specialised tasks.


Each AI agent examines a particular area of concern, allowing the system to investigate different types of potential defects independently.


The system also distinguishes between identifying possible bugs and proving whether those bugs are real.


This distinction is important because AI-generated findings can be incorrect. A useful code review system must investigate potential problems without treating every suspicious code pattern as a confirmed vulnerability.


How Sashiko Reviews Linux Kernel Code

Sashiko follows a structured, multi-stage review process designed to reduce missed defects and unsupported findings.


Context Gathering and Planning

The review begins by collecting information about the proposed code change.


Sashiko examines modified functions, relevant structure definitions and direct callers. It also loads subsystem-specific documentation and domain guidance.


A planning agent then determines which specialist review sessions are necessary.


For example, a hardware-focused investigation may be unnecessary when a patch only modifies software functionality.


The system also assigns a reasoning budget based on the complexity of the proposed change.


Parallel Specialist AI Agents

Sashiko can run up to seven specialist sessions in parallel.


Each session focuses on a separate review area:

  • Commit intent: Checks whether the implementation matches the intended change.

  • Implementation match: Examines whether the code correctly implements the proposed behaviour.

  • Control flow: Investigates execution paths and logical conditions.

  • Resource lifetimes: Examines memory and resource management.

  • Locking: Reviews concurrency and synchronisation concerns.

  • Security: Investigates potential security weaknesses.

  • Hardware: Examines relevant hardware-related behaviour.


Each specialist uses Git tools to inspect the repository. Google reports an average of approximately 100 tool calls per review.


Importantly, each agent produces two lists: potential issues it believes are genuine and concerns it investigated but dismissed.


Both lists include supporting code evidence.


Triage and Independent Verification

A lead verifier examines the findings and dismissed concerns.


Clearly demonstrated defects can move forward, while dismissals supported by local code evidence can be removed.


Uncertain findings receive additional investigation.


This includes situations where an agent identifies a possible defect but dismisses it based on an assumption that another function, caller or lock prevents the issue.


Instead of accepting that assumption, Sashiko requires further evidence.


Deep Investigation of Individual Bugs

Difficult findings are assigned to separate verification agents.


Each agent investigates one specific question using Git tools.


The system applies the same evidence requirement to both positive and negative conclusions. An agent must provide concrete code evidence before confirming a bug or dismissing it.


This approach helps identify cases where an initial reviewer overlooks a real issue because of an incorrect assumption.


Generating the Review Report

After verification, Sashiko generates a review report.


Google designed the output to resemble feedback from a human Linux kernel maintainer, including the question-oriented communication style commonly used on Linux mailing lists.


This makes the findings easier to integrate into existing developer workflows.


The central design principle is that identifying a possible bug is only the beginning. The system must also investigate whether the issue can be demonstrated through the actual code.


info-1


What Google's Production Data Reveals

Google shared seven months of production experience with Sashiko, providing insight into how the system operates within the Linux kernel development ecosystem.


The announcement reports several adoption and usage indicators.


Large-Scale Code Review Activity

Since its rollout, Sashiko has become part of the daily Linux kernel review workflow.


Google reports that the system:

  • Completes approximately 1,200 reviews per day.

  • Has completed 241,000 patch reviews.

  • Covers more than 100 kernel mailing lists.

  • Has over 75 opted-in subsystem mailing lists.

  • Has received engagement from more than 1,500 kernel developers.

Importantly, Sashiko sends review emails only to mailing lists whose maintainers have opted in.


Google also reports that developers actively challenge inaccurate findings. Their feedback has helped improve the system's prompts and verification engine.


Identifying Existing Software Defects

Sashiko does more than examine newly submitted changes.


While reviewing proposed patches, it can also identify pre-existing defects in surrounding code.


Google reports that Sashiko has been credited in more than 2,000 mainline Linux kernel commits and more than 500 official Linux kernel CVEs from 2026.


The announcement's accompanying production snapshot lists 528 CVEs.


These findings span several areas, including:

  • Kernel drivers.

  • Core kernel functionality.

  • Networking.

  • Graphics processing units (GPUs).

  • Memory management.

  • Virtualisation.

This demonstrates how code review can contribute to identifying weaknesses beyond the immediate lines being modified.


Fewer Linux Kernel Commits Required Follow-Up Fixes

One of the most notable findings in Google's announcement concerns the percentage of merged Linux kernel commits that required a follow-up fix within 60 days.


Google compared 18 Linux kernel releases before Sashiko's introduction, covering Linux 6.2 through 6.19 and approximately 254,000 commits.


The historical average was 3.4%.

After Sashiko's rollout, the reported figures declined:

  • Linux 7.1: 2.8%.

  • Linux 7.2: 2.2%.


This represents a 35% reduction compared with the historical baseline.


The 30-day follow-up fix rate also declined from 2.3% to 1.4%.


However, Google explicitly cautions against attributing the entire improvement to Sashiko.


Other factors can influence software quality between kernel releases, and the company says it is too early to make strong causal claims.


The figures should therefore be understood as an encouraging production trend rather than proof that Sashiko alone caused the reduction.


Clean Reviews and Critical Warnings

Google also examined whether Sashiko's review findings were meaningful indicators of software quality.


Across 21,500 tracked mainline commits, the company reported two important results:

  • Commits receiving a clean Sashiko review required a follow-up fix within 60 days just 0.9% of the time.

  • Commits merged despite a critical Sashiko warning required a follow-up fix 7.6% of the time.


According to Google, patches merged despite critical warnings had an eight-times-higher follow-up fix rate than patches receiving a clean review.


This comparison suggests that Sashiko's warnings can provide useful signals for maintainers deciding which changes deserve additional investigation.


info-2


Lessons Google Learned From Building Sashiko

Beyond production metrics, Google highlighted several lessons from developing and operating an agentic code review system.


Benchmark-Driven Development Is More Reliable Than Intuition

Google explains that many seemingly reasonable development ideas did not perform as expected.


To evaluate improvements, the team created a benchmark containing nearly 1,000 real Linux kernel bugs.


These were genuine defects that had passed reviews by experienced kernel engineers, entered the mainline codebase and subsequently required fixes.


Using this benchmark, Google reports that Sashiko, powered by the Gemini 4 Carbon model with high thinking enabled, detected 75.8% of the bugs missed by human reviewers.


This result applies to the specific benchmark and testing configuration described in the announcement. It should not be interpreted as a universal detection rate for all software vulnerabilities or code review environments.


The lesson is that AI review systems should be evaluated against real historical defects rather than relying exclusively on subjective assessments.


Coding Agents Should Not Be Their Own Only Reviewers

Another important observation concerns the limitations of AI coding agents reviewing their own work.


Google explains that models are generally trained to produce working solutions within a limited reasoning or token budget.


However, producing code that works in an isolated task is different from ensuring that it remains correct within a large, interconnected software system.


The company estimates that implementing a functional solution may represent only 5-10% of the overall work in complex development tasks.


The remaining effort involves ensuring integration, correctness and compatibility with the surrounding system.


This is why Google argues that independent code review remains important, even when the original code is generated by an AI agent.


A separate reviewer can investigate assumptions and potential defects that the original coding agent may have overlooked.


Open-Source Development Helps Build Trust

Google also identifies transparency and community participation as important elements of Sashiko's development.


The project makes its prompts, tool calls, reasoning steps and dismissed findings publicly accessible.


Developers can also:

  • Run Sashiko in their own environments.

  • Use different AI models, including open-source and local models.

  • Customise review prompts.

  • Adapt the system for projects beyond the Linux kernel.


More than 100 contributors, including kernel maintainers and engineers, have helped improve the project.


This community involvement allows developers to examine how the system reaches conclusions and contribute feedback when its findings are inaccurate.


info-3


What Sashiko Could Mean for Enterprise Software Security

Although Sashiko was initially developed for the Linux kernel, Google believes its underlying review approach can be applied to other foundational open-source projects.


The company specifically identifies GCC, LLVM and Git as potential areas where similar principles could be useful.


The broader significance is not simply that AI can review code faster.


It is that complex code review can be structured into smaller investigations, with separate agents examining different technical concerns and independent verification checking the evidence behind their conclusions.


For enterprises, this could mean a more structured way to integrate AI-assisted reviews into software development workflows.


Several lessons are particularly relevant:

Independent verification matters: AI-generated code should not be treated as correct simply because the system that generated it reports success.

Evidence-based findings improve review quality: Automated tools should distinguish between confirmed defects, possible issues and concerns that have been investigated and dismissed.

Human oversight remains important: AI can support maintainers by investigating code, but engineering teams remain responsible for evaluating changes and making decisions.

Benchmarks should reflect real defects: Organisations developing AI security tools need reliable testing datasets that represent actual software failures.

Transparency supports adoption: Making review processes and findings inspectable can help developers understand and challenge automated recommendations.


These principles are relevant to organisations adopting AI coding assistants, automated security analysis and agentic software engineering workflows.


The Future of AI-Assisted Code Review

Sashiko illustrates a broader shift in software engineering: the growing importance of verifying AI-generated work rather than focusing exclusively on code generation.


As coding agents become more capable, the volume of proposed software changes can increase. Without an equally effective review process, engineering teams may face additional pressure to identify defects and validate changes.


Google's experience suggests that specialised AI agents, structured investigation and independent verification can help address this challenge.


However, AI code review is not a replacement for experienced engineering judgement. False positives, missed defects and complex system dependencies remain important considerations.


Sashiko's production results provide an interesting example of how AI can contribute to the maintenance of critical open-source infrastructure when combined with transparent processes and human participation.


The central lesson is straightforward: generating code is only one part of software engineering. Establishing confidence that the code is correct, secure and compatible with the wider system is equally important.

#GoogleAI#Sashiko#AgenticAI#GeminiAI#LinuxKernel#AICodeReview#ApplicationSecurity#OpenSourceSecurity

About the Author

X
Xcademia Team
Share: