[bug-hunter] Copilot SDK no-sandbox mention workflows block `read` tool in runtime allowlist

Abierto Apto para principiantes
#2,514 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
78/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
github, github-actions, python
Área
devops, tooling

Línea de trabajo

Empieza leyendo los archivos de workflow generados .github/workflows/gh-aw-mention-in-issue-no-sandbox.lock.yml y .github/workflows/gh-aw-mention-in-pr-no-sandbox.lock.yml; luego compara GH_AW_COPILOT_SDK_TOOL_CONFIG.permissions.allowedTools con los argumentos --allow-tool del SDK. Ejecuta el script de reproducción del issue para confirmar la discrepancia. El trabajo está terminado cuando read está presente en ambas listas de permitidos y el script se ejecuta correctamente.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Impact

gh-aw-mention-in-issue-no-sandbox and gh-aw-mention-in-pr-no-sandbox advertise read as an allowed tool, but their generated Copilot SDK server args do not permit read. In SDK mode, this can block agents from reading repository files, causing degraded or failed analysis/fix behavior in user-triggered mention workflows.

Reproduction Steps

  1. Run the following script from repo root:
import json
import pathlib
import re
import sys

WORKFLOWS = [
    ".github/workflows/gh-aw-mention-in-issue-no-sandbox.lock.yml",
    ".github/workflows/gh-aw-mention-in-pr-no-sandbox.lock.yml",
]

mismatches = []
for path in WORKFLOWS:
    text = pathlib.Path(path).read_text()
    server_args = json.loads(re.search(r"GH_AW_COPILOT_SDK_SERVER_ARGS: '([^']+)'", text).group(1))
    tool_cfg = json.loads(re.search(r"GH_AW_COPILOT_SDK_TOOL_CONFIG: '([^']+)'", text).group(1))

    allowlist = [server_args[i + 1] for i, tok in enumerate(server_args[:-1]) if tok == "--allow-tool"]
    cfg_tools = tool_cfg["permissions"]["allowedTools"]

    print(f"{path}")
    print(f"  read in allowedTools config : {'read' in cfg_tools}")
    print(f"  read in --allow-tool args   : {'read' in allowlist}")

    if "read" in cfg_tools and "read" not in allowlist:
        mismatches.append(path)

if mismatches:
    print("\nFAIL: 'read' is configured but blocked by SDK server allowlist in:")
    for path in mismatches:
        print(f"- {path}")
    sys.exit(1)

print("\nPASS")
  1. Execute with python /tmp/gh-aw/agent/repro_read_tool_mismatch.py (or inline via python - <<'PY' ... PY).

Expected vs Actual

Expected: If read appears in GH_AW_COPILOT_SDK_TOOL_CONFIG.permissions.allowedTools, it should also be present in SDK --allow-tool args.

Actual: Script exits non-zero and reports mismatch:

.github/workflows/gh-aw-mention-in-issue-no-sandbox.lock.yml
  read in allowedTools config : True
  read in --allow-tool args   : False
.github/workflows/gh-aw-mention-in-pr-no-sandbox.lock.yml
  read in allowedTools config : True
  read in --allow-tool args   : False

FAIL: 'read' is configured but blocked by SDK server allowlist in:
- .github/workflows/gh-aw-mention-in-issue-no-sandbox.lock.yml
- .github/workflows/gh-aw-mention-in-pr-no-sandbox.lock.yml

Failing Test

The script above is a minimal failing test: it deterministically exits with code 1 when a workflow claims read in tool config but omits it from SDK runtime allowlist.

Evidence

  • .github/workflows/gh-aw-mention-in-issue-no-sandbox.md:21 enables copilot-sdk: true.
  • .github/workflows/gh-aw-mention-in-pr-no-sandbox.md:28 enables copilot-sdk: true.
  • .github/workflows/gh-aw-mention-in-issue-no-sandbox.lock.yml:1692-1693 has allowedTools containing read, but GH_AW_COPILOT_SDK_SERVER_ARGS omits --allow-tool read.
  • .github/workflows/gh-aw-mention-in-pr-no-sandbox.lock.yml:2240-2241 shows the same mismatch.

What is this? | From workflow: Trigger Bug Hunter

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

  • expires on Nov 23, 2026, 11:23 AM UTC
Lenguaje dominante
Python
Estrellas
13
Forks
16
Merge medio
45 min
PR fusionados (30 d)
1

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de elastic/ai-github-actions

Todos los issues de elastic/ai-github-actions

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.