Refine Actions secret encryption path in nacl/box usage#35496
Merged
Conversation
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Review golang.org/x/crypto module for security and updates
Refine Actions secret encryption path in May 28, 2026
nacl/box usage
Contributor
There was a problem hiding this comment.
Pull request overview
Small cleanups in the Actions secret encryption code path: a redundant key-copy is removed in the production helper, and a hardcoded ciphertext-size magic number in tests is replaced with the upstream nacl/box constant. The remaining file changes are regenerated workflow lock files (linguist-generated artifacts) reflecting compiler/output updates unrelated to the encryption refactor.
Changes:
- Convert decoded public-key bytes directly to
*[32]bytevia slice-to-array-pointer conversion inencryptWithPublicKey, avoiding a temporary array andcopy. - Replace hardcoded
64minimum base64 ciphertext length inTestEncryptWithPublicKeyEmptyPlaintextwithbase64.StdEncoding.EncodedLen(box.AnonymousOverhead). - Regenerated
.github/workflows/*.lock.ymlartifacts (new experiment outputs, AWF version bumps, setup action layout changes).
Show a summary per file
| File | Description |
|---|---|
| pkg/cli/secret_set_command.go | Removes redundant 32-byte copy; uses slice-to-array-pointer cast for box.SealAnonymous. |
| pkg/cli/secret_set_command_test.go | Replaces magic 64 with base64.StdEncoding.EncodedLen(box.AnonymousOverhead). |
| .github/workflows/daily-byok-ollama-test.lock.yml | Regenerated: schema v4, AWF 0.25.56, inline ./actions/setup, model-multiplier step, etc. |
| .github/workflows/*.lock.yml (many) | Regenerated artifacts adding individual pick-experiment outputs. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 27/27 changed files
- Comments generated: 0
This was referenced May 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gh-awusesgolang.org/x/cryptoonly for repository secret encryption, and this issue called for two low-risk cleanups: remove an unnecessary key copy in production code and replace a test magic number withbox’s exported overhead constant.Production: eliminate redundant public-key copy
encryptWithPublicKeyto convert the validated decoded key bytes directly to*[32]byteforbox.SealAnonymous, instead of copying into a temporary array.Tests: remove hardcoded ciphertext-size expectation
base64.StdEncoding.EncodedLen(box.AnonymousOverhead).nacl/boxconstants.