Auto-detect GitHub MCP lockdown based on repository visibility#8111
Conversation
- Create detect_repo_visibility.cjs action to detect repository visibility - Add generateGitHubMCPLockdownDetectionStep to inject detection step - Update MCP renderer to use detected lockdown value when not explicitly set - Add LockdownFromStep field to GitHubMCPDockerOptions and GitHubMCPRemoteOptions - Public repos will automatically have lockdown enabled to prevent token leaking - Private/internal repos will have lockdown disabled by default Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Add comprehensive test suite for lockdown auto-detection - Test auto-detection when lockdown not specified - Test no auto-detection when lockdown explicitly set - Test both local and remote modes - Test with multiple engines (Copilot, Claude) - All tests passing successfully Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
🤖 DIAGNOSTIC COMPLETE: Smoke Copilot No Firewall STATUS: ALL_UNITS_OPERATIONAL. MISSION_SUCCESS. |
|
🎉 Yo ho ho! Smoke Copilot Safe Inputs found the treasure and completed successfully! ⚓💰 |
|
📰 VERDICT: Smoke Copilot Playwright has concluded. All systems operational. This is a developing story. 🎤 |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
✅ Firewall validation complete... Smoke Codex Firewall confirmed network sandboxing is operational. 🛡️ |
|
🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰 |
Smoke Test Results✅ File Writing: Created Status: PASS
|
Smoke Test Results (No Firewall)PRs:
Tests:
Status: PASS (4/5 - gh tool limitation expected in workflow context)
|
Smoke Test Results (Run 20582611464)Last 2 Merged PRs:
Test Results:
Overall Status: PASS cc: @pelikhan
|
|
PRs: #8115 “Standardize table rendering in deps_outdated.go”; #8110 “Clarify shared workflow component errors and document 100% standalone compilation rate”
|
Smoke Test Results - Claude Sonnet 4.5Last 2 Merged PRs:
Test Results:
Status: PASS (5/6 core tests passed)
|
Smoke Test Results✅ Playwright MCP: Successfully verified GitHub page title Overall Status: PASS (2/2 core tests)
|
|
PRs: Clarify shared workflow component errors and document 100% standalone compilation rate; Add testifylint to golangci-lint configuration.
|
Public repositories should enable GitHub MCP lockdown by default to prevent the GitHub token from accessing private repositories. Currently, lockdown must be explicitly configured in each workflow.
Changes
JavaScript action (
detect_repo_visibility.cjs)lockdown: truefor public repos,falsefor private/internalCompiler integration
lockdownis not explicitly setactions/github-scriptto execute detection actiongenerateGitHubMCPLockdownDetectionStep()to generate stepMCP renderer
LockdownFromStepfield toGitHubMCPDockerOptionsandGitHubMCPRemoteOptionsGITHUB_LOCKDOWN_MODE=${{ steps.detect-repo-visibility.outputs.lockdown == 'true' && '1' || '0' }}X-MCP-Lockdown: ${{ steps.detect-repo-visibility.outputs.lockdown }}Example
Without explicit lockdown:
Generates detection step + runtime lockdown evaluation.
With explicit lockdown:
No detection step, hardcoded
GITHUB_LOCKDOWN_MODE=1.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.