diff --git a/.github/workflows/ai-issue-assistant.lock.yml b/.github/workflows/ai-issue-assistant.lock.yml index ac9b3d033..545eb3a20 100644 --- a/.github/workflows/ai-issue-assistant.lock.yml +++ b/.github/workflows/ai-issue-assistant.lock.yml @@ -1,4 +1,4 @@ -# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"430aeca0d088d4c132603416f8225f1978fda4403dbe180b069a769fb92cbecc","body_hash":"d158e55473e414173650e0175d9163a456f8ce1e7ba7cbb364a7b69902136670","compiler_version":"v0.82.14","strict":true,"agent_id":"codex","agent_model":"${{ secrets.OPENAI_MODEL }}","engine_versions":{"codex":"0.144.6"}} +# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"c699fef053b5381c95d3b54cbe6d6206148dec7d5f18657d82c859e8b8409ca8","body_hash":"f2b324f9180dcb9aee615c4d657a534e75e37ac0d87361159283bd31c8c21bff","compiler_version":"v0.82.14","strict":true,"agent_id":"codex","agent_model":"${{ secrets.OPENAI_MODEL }}","engine_versions":{"codex":"0.144.6"}} # gh-aw-manifest: {"version":1,"secrets":["CODEX_API_KEY","COPILOT_GITHUB_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN","OPENAI_API_KEY","OPENAI_MODEL"],"actions":[{"repo":"actions/cache/restore","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/cache/save","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/checkout","sha":"9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0","version":"v7.0.0"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"820762786026740c76f36085b0efc47a31fe5020","version":"v7.0.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"b6d1443e05b8716267fa19425b99aa4f12006b4a","version":"v0.82.14"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.27.37","digest":"sha256:0d35e8682845f183c1c634699a8e8a6cbe2c271b867031410df74533243c5f67","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.27.37@sha256:0d35e8682845f183c1c634699a8e8a6cbe2c271b867031410df74533243c5f67"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.37","digest":"sha256:fc2970aadaeae05993e76697d29f03dc8bfb9248ff87a8f3d8b0975485a4b317","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.37@sha256:fc2970aadaeae05993e76697d29f03dc8bfb9248ff87a8f3d8b0975485a4b317"},{"image":"ghcr.io/github/gh-aw-firewall/cli-proxy:0.27.37","digest":"sha256:1d5300d9b08e1c4f2ad1830860656a0656383a83280058f17e805a7c3ecda203","pinned_image":"ghcr.io/github/gh-aw-firewall/cli-proxy:0.27.37@sha256:1d5300d9b08e1c4f2ad1830860656a0656383a83280058f17e805a7c3ecda203"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.27.37","digest":"sha256:5abc51995e5901c5d1daeefc957301ee409980e2e607391ec22c06cb2513327b","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.27.37@sha256:5abc51995e5901c5d1daeefc957301ee409980e2e607391ec22c06cb2513327b"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.4.1","digest":"sha256:ad2a979c2cd8b50098e84938ca9c9c1580eb8e91526f101a90adfba7859b2c32","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.4.1@sha256:ad2a979c2cd8b50098e84938ca9c9c1580eb8e91526f101a90adfba7859b2c32"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:529d02eb970b1161aa25c593a9c3df57fdfad5a8add328cb3b6eccef66f3183b","pinned_image":"ghcr.io/github/gh-aw-node@sha256:529d02eb970b1161aa25c593a9c3df57fdfad5a8add328cb3b6eccef66f3183b"},{"image":"ghcr.io/github/github-mcp-server:v1.6.0","digest":"sha256:2b0c48b070f61e9d3969269ead600f62d00fb237b60ac849ef3d166ee7de9ad3","pinned_image":"ghcr.io/github/github-mcp-server:v1.6.0@sha256:2b0c48b070f61e9d3969269ead600f62d00fb237b60ac849ef3d166ee7de9ad3"}]} # This file was automatically generated by gh-aw (v0.82.14). DO NOT EDIT. To debug this workflow, load the skill at https://github.com/github/gh-aw/blob/main/debug.md # @@ -664,6 +664,7 @@ jobs: export DEBUG="*" export GH_AW_ENGINE="codex" + export GH_AW_MCP_CLI_SERVERS='["safeoutputs"]' MCP_GATEWAY_UID=$(id -u 2>/dev/null || echo '0') MCP_GATEWAY_GID=$(id -g 2>/dev/null || echo '0') source "${RUNNER_TEMP}/gh-aw/actions/resolve_docker_socket_gid.sh" diff --git a/.github/workflows/ai-issue-assistant.md b/.github/workflows/ai-issue-assistant.md index 04472e7f6..a4dbf0f09 100644 --- a/.github/workflows/ai-issue-assistant.md +++ b/.github/workflows/ai-issue-assistant.md @@ -24,6 +24,9 @@ network: - github - sub.1024x.ai tools: + # Keep Safe Outputs on the generated CLI proxy instead of the internal HTTP + # MCP endpoint, which can be misreported as blocked egress by the firewall. + cli-proxy: true github: mode: gh-proxy toolsets: [issues, repos, labels] @@ -77,7 +80,8 @@ Follow one bounded loop: observe, classify, act, verify, then stop. shell command. 2. Use this idempotency marker for this event: ``. - If a comment already contains that exact marker, call `noop` and stop. + If a comment already contains that exact marker, or the generated gh-aw + footer identifies this workflow and run ID, call `noop` and stop. 3. Identify the matching Issue form from its rendered headings. Check only fields marked required by that form. Do not invent missing environment, reproduction, expected behavior, logs, edition, or ownership facts. @@ -86,8 +90,12 @@ Follow one bounded loop: observe, classify, act, verify, then stop. fields, and give the smallest next step that would let a maintainer proceed. If the form is complete, summarize the understood next step without promising acceptance, priority, assignment, delivery, or a release date. -5. End the response with the idempotency marker and emit exactly one - `add_comment` safe output. +5. End the response with the exact idempotency marker, confirm it is present in + the final body, and emit exactly one `add_comment` safe output. Pass the + complete comment as a JSON object on stdin with the `.` sentinel. Use a + single-quoted heredoc so Markdown backticks, dollar signs, backslashes, and + newlines are data rather than shell syntax. Never pass public Markdown via a + `--body` shell argument. 6. Optionally emit one `add_labels` safe output, with at most two labels, only when current Issue fields directly support them. Edition labels map only from the explicit edition field. Use `needs/info` only for missing required @@ -106,6 +114,18 @@ The public comment must be concise GitHub-flavored Markdown: Use only `add_comment`, optional `add_labels`, or `noop`. After emitting the required safe output or outputs, stop. Do not narrate private reasoning. +For `add_comment`, use this schema-derived CLI shape with valid JSON and JSON +newline escapes. Replace the example values, but keep the stdin boundary: + +```bash +safeoutputs add_comment . <<'CHAT2DB_SAFE_OUTPUT_JSON' +{"item_number": 123, "body": "First paragraph with `code`.\n\n"} +CHAT2DB_SAFE_OUTPUT_JSON +``` + +Do not use `safeoutputs add_comment --body ...`, command substitution, an +unquoted heredoc, or shell interpolation for the comment body. + ## Constraints - Do not close, reopen, edit, delete, assign, lock, transfer, or claim an Issue.