Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 10, 2026

API keys for Safe Outputs, Safe Inputs, and MCP Gateway were masked after intermediate operations, creating a timing window where keys could leak into logs or artifacts between generation and masking.

Changes

Moved ::add-mask:: to execute immediately after key generation:

  • Safe Outputs MCP server config step
  • Safe Inputs MCP server config step
  • MCP Gateway environment setup

Before:

API_KEY=$(openssl rand -base64 45 | tr -d '/+=')
PORT=3001
# ... other operations ...
echo "::add-mask::${API_KEY}"  # Too late

After:

API_KEY=$(openssl rand -base64 45 | tr -d '/+=')
echo "::add-mask::${API_KEY}"  # Immediate
PORT=3001
# ... other operations ...

Test coverage:

  • Added mcp_api_key_masking_test.go with 4 tests validating immediate masking behavior across all three generation sites
  • Tests verify no intermediate operations occur between generation and masking

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


Changeset

  • Type: patch
  • Description: Mask MCP-related API keys immediately after generation to close the timing window where they could leak into logs or artifacts.

Generated by Changeset Generator

Copilot AI and others added 2 commits February 10, 2026 00:33
Apply ::add-mask:: immediately after API key generation for Safe Outputs, Safe Inputs, and MCP Gateway to prevent timing window where keys could be captured from logs.

- Remove empty variable declarations before assignment
- Move masking to occur immediately after openssl generation
- Add comprehensive tests for immediate masking behavior

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
All tests pass. Security vulnerability fixed:
- Safe Outputs API key masked immediately after generation
- Safe Inputs API key masked immediately after generation
- MCP Gateway API key masked immediately after generation
- Comprehensive test coverage added
- All 148 workflows recompiled successfully

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix timing vulnerability in API key generation Fix API key masking timing vulnerability in MCP setup generation Feb 10, 2026
Copilot AI requested a review from pelikhan February 10, 2026 00:41
@pelikhan pelikhan added the smoke label Feb 10, 2026
@pelikhan pelikhan marked this pull request as ready for review February 10, 2026 00:46
Copilot AI review requested due to automatic review settings February 10, 2026 00:46
@github-actions
Copy link
Contributor

🧪 Smoke Project is now testing project operations...

@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2026

Changeset Generator completed successfully!

@github-actions
Copy link
Contributor

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions
Copy link
Contributor

Agent Container Tool Check 🔧

Tool Status Version
bash 5.2.21
sh available
git 2.52.0
jq 1.7
yq 4.52.2
curl 8.5.0
gh 2.86.0
node 20.20.0
python3 3.12.3
go 1.24.12
java 5.2.21
dotnet not found

Result: 11/12 tools available ❌

Status: FAIL - .NET runtime (dotnet) is not available in the container


Note: Java version output appears incorrect (showing bash version). All other tools are present and functional.

AI generated by Agent Container Smoke Test

@github-actions
Copy link
Contributor

Smoke Project completed successfully. All project operations validated.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR closes a secret-masking timing window in generated MCP setup shell snippets by moving ::add-mask:: to run immediately after API key generation (Safe Outputs, Safe Inputs, and MCP Gateway), reducing the chance of keys being exposed via logs/artifacts.

Changes:

  • Reordered shell commands so API keys are masked immediately after generation (before any intermediate operations).
  • Removed pre-declarations like API_KEY="" / MCP_GATEWAY_API_KEY="" that created unnecessary unmasked windows.
  • Updated compiled workflow lockfiles to reflect the corrected ordering.

Reviewed changes

