Skip to content

Commit 94d39b0

Browse files
[docs] Self-healing documentation fixes from issue analysis - 2026-02-28 (#18898)
1 parent db0ccd1 commit 94d39b0

1 file changed

Lines changed: 75 additions & 0 deletions

File tree

docs/src/content/docs/reference/github-tools.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,81 @@ tools:
5555
mode: local
5656
```
5757

58+
## Guard Policies
59+
60+
Restrict which repositories and integrity levels the GitHub MCP server can access during agent execution. Guard policies apply fine-grained access control at the MCP gateway level.
61+
62+
```yaml wrap
63+
tools:
64+
github:
65+
mode: remote
66+
toolsets: [default]
67+
repos: "all"
68+
min-integrity: reader
69+
```
70+
71+
Both `repos` and `min-integrity` are required when either is specified.
72+
73+
### `repos`
74+
75+
Specifies which repositories the agent can access through GitHub tools:
76+
77+
- `"all"` — All repositories accessible by the configured token
78+
- `"public"` — Public repositories only
79+
- Array of patterns — Specific repositories and wildcards:
80+
- `"owner/repo"` — Exact repository match
81+
- `"owner/*"` — All repositories under an owner
82+
- `"owner/prefix*"` — Repositories with a name prefix under an owner
83+
84+
Patterns must be lowercase. Wildcards are only permitted at the end of the repository name component.
85+
86+
```yaml wrap
87+
tools:
88+
github:
89+
mode: remote
90+
toolsets: [default]
91+
repos:
92+
- "myorg/*"
93+
- "partner/shared-repo"
94+
- "myorg/api-*"
95+
min-integrity: writer
96+
```
97+
98+
### `min-integrity`
99+
100+
Sets the minimum integrity level required for repository access:
101+
102+
| Level | Description |
103+
|-------|-------------|
104+
| `none` | No integrity requirements |
105+
| `reader` | Read-level integrity |
106+
| `writer` | Write-level integrity |
107+
| `merged` | Merged-level integrity |
108+
109+
### Examples
110+
111+
**Restrict to public repositories only:**
112+
113+
```yaml wrap
114+
tools:
115+
github:
116+
repos: "public"
117+
min-integrity: none
118+
```
119+
120+
**Restrict to repositories in multiple organizations:**
121+
122+
```yaml wrap
123+
tools:
124+
github:
125+
mode: remote
126+
toolsets: [repos, issues]
127+
repos:
128+
- "frontend-org/*"
129+
- "backend-org/*"
130+
min-integrity: writer
131+
```
132+
58133
## Lockdown Mode for Public Repositories
59134

60135
Lockdown Mode is a security feature that filters public repository content to only show issues, PRs, and comments from users with push access. Automatically enabled for public repositories when using custom tokens. See [Lockdown Mode](/gh-aw/reference/lockdown-mode/) for complete documentation.

0 commit comments

Comments
 (0)