Skip to content

GH_AW_CI_TRIGGER_TOKEN still emitted in compiled lock file even when PAT is no longer required #62045

Description

@theletterf

Summary

Since the June 2026 change (agentic workflows no longer need a PAT), workflows using copilot-requests: write can trigger CI on PRs without a Personal Access Token.

However, gh aw compile still emits GH_AW_CI_TRIGGER_TOKEN in the compiled .lock.yml — both in the manifest header and as an env var passed to the process_safe_outputs.cjs step — even when the secret is not set on the repo and copilot-requests: write is present.

Steps to reproduce

  1. Have a workflow with create-pull-request safe output and copilot-requests: write permission.
  2. Do not set GH_AW_CI_TRIGGER_TOKEN on the repo.
  3. Run gh aw compile.
  4. Observe that the compiled .lock.yml still contains GH_AW_CI_TRIGGER_TOKEN in the manifest and in the Process Safe Outputs step env.

Expected behavior

When copilot-requests: write is present and no GH_AW_CI_TRIGGER_TOKEN is configured, the compiler should either:

  • Omit GH_AW_CI_TRIGGER_TOKEN from the manifest and compiled steps entirely, or
  • Add a compile-time notice that the magic secret is no longer necessary.

Why it matters

Organizations following the security guidance to remove GH_AW_CI_TRIGGER_TOKEN (e.g. after the token-leak fix in v0.85.4) will still see the secret listed in their compiled lock file, creating confusion about whether the token is still needed and whether it should be rotated.

Workaround

Delete the secret from the repo. The reference in the lock file resolves to empty string at runtime and gh-aw falls back to the org-billed path. But the lock file still looks like it expects the token.

Environment

  • gh aw version: v0.88.7
  • Affected repos (elastic org): docs-actions, elastic-docs-skills, elastic-docs-skills-internal, integration-docs, terraform-provider-elasticstack

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions