Conversation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/ac7e1cfa-d5db-4bb8-9f70-e5822d0f71d7 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
## Context Companion to [gh-aw#26658](github/gh-aw#26658), which adds `--user $(id -u):$(id -g)` to the MCP gateway Docker run command so log files written via `/tmp` bind mounts are readable by downstream redaction and upload steps. ## Problem `run_containerized.sh` runs with `set -e` and unconditionally writes to `/etc/hosts` (line 289): ```bash echo "$HOST_IP host.docker.internal" >> /etc/hosts ``` When the container runs as a non-root user, this write fails with EACCES, aborting the entire gateway startup. ## Fix Wrap the `/etc/hosts` write in an if-else so failure produces a warning instead of aborting. With `--network host` (which the gateway always uses), the `host.docker.internal` mapping is unnecessary since `localhost` works directly. ## Changes | File | Change | |------|--------| | `run_containerized.sh` | Make `/etc/hosts` write non-fatal; log warning on failure | `make agent-finished` ✓
|
Hey Contribution Check Summary
Verdict: 🟢 Aligned —
|
|
@pelikhan can the gateway just create these log files w/ the right ownership? running mcpgs as non-root is likely to break a bunch of stuff, including the mcpg's ability to launch containers. |
|
@copilot resolve the merge conflicts in this pull request |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/0b31d669-b81c-440e-bd56-b06d41406195 Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
…nied-logs' into copilot/fix-eacces-permission-denied-logs # Conflicts: # .github/workflows/contribution-check.md # .github/workflows/daily-cli-performance.lock.yml # .github/workflows/daily-fact.lock.yml # .github/workflows/daily-observability-report.lock.yml # .github/workflows/daily-regulatory.lock.yml # .github/workflows/daily-rendering-scripts-verifier.lock.yml # .github/workflows/daily-safe-output-optimizer.lock.yml # .github/workflows/daily-secrets-analysis.lock.yml # .github/workflows/daily-syntax-error-quality.lock.yml # .github/workflows/daily-team-evolution-insights.lock.yml # .github/workflows/daily-team-status.lock.yml # .github/workflows/smoke-claude.lock.yml # .github/workflows/smoke-codex.lock.yml # .github/workflows/smoke-copilot-arm.lock.yml # .github/workflows/smoke-crush.lock.yml # .github/workflows/smoke-crush.md # .github/workflows/smoke-gemini.lock.yml # .github/workflows/workflow-skill-extractor.md # pkg/workflow/mcp_setup_generator.go Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Resolved the merge conflicts and pushed the updated branch. The conflict-resolution merge commits are Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Pull request overview
Intended to eliminate persistent “Redact secrets in logs” warnings by running the MCP gateway container as the runner user; however, the diffs shown primarily update workflow instruction templates to inline a noop safe-output reminder and adjust generated workflow lockfile headers/regen artifacts.
Changes:
- Inlines the
noopsafe-output reminder text into selected workflow markdown templates (replacingshared/noop-reminder.mdimports). - Removes references to
shared/noop-reminder.mdfrom several workflow.lock.ymlheader comment blocks. - Regenerates portions of some
.lock.ymlfiles (e.g., heredoc marker IDs), without reflecting the described MCP gateway--user <uid>:<gid>change.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/workflow-skill-extractor.md | Replaces noop reminder import with inlined noop safe-output guidance. |
| .github/workflows/smoke-gemini.lock.yml | Removes noop-reminder include reference from lock header comments. |
| .github/workflows/smoke-crush.md | Replaces noop reminder import with inlined noop safe-output guidance. |
| .github/workflows/smoke-crush.lock.yml | Removes noop-reminder include reference from lock header comments. |
| .github/workflows/smoke-copilot-arm.lock.yml | Removes noop-reminder include reference from lock header comments. |
| .github/workflows/smoke-codex.lock.yml | Removes noop-reminder include reference from lock header comments. |
| .github/workflows/smoke-claude.lock.yml | Removes noop-reminder include reference and shows regenerated heredoc markers; MCP gateway command remains unchanged. |
| .github/workflows/daily-team-status.lock.yml | Removes noop-reminder include reference from lock header comments. |
| .github/workflows/daily-team-evolution-insights.lock.yml | Removes noop-reminder include reference from lock header comments. |
| .github/workflows/daily-syntax-error-quality.lock.yml | Removes noop-reminder include reference from lock header comments. |
| .github/workflows/daily-secrets-analysis.lock.yml | Removes noop-reminder include reference from lock header comments. |
| .github/workflows/daily-safe-output-optimizer.lock.yml | Removes noop-reminder include reference from lock header comments. |
| .github/workflows/daily-rendering-scripts-verifier.lock.yml | Removes noop-reminder include reference from lock header comments. |
| .github/workflows/daily-regulatory.lock.yml | Removes noop-reminder include reference from lock header comments. |
| .github/workflows/daily-observability-report.lock.yml | Removes noop-reminder include reference from lock header comments. |
| .github/workflows/daily-fact.lock.yml | Removes noop-reminder include reference and shows regenerated heredoc markers; MCP gateway command remains unchanged. |
| .github/workflows/daily-cli-performance.lock.yml | Removes noop-reminder include reference from lock header comments. |
| .github/workflows/contribution-check.md | Replaces noop reminder import with inlined noop safe-output guidance. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 18/18 changed files
- Comments generated: 2
| export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host --group-add '"${DOCKER_SOCK_GID}"' -v /var/run/docker.sock:/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GH_AW_MCP_SCRIPTS_PORT -e GH_AW_MCP_SCRIPTS_API_KEY -e GH_AW_SAFE_OUTPUTS_PORT -e GH_AW_SAFE_OUTPUTS_API_KEY -e GH_AW_GH_TOKEN -e GH_DEBUG -e GH_TOKEN -e TAVILY_API_KEY -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.2.22' | ||
|
|
||
| GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) | ||
| cat << GH_AW_MCP_CONFIG_7f02447c1d397bd6_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" | ||
| cat << GH_AW_MCP_CONFIG_440ec385917e58e8_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" | ||
| { |
There was a problem hiding this comment.
The PR description/title says MCP Gateway should be started with an explicit Docker user mapping (runner UID/GID) to make logs under /tmp readable (e.g., adding a --user <uid>:<gid> flag). In this compiled workflow, MCP_GATEWAY_DOCKER_COMMAND still does not include --user, so the described fix isn’t present here. Also note that actions/start_mcp_gateway.cjs splits the command and calls spawn() directly (no shell), so putting $(id -u):$(id -g) into the command string would not be evaluated; the UID/GID need to be computed in the shell step and injected as literals (or passed via env and expanded outside single quotes) before exporting the command.
| @@ -742,7 +740,7 @@ jobs: | |||
| DOCKER_SOCK_GID=$(stat -c '%g' /var/run/docker.sock 2>/dev/null || echo '0') | |||
| export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host --group-add '"${DOCKER_SOCK_GID}"' -v /var/run/docker.sock:/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GH_AW_SAFE_OUTPUTS_PORT -e GH_AW_SAFE_OUTPUTS_API_KEY -e GITHUB_AW_OTEL_TRACE_ID -e GITHUB_AW_OTEL_PARENT_SPAN_ID -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/github/gh-aw-mcpg:v0.2.22' | |||
|
|
|||
| cat > "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" << GH_AW_MCP_CONFIG_1b4b127ec8d7bd00_EOF | |||
| cat > "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" << GH_AW_MCP_CONFIG_e0a52995a75c5f27_EOF | |||
There was a problem hiding this comment.
The PR description/title says MCP Gateway should be started with a Docker --user <uid>:<gid> mapping to avoid unreadable /tmp/gh-aw/mcp-logs files. Here MCP_GATEWAY_DOCKER_COMMAND still has no --user flag, so the change described by the PR isn’t reflected in this generated workflow. Because actions/start_mcp_gateway.cjs runs docker run via spawn() (not a shell), a literal $(id -u):$(id -g) inside the command string would not be expanded; compute UID/GID in the bash step and inject numeric values into the exported command instead.
|
@copilot update the PR with this review feedback #26658 (review) |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/5cbe4239-9614-4d15-9d63-5bda67369857 Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
…ping Agent-Logs-Url: https://github.com/github/gh-aw/sessions/5cbe4239-9614-4d15-9d63-5bda67369857 Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
…onale Agent-Logs-Url: https://github.com/github/gh-aw/sessions/5cbe4239-9614-4d15-9d63-5bda67369857 Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Updated the PR per the review feedback in Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
The
agentjob was consistently emitting warning annotations during Redact secrets in logs because key MCP log files under/tmp/gh-aw/mcp-logswere not readable by the step user. This caused noisy warning badges and prevented redaction from processing those logs.Runtime ownership fix in generated MCP gateway command
MCP_GATEWAY_DOCKER_COMMAND, so the command executed byspawn()uses literal values./tmpbind mounts are readable by downstream redaction/upload steps while preserving Docker socket access via supplementary group mapping.Coverage for generated command contract