Repository navigation
Use readable MCP script env binding names to avoid secret scanning false positives - #78184
Conversation
Replace hex-encoded GH_AW_MCP_SCRIPTS_ENV_<hex>_<hex> transport variable names with an injective readable form GH_AW_MCP_SCRIPTS_ENV_<len>_<TOOL>_<NAME>. Long hex identifiers were flagged by secret scanning as passwords (GH013). Co-authored-by: Copilot App <[email protected]>
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review. Caution agentic threat detected DetailsPotential security threats were detected in the agent output. Detected threat types: prompt injection. Review the workflow run logs for details. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
There was a problem hiding this comment.
Caution
agentic threat detected
Threat detection flagged this output in warn mode. Manual review is REQUIRED before any follow-up automation.
Details
Potential security threats were detected in the agent output. Detected threat types: prompt injection.
Review the workflow run logs for details.
Static review completed for the changed lines. I found no actionable correctness, security, performance, or maintainability issues. The grumpy-coder specialist pass was unavailable because its diff read was denied; this review therefore relies on independent analysis only.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~2 AIC · ⊞ 1.5K
Comment /review to run again
Comment MemoryPeek at saved memory (review-history)History |
Comment MemoryPeek at saved memory (spec-review-history)History |
There was a problem hiding this comment.
🔵 Needs a closer look
The identifier encoder affects per-tool credential isolation, requiring cross-layer review of escape injectivity, manifest generation, startup bindings, and runtime resolution.
No open issues 🎉
What changed in this PR
This PR updates gh-aw’s compiler to generate readable MCP script environment binding names, addressing secret-scanning false positives while preserving distinct bindings for each tool and variable pair.
Changes:
- Replaces hexadecimal names with readable, escaped components and a tool-length prefix.
- Adds collision and readability assertions, updates JavaScript fixtures, and removes obsolete golden-test normalization.
- Refreshes generated workflow locks, native and WebAssembly goldens, and the architecture decision record.
| File | Description |
|---|---|
scripts/test-wasm-golden.mjs |
Removes hexadecimal token-binding normalization. |
pkg/workflow/wasm_golden_test.go |
Removes matching Go golden normalization. |
pkg/workflow/testdata/wasm_golden/WasmBinary/smoke-copilot.golden |
Updates WebAssembly expected bindings. |
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/smoke-copilot.golden |
Updates native expected bindings and ordering. |
pkg/workflow/mcp_scripts_renderer_test.go |
Adds collision and readability assertions. |
pkg/workflow/mcp_scripts_generator.go |
Implements readable, collision-free binding names. |
docs/adr/73887-isolate-mcp-script-secrets-per-tool.md |
Documents the revised encoding scheme. |
actions/setup/js/mcp_scripts_environment.test.cjs |
Updates environment-binding test fixtures. |
actions/setup/js/mcp_dependencies_manager.test.cjs |
Updates credential-isolation test bindings. |
.github/workflows/smoke-goose.lock.yml |
Refreshes homepage tool bindings. |
.github/workflows/smoke-copilot.lock.yml |
Refreshes GitHub query tool bindings. |
.github/workflows/smoke-copilot-arm.lock.yml |
Refreshes ARM smoke-test bindings. |
.github/workflows/smoke-copilot-aoai-entra.lock.yml |
Refreshes Entra smoke-test bindings. |
.github/workflows/smoke-copilot-aoai-apikey.lock.yml |
Refreshes API-key smoke-test bindings. |
.github/workflows/smoke-claude-copilot.lock.yml |
Refreshes probe receipt bindings. |
.github/workflows/smoke-agy.lock.yml |
Refreshes conformance tool bindings. |
.github/workflows/github-mcp-structural-analysis.lock.yml |
Refreshes label and workflow query bindings. |
.github/workflows/engine-conformance-pydantic-ai.lock.yml |
Refreshes Pydantic AI conformance bindings. |
.github/workflows/engine-conformance-pi.lock.yml |
Refreshes Pi conformance bindings. |
.github/workflows/engine-conformance-opencode.lock.yml |
Refreshes OpenCode conformance bindings. |
.github/workflows/engine-conformance-mini-swe-agent.lock.yml |
Refreshes mini-swe-agent conformance bindings. |
.github/workflows/engine-conformance-kiro.lock.yml |
Refreshes Kiro conformance bindings. |
.github/workflows/engine-conformance-goose.lock.yml |
Refreshes Goose conformance bindings. |
.github/workflows/engine-conformance-gemini.lock.yml |
Refreshes Gemini conformance bindings. |
.github/workflows/engine-conformance-factory.lock.yml |
Refreshes Factory conformance bindings. |
.github/workflows/engine-conformance-deepseek-harness.lock.yml |
Refreshes DeepSeek harness conformance bindings. |
.github/workflows/engine-conformance-cursor.lock.yml |
Refreshes Cursor conformance bindings. |
.github/workflows/engine-conformance-crush.lock.yml |
Refreshes Crush conformance bindings. |
.github/workflows/engine-conformance-copilot.lock.yml |
Refreshes Copilot conformance bindings. |
.github/workflows/engine-conformance-codex.lock.yml |
Refreshes Codex conformance bindings. |
.github/workflows/engine-conformance-claude.lock.yml |
Refreshes Claude conformance bindings. |
.github/workflows/engine-conformance-atomic.lock.yml |
Refreshes Atomic conformance bindings. |
.github/workflows/engine-conformance-aider.lock.yml |
Refreshes Aider conformance bindings. |
.github/workflows/engine-conformance-agy.lock.yml |
Refreshes AGY conformance bindings. |
.github/workflows/deep-report.lock.yml |
Refreshes label and workflow query bindings. |
.github/workflows/daily-regulatory.lock.yml |
Refreshes GitHub query tool bindings. |
.github/workflows/daily-performance-summary.lock.yml |
Refreshes GitHub query tool bindings. |
.github/workflows/daily-mcp-concurrency-analysis.lock.yml |
Refreshes audit run-ID bindings. |
.github/workflows/daily-caveman-optimizer.lock.yml |
Refreshes optimizer run-ID bindings. |
.github/workflows/agy-conformance-reusable.lock.yml |
Refreshes reusable conformance bindings. |
Review effort: Balanced (dynamic)
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /codebase-design, /tdd, and /grill-with-docs. The core change is sound: the readable GH_AW_MCP_SCRIPTS_ENV_<len>_<TOOL>_<NAME> format is injective, the length prefix keeps the join unambiguous, and the old hex→TOKEN golden normalization can be removed safely. Go tests for the binding, secret collection, and wasm golden paths pass.
📋 Key Themes & Highlights
Key Themes
- Lowercase variable names: byte-level escaping still produces long hex-like runs, which is the pattern this PR removes (encoder, inline comment).
- Test gaps: no case pins the lowercase or
x-escape path (renderer test). - Docs convention: the Proposed ADR was rewritten in place instead of amended (ADR 73887).
- JS helper divergence:
binding()inmcp_scripts_environment.test.cjsdoes not map-to_(latent).
Positive Highlights
- ✅ Collision tests cover dash/underscore and length-prefix joins.
- ✅ Golden normalization removal is covered by native and wasm golden tests.
- ✅ Duplicate
GH_AW_MCP_SCRIPTS_ENV_TOKENkeys are gone, so bindings are unique.
Verification Limits
- JS vitest for
mcp_scripts_environment.test.cjsandmcp_dependencies_manager.test.cjswas not run.npm ciinactions/setup/jsfailed on a self-signed certificate from the sandbox registry proxy, so those tests are unverified.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~9 AIC · ⌖ ~2 AIC · ⊞ 6.7K
Comment /matt to run again
Co-authored-by: Copilot App <[email protected]>
Escape lowercase variable-name letters as x<UPPER> and other bytes as x<3-digit decimal> so no encoded name produces hex-like runs, pin outputs in tests, align the JS test helper with dash mapping, and record the encoding change as a dated ADR amendment. Co-authored-by: Copilot App <[email protected]>
|
🎉 This pull request is included in a new release. Release: |
GitHub's secret scanner flagged the generated MCP script transport variable names (for example
GH_AW_MCP_SCRIPTS_ENV_6769746875622d70722d7175657279_47485f544f4b454e) as passwords and rejected branch pushes withGH013. These are environment variable names, not token values, but the long hexadecimal components look like generic secrets.Approach
mcpScriptEnvBindingNamenow produces readable names of the form:The encoding stays injective, preserving the guarantee from ADR 73887 that distinct
(tool, variable)pairs never collide:a-z->A-Z,-->_, digits unchanged.A-Z,0-9,_unchanged.x<HH>. Lowercasexis never produced otherwise, so escapes are unambiguous.a+B_Cvsa-b+C).Other changes
smoke-copilotwasm golden files.GH_TOKENbindings toGH_AW_MCP_SCRIPTS_ENV_TOKEN(Go andscripts/test-wasm-golden.mjs). It appears to have existed only to dodge the scanner; native and wasm goldens pass without it.mcp_scripts_renderer_test.go.Notes for reviewers
tools.jsonand strips theGH_AW_MCP_SCRIPTS_ENV_prefix, so it doesn't depend on the old hex format.TestDailyGoTestParallelizerUsesCodexCompatibleModelfails onmainas well and is unrelated.