CI/CD Hardening Checklist
1. Workspace Trust & Input Safety (Highest Priority) Never auto‑trust workspaces in CI Require explicit trust configuration for any repo contents before loading configs or env files. Mandatory for AI agents running in headless mode (e.g., Gemini CLI). Treat forks, PRs, issues, and comments as untrusted Especially dangerous when pipelines run on pull_request_target . Never load .env , .gemini/ , or agent config from untrusted inputs. Block configuration discovery Disable recursive discovery of agent configs unless explicitly allow‑listed. 2. AI Agent–Specific Controls (Gemini CLI, Claude Code, etc.) Upgrade all agent tools Gemini CLI ≥ 0.39.1 run-gemini-cli Action ≥ 0.1.22 Disable unrestricted execution modes Avoid --yolo or equivalent autonomous modes. If required, enforce strict command allowlists . Separate “analysis” from “execution” Let agents review or suggest changes. Require a human gate or isolated job for command execution. No agent runs with contributor‑level pr...