Skip to content

Update public workflow trust and readme - #28098

Closed
DavidAPierce wants to merge 1 commit into
mainfrom
workflow_trust_update
Closed

Update public workflow trust and readme#28098
DavidAPierce wants to merge 1 commit into
mainfrom
workflow_trust_update

Conversation

@DavidAPierce

Copy link
Copy Markdown
Contributor

Summary

This PR remediates potential privilege escalation and secret exfiltration within GitHub Actions workflows that process untrusted public inputs (such as issue titles, bodies, and comments).

By removing GEMINI_CLI_TRUST_WORKSPACE: 'true' and setting "tools": {"core": []}, we prevent pull requests or issue inputs from abusing workspace-level configuration settings. Security best practices have been added to our documentation and README.md.

Details

The security hardening includes the following:

  1. Workflow Refactoring & De-tooling:

    • .github/workflows/gemini-automated-issue-triage.yml:
      • Removed the file-writing Prepare Issue Data step (which created issue_context.md).
      • Completely stripped GEMINI_CLI_TRUST_WORKSPACE: 'true' so that the CLI runs in restricted "safe mode" and strictly ignores any local workspace settings files (.gemini/settings.json) submitted in PRs.
      • De-tooled the model by setting "tools": {"core": []} in the workflow's global settings, making any prompt injection trying to run file/shell commands entirely inert.
      • Refactored data ingestion to securely pass the issue title and body inline inside the prompt using standard GitHub Actions expression syntax.
    • .github/workflows/gemini-automated-issue-dedup.yml: Removed GEMINI_CLI_TRUST_WORKSPACE: 'true'.
    • .github/workflows/gemini-cli-bot-brain.yml: Removed GEMINI_CLI_TRUST_WORKSPACE: 'true'.
    • .github/workflows/gemini-scheduled-issue-triage.yml: Removed both standard and effort triage occurrences of GEMINI_CLI_TRUST_WORKSPACE: 'true'.
  2. Security Documentation & Alerts Added:

    • docs/cli/trusted-folders.md: Added a highly visible, sentence-cased [!WARNING] callout detailing the security implications of bypassing trust checks in pipelines processing public, untrusted inputs.
    • README.md: Added a corresponding warning note under the "GitHub Integration" section to capture any developer setting up the GitHub Action.

How to Validate

  1. Run formatting and syntax checks locally to ensure our YAML, Markdown, and configuration files are fully valid:
    npm run format
    npm run lint
  2. Verify that the linting and formatting steps pass cleanly (completed successfully, exit code 0).
  3. Review the git diff for .github/workflows/gemini-automated-issue-triage.yml to confirm clean YAML formatting and correct inline context interpolation.

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • MacOS
      • npm run
      • npx
      • Docker
      • Podman
      • Seatbelt
    • Windows
      • npm run
      • npx
      • Docker
    • Linux
      • npm run
      • npx
      • Docker

@DavidAPierce
DavidAPierce requested review from a team as code owners June 22, 2026 17:56
@github-actions github-actions Bot added the size/l A large sized PR label Jun 22, 2026
@github-actions

Copy link
Copy Markdown

📊 PR Size: size/L

  • Lines changed: 304
  • Additions: +31
  • Deletions: -273
  • Files changed: 24

@github-actions

Copy link
Copy Markdown

Size Change: -4 B (0%)

Total Size: 35.2 MB

