Repository navigation
feat: make the record key optional for GitHub OIDC - #164
Merged
Merged
Conversation
The key input was already optional and is passed to `currents cache get/set` only when set. Document that a job with `id-token: write` and no key lets the CLI use GitHub OIDC. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011baD3hG81A9qbFYrSn1ysE
|
| Topic | Details | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| OIDC Cache Flow | Route cache get and set operations through withCredentials, passing CURRENTS_PROJECT_ID, CURRENTS_RECORD_KEY, and CURRENTS_OIDC_AUDIENCE via the child process environment so OIDC can resolve credentials without exposing keys in command arguments. Persist the project and audience state across the action lifecycle and mask explicitly configured keys.Modified files (4)
Latest Contributors(2)
| |||||||||
| Other | Other filesModified files (1)
Latest Contributors(2)
| |||||||||
| Action Configuration | Expose OIDC configuration in the action contract and explain GitHub permissions, externally supplied tokens, audience overrides, project requirements, credential precedence, and the distinction between cache and API modes.Modified files (2)
Latest Contributors(2)
| |||||||||
| Credential Tests | Verify that credential environment construction sets supplied values and preserves existing job-level values when inputs are empty, protecting the fallback and precedence behavior introduced for OIDC support.Modified files (1)
Latest Contributors(2)
|
Merger ✅ Ready to Merge
MERGE: the diff implements optional record keys for GitHub OIDC and CI checks passed; no discussions require further work.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011baD3hG81A9qbFYrSn1ysE
A record key from OIDC is issued for one project. The action read the project-id input but never gave it to `currents cache get/set`, which read only CURRENTS_PROJECT_ID. Set that variable for both commands. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011baD3hG81A9qbFYrSn1ysE
The key input was put on the command line, which @actions/exec prints before it runs the command, and the key was never registered with core.setSecret. A key an earlier step produced without add-mask showed up in the log. Register the key in the main and post steps and pass it as CURRENTS_RECORD_KEY. The post step reads the input instead of the key saved as step state. The README no longer calls the key issued by OIDC project-scoped: the project ID selects the organization whose trust policy is checked. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011baD3hG81A9qbFYrSn1ysE
Contributor
Author
|
@baz review |
The audience of the OIDC token is a fixed name, not the origin of the Currents URL. Staging and on-prem Currents use their own value. The input is passed to the CLI as CURRENTS_OIDC_AUDIENCE in the main and post steps. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011baD3hG81A9qbFYrSn1ysE
agoldis
marked this pull request as ready for review
November 15, 2026 21:47
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.
Owner: @agoldis
Linear: project P-ENG-132 (OIDC record keys for CI)
What
keyinput was alreadyrequired: false, and the action already passes--keytocurrents cache get/setonly when it is set.project-idinput but never gave it to the CLI in cache mode. It now setsCURRENTS_PROJECT_IDforcache getandcache setwhen the input is set; aCURRENTS_PROJECT_IDalready in the job env is kept otherwise.oidc-audienceinput, passed to the CLI asCURRENTS_OIDC_AUDIENCE. The CLI default iscurrents:record-key; staging and on-prem use their own value.action.ymland README:keyis optional;project-idis required when the record key comes from OIDC.permissions: id-token: writeand no key lets the CLI exchange the GitHub OIDC token.CURRENTS_OIDC_TOKENpasses a token yourself. A configured key always wins.Not ready to merge
Draft until the
@currents/cmdrelease with OIDC support is published (currents-reporter PR #511). The README says "TODO: version"; fill it in then. The CLI side ofCURRENTS_PROJECT_IDfor the OIDC exchange is not in that PR yet.Checks
npm run lint,npm test(42 passed) andnpm run packagepass;dist/is rebuilt.🤖 Generated with Claude Code
https://claude.ai/code/session_011baD3hG81A9qbFYrSn1ysE