githubnext / githubnext/gh-aw-test
Suggested test: copilot/mcp-gateway-custom-env-special-chars
- Dominant language
- Shell
- Stars
- 8
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
> [!WARNING]
> **Threat Detection Engine Failure** — The analysis engine could not complete. This is a tooling failure, not a security finding.
>
>
>
> What happened
>
> The threat detection results could not be parsed.
>
> Review the [workflow run logs](https://github.com/githubnext/gh-aw-test/actions/runs/31162929773) for details.
>
## Motivation
Link to the gh-aw PR: github/gh-aw#50924 — fixed GHSA-j77w-g4jj-hp99: `sandbox.mcp.env` custom values were interpolated directly into generated shell/Docker command strings, allowing shell-metacharacter injection. Fix routes values through indexed transport variables (`GH_AW_MCP_GATEWAY_ENV_N`) instead of raw interpolation. `test-copilot-mcp-printEnv.md` exercises `mcp-servers.*.env` with a simple value (`LOCAL_TIMEZONE`) but never one containing shell metacharacters, so the regression path is untested.
## Proposed test
- **Workflow file**: `test-copilot-mcp-env-special-chars.md`
- **Trigger**: `workflow_dispatch`
- **Engine**: copilot
- **Safe output**: `create-issue`
- **Variant**: standard
## Minimal test prompt sketch
Modeled on `test-copilot-mcp-printEnv.md`: configure an MCP server with `env` containing a value with shell metacharacters (e.g. a semicolon, backtick, or newline, injected via a workflow input or hardcoded literal) and use the `printEnv` tool to fetch it back. Ask the agent to create an issue containing the raw value. Assert the value round-trips unmodified (no command injection, no truncation) and the runner shell is not affected.
## New fixtures or secrets needed
None — reuse the `mcp/everything` container fixture already used by `test-copilot-mcp-printEnv.md`.
## Notes
This is a security regression test; scope is narrow (verify special characters in `sandbox.mcp.env`/`mcp-servers.*.env` survive safely) rather than re-testing general MCP functionality already covered by `test-copilot-mcp.md` and `test-copilot-mcp-printEnv.md`.
> Generated by [🔍 Suggest New E2E Tests](https://github.com/githubnext/gh-aw-test/actions/runs/31162929773) · auto · 34.6 AIC · ⊞ 8.3K · [◷](https://github.com/search?q=repo%3Agithubnext%2Fgh-aw-test+is%3Aissue+%22gh-aw-workflow-call-id%3A+githubnext%2Fgh-aw-test%2Fsuggest-new-e2e-tests%22&type=issues)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with test-copilot-mcp-printEnv.md and the related test-copilot-mcp.md, then create the proposed test-copilot-mcp-env-special-chars.md workflow using the existing mcp/everything container fixture. Trigger it with workflow_dispatch and verify that a value containing shell metacharacters is returned unchanged through printEnv, creates the expected issue, and does not affect the runner shell.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, shell
- Domain
- security, testing-qa
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 82/100