You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/content/docs/guides/security.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -250,23 +250,25 @@ The compiler generates per-tool Squid proxies; MCP egress is forced through ipta
250
250
251
251
#### Automatic GitHub Lockdown on Public Repositories
252
252
253
-
When using the GitHub MCP tool in public repositories, lockdown mode is **automatically enabled by default** to prevent accidental data leakage. This security feature restricts the GitHub token from accessing private repositories, ensuring that workflows running in public repositories cannot inadvertently expose sensitive information.
253
+
When using the GitHub MCP tool with a custom token (`GH_AW_GITHUB_MCP_SERVER_TOKEN`), lockdown mode is **automatically determined based on repository visibility** to prevent accidental data leakage. This security feature restricts the GitHub token from accessing private repositories when running in public repositories.
254
254
255
-
**How Automatic Detection Works:**
255
+
**How Automatic Determination Works:**
256
256
257
-
The system automatically detects repository visibility at workflow runtime:
257
+
When `GH_AW_GITHUB_MCP_SERVER_TOKEN` is defined, the system automatically determines lockdown mode at workflow runtime based on repository visibility:
258
258
259
259
- **Public repositories**: Lockdown mode is automatically enabled. The GitHub MCP server limits surfaced content to items authored by users with push access to the repository.
260
260
- **Private/internal repositories**: Lockdown mode is automatically disabled since there's no risk of exposing private repository access.
261
261
- **Detection failure**: If repository visibility cannot be determined, the system defaults to lockdown mode for maximum security.
262
262
263
-
**No Configuration Required:**
263
+
**When using default `GITHUB_TOKEN`**: Automatic determination is skipped and lockdown defaults to disabled (no restriction).
264
+
265
+
**Minimal Configuration:**
264
266
265
267
```yaml wrap
266
268
tools:
267
269
github:
268
-
# Lockdown is automatically enabled for public repos
269
-
# No explicit configuration needed
270
+
# Lockdown is automatically determined for public repos
271
+
# when GH_AW_GITHUB_MCP_SERVER_TOKEN is defined
270
272
```
271
273
272
274
**Manual Override (Optional):**
@@ -287,10 +289,10 @@ Explicitly setting `lockdown: false` in a public repository disables this securi
287
289
288
290
**Security Benefits:**
289
291
290
-
- **Prevents token scope leakage**: Even if a GitHub token has access to private repositories, lockdown mode prevents that access from being used in public repository workflows
292
+
- **Prevents token scope leakage**: When using a custom token with private repository access, lockdown mode prevents that access from being used in public repository workflows
291
293
- **Defense in depth**: Adds an additional layer of protection beyond token scoping
292
-
- **Automatic and transparent**: Works without any configuration changes
293
-
- **Safe by default**: Failures default to the most secure setting
294
+
- **Automatic and transparent**: Works automatically when `GH_AW_GITHUB_MCP_SERVER_TOKEN` is defined
295
+
- **Safe by default**: Detection failures default to the most secure setting
294
296
295
297
See also: [GitHub MCP Tool Configuration](/gh-aw/reference/tools/#github-tools-github) for complete tool configuration options.
**Lockdown**: Automatically enabled for public repositories to prevent accidental data leakage. Filters public repository content to items from users with push access. Private repositories are unaffected.
113
+
**Lockdown**: Automatically determined based on repository visibility when using a custom token (`GH_AW_GITHUB_MCP_SERVER_TOKEN`). Filters public repository content to items from users with push access. Private repositories are unaffected.
114
114
115
-
- **Automatic (default)**: Lockdown is automatically enabled for public repositories and disabled for private/internal repositories
116
-
- **Manual override**: Explicitly set `lockdown: true` or `lockdown: false` to override automatic detection
115
+
- **Automatic (default)**: When `GH_AW_GITHUB_MCP_SERVER_TOKEN` is defined, lockdown is automatically enabled for public repositories and disabled for private/internal repositories
116
+
- **Manual override**: Explicitly set `lockdown: true` or `lockdown: false` to override automatic determination
117
117
118
118
```yaml wrap
119
119
tools:
120
120
github:
121
-
# Option 1: Automatic (recommended) - no configuration needed
122
-
# Lockdown automatically enabled for public repos
121
+
# Option 1: Automatic (recommended) - determined at runtime
122
+
# Lockdown automatically enabled for public repos when GH_AW_GITHUB_MCP_SERVER_TOKEN is set
0 commit comments