cli/pkg/cmd/attestation/verify
William Martin c51769c977 Record agentic invocations in User-Agent header
Detect which AI coding agent is invoking gh by checking well-known
environment variables and include the agent name in the User-Agent
header sent to GitHub APIs.

Supported agents: Codex, Gemini CLI, Copilot CLI, OpenCode,
Claude Code, and Amp. Generic AI_AGENT env var is also supported
with validation to prevent header injection.

Fixes github/cli#1111

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 19:58:37 +01:00
..
attestation.go add initiator_type for attestations 2025-09-23 10:59:07 -04:00
attestation_integration_test.go add missing http client field in sigstoreConfig 2025-05-07 17:11:18 -06:00
attestation_test.go move filterAttestations function 2025-04-03 11:02:45 -06:00
options.go reorganize getAttestations func to check for remote gh api fetching first 2025-03-24 17:28:50 -06:00
options_test.go Revert "temporarily skip non-failing tests" 2025-04-09 07:23:17 -06:00
policy.go Tweaked language a bit, improved error message. 2025-03-27 09:47:11 -04:00
policy_test.go Revert "temporarily skip non-failing tests" 2025-04-09 07:23:17 -06:00
verify.go alphabetize fields 2025-05-07 16:43:28 -06:00
verify_integration_test.go Record agentic invocations in User-Agent header 2026-03-24 19:58:37 +01:00
verify_test.go Revert "temporarily skip non-failing tests" 2025-04-09 07:23:17 -06:00