Repository navigation
feat: add export-token mode that exchanges the token natively in the action - #4
Merged
Merged
Conversation
…action With `export-token: true`, the action performs the STS bot token exchange itself (via the proxy-aware @actions/http-client) and exposes the access token as the masked `token` step output plus an `expires-at` output, so jobs without shishoctl installed can authenticate to Shisho Cloud. Without the input, the shishoctl sign-in behavior is unchanged. Also bumps the runtime node16 -> node20 (node16 is EOL and runners already force node20, so this changes nothing in practice) and refreshes the CI workflows (node 20, checkout/setup-node v4, upload-artifact v4 — v3 has been disabled by GitHub), adding a clean-machine job that runs export-token mode without shishoctl present. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…docs site Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
pizzacat83
approved these changes
Jul 30, 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.
Context
The cicd-sensor keyless-onboarding design (shisho-security monorepo,
backend/services/teibo/cmd/runner/docs/architecture/cicd-sensor-integration/) specifies this action as the auth shim for customer CI jobs that need a short-lived Shisho Cloud access token but do not have shishoctl installed:export-token: trueperforms the STS bot-token exchange natively in the action and exposes the token as a masked step output. Today the action only signs in via a pre-installed shishoctl, which is unnecessary friction for consumers that just need the raw token (the cicd-sensor agent, curl, other tools).Design decisions:
export-token: truethe action performs the exchange itself —POST /bots/exchangewith{bot_id, id_token, expires_in}— via@actions/http-client(proxy-aware, honorsHTTPS_PROXYon enterprise self-hosted runners; already a transitive dependency). shishoctl is neither required nor configured in this mode.token(the bare access token, masked viacore.setSecretbefore being set) andexpires-at(RFC 3339 UTC). The token is bare by design — consumers that need a product-specific prefix (e.g.sk_cs_for the cicd-sensor manager) prepend it themselves.node16→node20: node16 is EOL and GitHub runners already force node16 actions onto node20, so this changes nothing in practice and stays v1-compatible.upload-artifact@v4(v3 has been disabled by GitHub since Jan 2025), plus a new clean-machine job that runs export-token mode without shishoctl installed.Expected outcome
A workflow with
permissions: id-token: writecan run:and use
${{ steps.auth.outputs.token }}in later steps, with the token masked in run logs, on a runner that has never installed shishoctl. Existing workflows withoutexport-tokenbehave exactly as before.Summary
src/sts.ts(new): the STS exchange — request/response wire shapes, 400{message}surfacing, non-200 and malformed-response handlingsrc/main.ts:export-tokenbranch (validateexpires-in-minutes, exchange, mask, set outputs); shishoctl path unchangedaction.yml: new input + declared outputs,node20runtimeTest plan
npm run allgreen (tsc, prettier, eslint, ncc package withdist/rebuilt and committed, jest — 8 new tests)dist/index.jsexactly as the runner invokes it (stub OIDC endpoint + stub STS,INPUT_*env,GITHUB_OUTPUTfile): verified the exchange body{bot_id, id_token, expires_in: 21600}, the::add-mask::, and both outputsexport-token, the action still reaches the unchanged shishoctl invocation (ENOENT message with install instructions when shishoctl is absent)build-test(incl. the new no-shishoctl job) andcheck-distpassshisho-security/shisho-cloud-action-test-runnertest-sts.ymlRelease note
After merge: tag
v1.1.0and move thev1tag — the documented onboarding pins@v1.🤖 Generated with Claude Code