You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/firewall-issue-dispatcher.md
+6-8Lines changed: 6 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,23 +65,21 @@ gh api graphql -f query='
65
65
66
66
## Step 2: Filter Locally
67
67
68
-
From the response, filter out issues where **any comment** contains `github.com/github/gh-aw-firewall/issues/`. These are already audited. Do this filtering in your analysis — do NOT make additional API calls.
68
+
For each issue found, read its comments and check whether any comment contains a reference to a `github/gh-aw-firewall` issue (i.e., a URL matching `https://github.com/github/gh-aw-firewall/issues/` or a GitHub cross-repo reference matching `github/gh-aw-firewall#`). If such a comment exists, **skip** that issue — it has already been audited.
69
69
70
70
If no unprocessed issues remain, call `noop` and stop.
71
71
72
72
## Step 3: Create Tracking Issues
73
73
74
74
For each **unprocessed** issue:
75
75
76
-
1.**Create a tracking issue in `github/gh-aw-firewall`** with:
where `{NUMBER}` is replaced with **only the numeric issue number** (e.g., `1896`). Do NOT include the repository name, hash symbols, or any other text — just the number in the URL path. Use the `add_comment` safe output tool with `repo: "github/gh-aw"` and the original issue number.
## `COPILOT_GITHUB_TOKEN` and Classic PAT Compatibility
92
+
93
+
When `COPILOT_GITHUB_TOKEN` is set in the host environment, AWF injects it into the agent container so the Copilot CLI can authenticate against the GitHub Copilot API.
94
+
95
+
### ⚠️ Classic PAT + `COPILOT_MODEL` Incompatibility (Copilot CLI 1.0.21+)
96
+
97
+
Copilot CLI 1.0.21 introduced a startup model validation step: when `COPILOT_MODEL` is set, the CLI calls `GET /models` before executing any task. **This endpoint does not accept classic PATs** (`ghp_*` tokens), causing the agent to fail at startup with exit code 1 — before any useful work begins.
98
+
99
+
**Affected combination:**
100
+
-`COPILOT_GITHUB_TOKEN` is a classic PAT (prefixed with `ghp_`)
101
+
-`COPILOT_MODEL` is set in the agent environment (e.g., via `--env COPILOT_MODEL=...`, `--env-file`, or `--env-all`)
102
+
103
+
**Unaffected:** Workflows that do not set `COPILOT_MODEL` are not affected — the `/models` validation is only triggered when `COPILOT_MODEL` is set.
104
+
105
+
**AWF detects this combination at startup** and emits a `[WARN]` message:
106
+
```
107
+
⚠️ COPILOT_MODEL is set with a classic PAT (ghp_* token)
108
+
Copilot CLI 1.0.21+ validates COPILOT_MODEL via GET /models at startup.
109
+
Classic PATs are rejected by this endpoint — the agent will likely fail with exit code 1.
110
+
Use a fine-grained PAT or OAuth token, or unset COPILOT_MODEL to skip model validation.
111
+
```
112
+
113
+
**Remediation options:**
114
+
1. Replace the classic PAT with a **fine-grained PAT** or **OAuth token** (these are accepted by the `/models` endpoint).
115
+
2. Remove `COPILOT_MODEL` from the agent environment to skip model validation entirely.
116
+
91
117
## Internal Environment Variables
92
118
93
119
The following environment variables are set internally by the firewall and used by container scripts:
0 commit comments