Problem
When min-integrity: approved is explicitly set in the workflow source:
tools:
github:
toolsets: [pull_requests, repos]
min-integrity: approved
The compiler (v0.62.2, v0.69.3) generates a static guard policy in the lock file:
"guard-policies": {
"allow-only": {
"min-integrity": "approved"
}
}
The MCP Gateway (v0.1.19) rejects this with:
MCPG Error: failed to create unified server: failed to register guard for server "github":
invalid server guard policy: invalid guard policy JSON: allow-only must include repos
The gateway requires both min-integrity AND repos in an allow-only policy block. The compiler does not populate repos when min-integrity is hardcoded.
Workaround
Omit min-integrity from the source. The runtime determine-automatic-lockdown step correctly sets both min-integrity and repos via env vars:
"guard-policies": {
"allow-only": {
"min-integrity": "$GITHUB_MCP_GUARD_MIN_INTEGRITY",
"repos": "$GITHUB_MCP_GUARD_REPOS"
}
}
Expected
The compiler should either:
- Also emit
repos when min-integrity is hardcoded (e.g., repos: ["${{ github.repository }}"])
- Or document that
min-integrity in source is not supported and should be left to runtime lockdown
Discovered in
Problem
When
min-integrity: approvedis explicitly set in the workflow source:The compiler (v0.62.2, v0.69.3) generates a static guard policy in the lock file:
The MCP Gateway (v0.1.19) rejects this with:
The gateway requires both
min-integrityANDreposin anallow-onlypolicy block. The compiler does not populatereposwhenmin-integrityis hardcoded.Workaround
Omit
min-integrityfrom the source. The runtimedetermine-automatic-lockdownstep correctly sets bothmin-integrityandreposvia env vars:Expected
The compiler should either:
reposwhenmin-integrityis hardcoded (e.g.,repos: ["${{ github.repository }}"])min-integrityin source is not supported and should be left to runtime lockdownDiscovered in
/reviewwas broken on main)