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
{{ message }}
Repository navigation
[plan] Document secret size limits in CLI help #6399
Add documentation about secret size limits to the gh aw secret set command help text.
Context
NaCl sealed boxes are designed for small messages (recommended max 16KB). GitHub Actions API likely has its own limits. Users should be informed about these constraints when setting secrets.
Approach
In pkg/cli/secret_set_command.go, update the command description to include size limit information:
Short: "Set an Actions secret for a workflow",
Long: `Set an Actions secret for a workflow.The secret value is encrypted using NaCl sealed box encryption before beingsent to GitHub's API. This ensures the secret is encrypted locally and canonly be decrypted by GitHub.Note: Secrets should be reasonably sized (recommended maximum: 64KB). Verylarge secrets may be rejected by GitHub's API or cause performance issues.`,
Additionally, consider adding validation in the encryptWithPublicKey or runSecretSet function to warn or error if the plaintext exceeds a reasonable size (e.g., 64KB):
constmaxSecretSize=64*1024// 64KBiflen(plaintext) >maxSecretSize {
return"", fmt.Errorf("secret value too large (%d bytes), maximum recommended size is %d bytes",
len(plaintext), maxSecretSize)
}
Files to Modify
pkg/cli/secret_set_command.go
Acceptance Criteria
Command help text mentions secret size considerations
Activity