Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion actions/setup/sh/convert_gateway_config_gemini.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ jq --arg urlPrefix "$URL_PREFIX" '
# Fix the URL to use the correct domain
.url |= (. | sub("^http://[^/]+/mcp/"; $urlPrefix + "/mcp/"))
)
)
) |
# Allow Gemini CLI to read files from /tmp/gh-aw/ (e.g. MCP payload files)
.includeDirectories = ["/tmp/gh-aw/"]
Comment on lines +98 to +99
Copy link

Copilot AI Feb 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Granting read access to all of /tmp/gh-aw/ is broader than necessary; it increases the blast radius if any sensitive files end up in that directory. Consider narrowing this to the specific payload directory (e.g. /tmp/gh-aw/mcp-payloads/) and/or gating it behind an explicit env/config toggle so it’s only enabled in environments that need it.

Suggested change
# Allow Gemini CLI to read files from /tmp/gh-aw/ (e.g. MCP payload files)
.includeDirectories = ["/tmp/gh-aw/"]
# Allow Gemini CLI to read MCP payload files from a specific subdirectory
.includeDirectories = ["/tmp/gh-aw/mcp-payloads/"]

Copilot uses AI. Check for mistakes.
Comment on lines +98 to +99
Copy link

Copilot AI Feb 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This overwrites any existing includeDirectories that may already be present in the incoming config. To avoid clobbering user/configured values, merge with the existing array (defaulting to []) and de-duplicate instead of assigning a new array.

Suggested change
# Allow Gemini CLI to read files from /tmp/gh-aw/ (e.g. MCP payload files)
.includeDirectories = ["/tmp/gh-aw/"]
# Allow Gemini CLI to read files from /tmp/gh-aw/ (e.g. MCP payload files),
# preserving any existing includeDirectories and avoiding duplicates
.includeDirectories = ((.includeDirectories // []) + ["/tmp/gh-aw/"] | unique)

Copilot uses AI. Check for mistakes.
' "$MCP_GATEWAY_OUTPUT" > "$GEMINI_SETTINGS_FILE"

echo "Gemini configuration written to $GEMINI_SETTINGS_FILE"
Expand Down