Commit 4e77ef8
authored
fix(guard): correct backend enrichment tool names and args (#2340)
## Problem
Backend enrichment calls in the GitHub guard's `backend.rs` used
incorrect tool names and missing parameters, causing all enrichment to
silently fail:
1. **PR enrichment** called `get_pull_request` — not a registered MCP
tool (should be `pull_request_read`)
2. **PR enrichment** used `pull_number` arg — should be `pullNumber` and
include `method: "get"`
3. **Issue enrichment** called `issue_read` without `method: "get"`
parameter
This meant `author_login` was never fetched from the backend, so trusted
bot detection (`github-actions[bot]`, `dependabot[bot]`, etc.) never ran
for resource-level labels in `tool_rules`. Bot-authored PRs and issues
defaulted to `none` integrity and were incorrectly filtered.
## Fix
- Change PR enrichment tool: `"get_pull_request"` →
`"pull_request_read"`
- Fix PR enrichment args: `pull_number` → `pullNumber`, add `method:
"get"`
- Fix issue enrichment args: add `method: "get"`
## Validation
Discovered via repo-assist run
[23412180702](https://github.com/github/gh-aw-mcpg/actions/runs/23412180702)
(v0.1.25) which showed 4 DIFC-FILTERED events for `github-actions[bot]`
authored items.
### Note
`repo-assist.lock.yml` uses `:local` container build (inherited from
main). Will revert after validation.1 file changed
Lines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
| 217 | + | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
| 236 | + | |
| 237 | + | |
237 | 238 | | |
238 | 239 | | |
239 | 240 | | |
| |||
244 | 245 | | |
245 | 246 | | |
246 | 247 | | |
247 | | - | |
| 248 | + | |
248 | 249 | | |
249 | 250 | | |
250 | 251 | | |
| |||
294 | 295 | | |
295 | 296 | | |
296 | 297 | | |
297 | | - | |
| 298 | + | |
| 299 | + | |
298 | 300 | | |
299 | 301 | | |
300 | 302 | | |
301 | 303 | | |
302 | 304 | | |
303 | | - | |
| 305 | + | |
304 | 306 | | |
305 | 307 | | |
306 | 308 | | |
| |||
370 | 372 | | |
371 | 373 | | |
372 | 374 | | |
| 375 | + | |
373 | 376 | | |
374 | 377 | | |
375 | 378 | | |
| |||
419 | 422 | | |
420 | 423 | | |
421 | 424 | | |
| 425 | + | |
422 | 426 | | |
423 | 427 | | |
424 | 428 | | |
| |||
0 commit comments