tree: 9be5e93fce8e4ba19862853593ca334baf2b76fe
  1. OWNERS
  2. prompt.md
  3. README.md
  4. run.py
  5. run_test.py
agents/prompts/projects/spanification/README.md

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

  1. Setup Gemini CLI following /agents/README.md.
  2. Create //GEMINI.md following /agents/prompts/README.md.
  3. 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.