Filename Size Change
./bundle/chunk-7H6HPU3J.js 0 B -16.2 MB (removed) 🏆
./bundle/chunk-7MAMFWTD.js 0 B -13 kB (removed) 🏆
./bundle/chunk-FAZJ4W3L.js 0 B -49.2 kB (removed) 🏆
./bundle/chunk-IHRQUZII.js 0 B -3.77 kB (removed) 🏆
./bundle/chunk-MKYZI44V.js 0 B -661 kB (removed) 🏆
./bundle/chunk-NEFA7V45.js 0 B -3.43 kB (removed) 🏆
./bundle/chunk-NVHHRQCK.js 0 B -3.65 MB (removed) 🏆
./bundle/chunk-X3GIAGQR.js 0 B -19.5 kB (removed) 🏆
./bundle/core-FYO2I2PY.js 0 B -50 kB (removed) 🏆
./bundle/devtoolsService-2UY6COC3.js 0 B -147 kB (removed) 🏆
./bundle/gemini-2D6FUKUZ.js 0 B -1.04 MB (removed) 🏆
./bundle/interactiveCli-OZUMR4HF.js 0 B -1.3 MB (removed) 🏆
./bundle/liteRtServerManager-666CJKC6.js 0 B -2.08 kB (removed) 🏆
./bundle/oauth2-provider-TOHQ2KRD.js 0 B -9.12 kB (removed) 🏆
./bundle/chunk-26WJUJLT.js 3.43 kB +3.43 kB (new file) 🆕
./bundle/chunk-27DQZVYW.js 16.2 MB +16.2 MB (new file) 🆕
./bundle/chunk-5D52MWWF.js 19.5 kB +19.5 kB (new file) 🆕
./bundle/chunk-CT25DWM4.js 13 kB +13 kB (new file) 🆕
./bundle/chunk-GBRYPFP2.js 49.2 kB +49.2 kB (new file) 🆕
./bundle/chunk-IVQCIFXY.js 661 kB +661 kB (new file) 🆕
./bundle/chunk-RAOVBT3P.js 3.65 MB +3.65 MB (new file) 🆕
./bundle/chunk-ZJHEJ5FC.js 3.77 kB +3.77 kB (new file) 🆕
./bundle/core-EDOWIS4P.js 50 kB +50 kB (new file) 🆕
./bundle/devtoolsService-B2QBMZZG.js 147 kB +147 kB (new file) 🆕
./bundle/gemini-Z6MW3UST.js 1.04 MB +1.04 MB (new file) 🆕
./bundle/interactiveCli-ZZ55RQA4.js 1.3 MB +1.3 MB (new file) 🆕
./bundle/liteRtServerManager-KC3WY6KV.js 2.08 kB +2.08 kB (new file) 🆕
./bundle/oauth2-provider-66EQOJID.js 9.12 kB +9.12 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size Change
./bundle/bundled/third_party/index.js 8 MB 0 B
./bundle/chunk-34MYV7JD.js 2.45 kB 0 B
./bundle/chunk-5AUYMPVF.js 858 B 0 B
./bundle/chunk-5PS3AYFU.js 1.18 kB 0 B
./bundle/chunk-664ZODQF.js 124 kB 0 B
./bundle/chunk-DAHVX5MI.js 206 kB 0 B
./bundle/chunk-IUUIT4SU.js 56.5 kB 0 B
./bundle/chunk-TUDYL3X4.js 40.3 kB 0 B
./bundle/cleanup-45KFVOGE.js 0 B -902 B (removed) 🏆
./bundle/devtools-TYCPOPV3.js 683 kB 0 B
./bundle/events-XB7DADIJ.js 418 B 0 B
./bundle/examples/hooks/scripts/on-start.js 188 B 0 B
./bundle/examples/mcp-server/example.js 1.43 kB 0 B
./bundle/gemini.js 5.38 kB 0 B
./bundle/getMachineId-bsd-TXG52NKR.js 1.55 kB 0 B
./bundle/getMachineId-darwin-7OE4DDZ6.js 1.55 kB 0 B
./bundle/getMachineId-linux-SHIFKOOX.js 1.34 kB 0 B
./bundle/getMachineId-unsupported-5U5DOEYY.js 1.06 kB 0 B
./bundle/getMachineId-win-6KLLGOI4.js 1.72 kB 0 B
./bundle/https-proxy-agent-AVGR4LHR.js 490 B 0 B
./bundle/multipart-parser-KPBZEGQU.js 11.7 kB 0 B
./bundle/sandbox-macos-permissive-open.sb 890 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B
./bundle/sandbox-macos-strict-open.sb 4.82 kB 0 B
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB 0 B
./bundle/src-QVCVGIUX.js 47 kB 0 B
./bundle/src-XZYPU6PJ.js 352 kB 0 B
./bundle/start-SQPOTTMC.js 0 B -622 B (removed) 🏆
./bundle/tree-sitter-7U6MW5PS.js 274 kB 0 B
./bundle/tree-sitter-bash-34ZGLXVX.js 1.84 MB 0 B
./bundle/worker/worker-entry.js 363 kB 0 B
./bundle/cleanup-NBWVXIJ2.js 902 B +902 B (new file) 🆕
./bundle/start-C4WJCGWA.js 622 B +622 B (new file) 🆕

compressed-size-action

@DavidAPierce

Copy link
Copy Markdown
Contributor Author

#27947 has already addressed this. Closing PR.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the summary. You can try again by commenting /gemini summary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/l A large sized PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant