Commit 2252fde
Fix Copilot CLI --secret-env-vars to expose the real env var names
The workflow exports the secret to the step env as COPILOT_GITHUB_TOKEN
(line 97) and GH_TOKEN (line 100), but `--secret-env-vars` was set to
`COPILOT_CLI_PAT` — which is the *secret* name, not the env var name.
As a result, neither token was forwarded to the Copilot CLI sub-shells.
Observed effect on PR #1568:
- The agent could not call `gh api .../dependabot/alerts` (rule 1 of
the prompt), so it fell back to `npm audit` as the source of truth.
- The PR body explicitly says: "COPILOT_GITHUB_TOKEN was not available
in this environment, so npm audit was used as the vulnerability
source of truth".
Fix: pass the actual env var names (`COPILOT_GITHUB_TOKEN,GH_TOKEN`) to
`--secret-env-vars` so they are exposed to tool invocations and
redacted from logs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 081400a commit 2252fde
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
| 230 | + | |
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| |||
0 commit comments