Copilot reviewed 151 out of 151 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/workflow-skill-extractor.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/workflow-normalizer.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/workflow-health-manager.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/workflow-generator.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/weekly-issue-summary.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/video-analyzer.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/unbloat-docs.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/ubuntu-image-analyzer.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/typist.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/tidy.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/test-workflow.lock.yml Masks MCP Gateway API key immediately after generation.
.github/workflows/test-project-url-default.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/test-dispatcher.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/test-create-pr-error-handling.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/terminal-stylist.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/technical-doc-writer.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/super-linter.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/sub-issue-closer.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/step-name-alignment.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/static-analysis-report.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/stale-repo-identifier.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/smoke-test-tools.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/smoke-project.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/slide-deck-maintainer.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/sergo.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/semantic-function-refactor.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/security-review.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/security-guard.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/security-compliance.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/scout.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/schema-consistency-checker.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/safe-output-health.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/research.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/repository-quality-improver.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/repo-tree-map.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/repo-audit-analyzer.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/release.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/q.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/python-data-charts.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/prompt-clustering-analysis.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/pr-triage-agent.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/pr-nitpick-reviewer.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/portfolio-analyst.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/plan.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/pdf-summary.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/org-health-report.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/metrics-collector.lock.yml Masks MCP Gateway API key immediately after generation.
.github/workflows/mergefest.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/lockfile-stats.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/layout-spec-maintainer.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/jsweep.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/issue-triage-agent.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/issue-monster.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/issue-classifier.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/issue-arborist.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/instructions-janitor.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/hourly-ci-cleaner.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/grumpy-reviewer.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/go-pattern-detector.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/go-fan.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/glossary-maintainer.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/github-mcp-tools-report.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/functional-pragmatist.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/firewall.lock.yml Masks MCP Gateway API key immediately after generation.
.github/workflows/firewall-escape.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/example-workflow-analyzer.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/example-permissions-warning.lock.yml Masks MCP Gateway API key immediately after generation.
.github/workflows/example-custom-error-patterns.lock.yml Masks MCP Gateway API key immediately after generation.
.github/workflows/duplicate-code-detector.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/draft-pr-cleanup.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/docs-noob-tester.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/discussion-task-miner.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/dictation-prompt.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/dev.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/dev-hawk.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/dependabot-project-manager.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/dependabot-go-checker.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/dependabot-burner.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/delight.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/deep-report.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/daily-workflow-updater.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/daily-team-status.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/daily-syntax-error-quality.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/daily-semgrep-scan.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/daily-secrets-analysis.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/daily-safe-output-optimizer.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/daily-news.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/daily-issues-report.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/daily-firewall-report.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/daily-file-diet.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/daily-fact.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/daily-doc-updater.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/daily-compiler-quality.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/daily-code-metrics.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/daily-choice-test.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/craft.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/copilot-session-insights.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/copilot-agent-analysis.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/codex-github-remote-mcp-test.lock.yml Masks MCP Gateway API key immediately after generation.
.github/workflows/code-simplifier.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/code-scanning-fixer.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/cloclo.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/cli-version-checker.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/ci-doctor.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/ci-coach.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/chroma-issue-indexer.lock.yml Masks MCP Gateway API key immediately after generation.
.github/workflows/changeset.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/brave.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/blog-auditor.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/audit-workflows.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/artifacts-summary.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/archie.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/ai-moderator.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.
.github/workflows/agent-performance-analyzer.lock.yml Masks Safe Outputs + MCP Gateway API keys immediately after generation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

Smoke test results (Codex)
GitHub MCP ✅ — #14698 Fix detection job checkout failure from missing contents permission; #14697 chore: create workflow video with voice over
Serena MCP ✅ — activate + find_symbol (173 symbols)
Playwright ✅ — title contains "GitHub"
File write ✅ — smoke-test-codex-21846954049.txt
Bash cat ✅
Build ✅ — make build
Overall: PASS

AI generated by Smoke Codex

@github-actions
Copy link
Contributor

Smoke Test Results ✅

Test Status
GitHub MCP
Safe Inputs
Serena MCP
Playwright
File/Bash
Discussion
Build
Dispatch

Status: PASS ✅

cc: @pelikhan @Copilot

AI generated by Smoke Copilot

@github-actions
Copy link
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@pelikhan pelikhan merged commit 9f639c8 into main Feb 10, 2026
1 check passed
@pelikhan pelikhan deleted the copilot/fix-timing-vulnerability branch February 10, 2026 00:53
@github-actions
Copy link
Contributor

🔍 PR Triage Results

Category: bug | Risk: high | Priority: 82/100

Scores Breakdown

  • Impact: 48/50 - Security fix with high system impact
  • Urgency: 28/30 - Security-critical vulnerability requiring immediate attention
  • Quality: 6/20 - CI pending, draft status, basic description provided

📋 Recommended Action: FAST_TRACK

🔥 SECURITY-CRITICAL: This PR addresses an API key masking timing vulnerability in MCP setup generation. Ensures API keys are masked immediately after generation before any other operations (PORT assignment, exports, etc.).

Impact: High-priority security fix affecting 100 workflow files. Prevents timing attacks where API keys could be exposed in logs between generation and masking.

Next Steps:

  1. Priority review by security team
  2. Verify masking occurs immediately in all three contexts (Safe Outputs, Safe Inputs, MCP Gateway)
  3. Test with sample workflows to confirm fix
  4. Fast-track merge after approval

Triaged by PR Triage Agent on 2026-02-10 00:45 UTC

AI generated by PR Triage Agent

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants