Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a token management system for GitHub Agentic Workflows, adding a new CLI command to help users bootstrap and validate their GitHub token secrets, along with an internal helper tool for programmatic secret management.
Key changes:
- New
gh aw tokens bootstrapcommand that inspects repository secrets and provides guidance on missing tokens - Internal
ghsecrettool that sets GitHub Actions repository secrets using NaCl encryption - Enhanced documentation with security best practices and least-privilege guidance
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/cli/tokens.go | New parent command for token-related utilities |
| pkg/cli/tokens_bootstrap.go | New bootstrap subcommand that checks and suggests token setup (missing cobra import) |
| internal/tools/ghsecret/main.go | Internal tool for setting repository secrets via GitHub API with NaCl encryption |
| go.mod | Added golang.org/x/crypto v0.36.0 dependency for NaCl encryption support |
| go.sum | Updated checksums for new crypto dependency |
| docs/src/content/docs/reference/tokens.md | Added quick start guide and security best practices for token configuration |
| cmd/gh-aw/main.go | Integrated new tokens command into CLI with setup group assignment |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b092a4d to
10c2185
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot fix lint issues |
|
@pelikhan: This PR attempts to tackle the user pain of figuring out the right GitHub token and permissions setup by standardizing how gh‑aw uses |
pelikhan
left a comment
There was a problem hiding this comment.
- must work properly from a codespace with underprivileged token (graceful failure )
|
Why a separate tool? We typically have sub comments instead. |
|
Aside from comments this is really good. Configuring tokens is the #1 source of friction. I would like to see the token validation flow merged into the "init" command (init --tokens) and also the install.md should be smart about it. |
Secret helper and tokens bootstrap command
gh aw secret setcommand that sets GitHub Actions repository secrets via the public‑key REST API using NaCl sealed‑box encryption, with no external secret helper dependencies.golang.org/x/cryptotogo.mod/go.sumto support NaCl sealed‑box encryption.permissions:usage.gh aw tokens bootstrapcommand that inspects the current repo’s secrets via the GitHub CLI and prints which recommended gh‑aw token secrets are missing, when they’re needed, suggested scopes, andgh aw secret setcommands to add them. The command is read‑only and does not create tokens or secrets itself.