Applying Gemini CLI to Fix Chromium Unsafe Buffer Usage
CodeHealth rotation
This script and prompt are powering the CodeHealth rotation for spanification of unsafe buffer usage in Chromium. See go/code-health-unsafe-buffer-access and the list of bugs.
The pending generation, patches, and bugs are tracked in the following spreadsheet: go/codehealth-spanification-spreadsheet (Googler-only)
Background
This prompt task applies Gemini CLI to identify and fix unsafe buffer usage in the Chromium codebase.
For more details, see /docs/unsafe_buffers.md.
Googler-only docs: go/gemini-spanification-setup
Setup
- Setup Gemini CLI following /agents/README.md.
- Create //GEMINI.md following /agents/prompts/README.md.
- landmines extension is recommended. See /agents/extensions/README.md.
Usage
vpython3 agents/prompts/projects/spanification/run.py [file_path]
Where [file_path] is the path to the Chromium source file you want to
process. The script will analyze the file, identify unsafe buffer usages,
generate spanified code.
The file ./gemini_spanification_output.json will contains the commit message
and the logs of the operations.