Environment variables

This reference covers the process environment registry and external environment reads. The documentation check combines procenv.Registry with source reads, including injected os.Getenv calls and environment slices. Registry entries include emitted runtime values, inherited tool settings and rejected transports. A variable remains documented while either owner uses or classifies it.

Kinds:

  • configuration: an operator or user sets it. Each has a flag or config equivalent where one exists, and its page says which wins.
  • runtime: Sparkwing sets it in the environment of pipeline code or a job process; pipeline code may read it, and setting it by hand is not supported.
  • plumbing: an internal process input. Some entries still belong to execution paths being replaced by the rewrite. Do not set them.
  • test: only the test suites set it.
  • other tools: a name another tool defines, which Sparkwing reads as that tool documents it.
  • undecided: an operator knob without a page yet; each one waits on a decision to document it or remove it.

The services (sparkwing-controller and sparkwing-runner) read their settings from flags and their secrets from the files in --credentials-dir, so no service configuration appears here.

Configuration: the sparkwing CLI and local runsSection anchor link

Configuration: release toolingSection anchor link

VariableDescribed in
SPARKWING_RELEASE_SIGNING_KEYsecurity

Controller administrationSection anchor link

sparkwing-controller admin takes no store flags. It reads the deployment record the serving controller writes to $SPARKWING_HOME/deployment.json, so it must run with the controller's SPARKWING_HOME, which kubectl exec into the controller pod provides. See auth.

RuntimeSection anchor link

The job protocol supplies runtime identity. These names also have consumers in Sparkwing code. See node protocol.

VariableDescribed in
SPARKWING_JOB_IDnode protocol
SPARKWING_RUN_IDarchitecture
SPARKWING_GATE_INDEXhooks
SPARKWING_DEVELOPMENT_BUILDversioning

TestSection anchor link

VariableWhy it stays
SPARKWING_TESTLEAK_HOSTMarks the re-executed test binary in internal/testleak; it crosses exec, so it cannot be a flag.
SPARKWING_TEST_PG_URLPoints the store test suite at a PostgreSQL database.
SPARKWING_TEST_SHELL_BASHNames the Git Bash that runs a Windows test's fake #!/bin/sh tool; it crosses exec into the stand-in executable, so it cannot be a flag.
SPARKWING_TEST_SHELL_EXEMarks the test binary internal/testshell re-executes as a Windows test's fake tool; it crosses exec, so it cannot be a flag.
SPARKWING_TEST_STORESelects the store backend the store test suite runs against.

Other toolsSection anchor link

VariableDefined by
AWS_ENDPOINT_URLAWS SDK; see deployment-modes
AWS_ENDPOINT_URL_S3AWS SDK; see deployment-modes
GITHUB_REPOSITORYGitHub Actions
KUBERNETES_SERVICE_HOSTKubernetes, in every pod; a runner reports it to the controller, see runner bundle
OTEL_EXPORTER_OTLP_ENDPOINTOpenTelemetry; see observability
OTEL_EXPORTER_OTLP_LOGS_ENDPOINTOpenTelemetry
OTEL_EXPORTER_OTLP_TRACES_ENDPOINTOpenTelemetry
OTEL_SERVICE_NAMEOpenTelemetry
OTEL_TRACES_SAMPLER_ARGOpenTelemetry
GIT_CONFIG_COUNTgit
GIT_INDEX_FILEgit
GIT_SSHgit
GIT_SSH_COMMANDgit
SSH_AUTH_SOCKOpenSSH agent
GOBINGo toolchain
GOMODCACHEGo toolchain
GOPATHGo toolchain
GOPRIVATEGo toolchain
GOPROXYGo toolchain
npm_config_registrynpm; a runner's dependency proxy setting, which a node process receives
GOWORKGo toolchain
PATHthe operating system
SHELLthe operating system
LOCALAPPDATAWindows
XDG_CACHE_HOMEXDG Base Directory specification
XDG_CONFIG_HOMEXDG Base Directory specification
XDG_RUNTIME_DIRXDG Base Directory specification
XDG_DATA_HOMEXDG Base Directory specification; the test sandbox in internal/testleak finds mise's data dir through it
ASDF_CONFIG_FILEasdf; the test sandbox in internal/testleak pins it so shims keep working after it moves HOME
ASDF_DATA_DIRasdf; pinned by the test sandbox the same way
ASDF_DEFAULT_TOOL_VERSIONS_FILENAMEasdf; the test sandbox reads it to find the tool versions it pins as ASDF_<TOOL>_VERSION
CICI providers
CLAUDECODEClaude Code; marks an agent-started run, see cli
CODEX_THREAD_IDCodex CLI; marks an agent-started run
GEMINI_CLIGemini CLI; marks an agent-started run
CLICOLOR_FORCEterminal convention
NO_COLORterminal convention

Process environment policySection anchor link

The registry owns these classifications. A trailing * denotes a name family. Credential and removed-transport rows describe exclusions, not configuration. Process-specific delivery rules come from procenv.Build: local pipeline processes use captured values, remote pipelines use the configured allow list, and Git receives the credential-free base plus proxy and CA settings.

Go toolchain settings (GOPROXY, GOFLAGS, GOPATH, GOPRIVATE, GONOPROXY, GONOSUMDB, GOSUMDB, GOTOOLCHAIN, GOINSECURE) reach pipeline processes on the requester's own machine: from the captured environment for a local run, and from the hosting process's environment when the controller authenticates the claimant as the requester's own host or a personal machine the requester enrolled. Credentials embedded in a GOPROXY entry or the GOSUMDB URL are registered with the masker before any process starts, so logs show *** in their place. A GOPROXY entry or GOSUMDB URL with a path or query is masked whole, because proxies may carry an access token there. Cloud and shared runners drop these settings unless the operator's allow list names them.

A run can submit only its own names through run.submit_env_allow. Intake refuses, and the CLI does not capture, any name the registry above owns other than AWS_REGION, AWS_DEFAULT_REGION, NO_COLOR, CLICOLOR_FORCE and TERM, any SPARKWING_* or Go toolchain name (GOAUTH, GOCACHEPROG, and similar), and any name that loads code into a job or tool, in any case: LD_*, DYLD_*, GIT_*, SSH_*, CGO_*, NODE_*, npm, yarn, pip and other package-manager settings, BASH_ENV, ENV, PYTHONPATH, JAVA_TOOL_OPTIONS, and similar. Submitted names reach a shared runner only when its operator also lists them, never replace a value the host sets itself, and never reach the pipeline compile. Remote builds on a host the run's owner does not own set GOENV=off, so a go env -w file on that host does not change the build.

VariableClassPolicy
SPARKWING_DEBUGDiagnosticSDK diagnostic output selection.
SPARKWING_RUNNER_NAMERuntimeClassComposed from the sealed run and granted runner identity.
SPARKWING_RUNNER_TYPERuntimeClassComposed from the sealed run and granted runner identity.
SPARKWING_RUNNER_LABELSRuntimeClassComposed from the sealed run and granted runner identity.
SPARKWING_DRY_RUNRuntimeClassComposed from the sealed run and granted runner identity.
SPARKWING_BRANCHRuntimeClassComposed from the sealed run and granted runner identity.
SPARKWING_COMMITRuntimeClassComposed from the sealed run and granted runner identity.
SPARKWING_REPORuntimeClassComposed from the sealed run and granted runner identity.
SPARKWING_TRIGGER_SOURCERuntimeClassComposed from the sealed run and granted runner identity.
SPARKWING_ENGINE_VERSIONRuntimeClassVersion of the engine executing the job.
SPARKWING_TOOLCHAIN_ACTIVEProtocolCLI or test marker; no pipeline inheritance.
SPARKWING_TEST_*ProtocolCLI or test marker; no pipeline inheritance.
HOMEToolMinimal process base.
TMPDIRToolMinimal process base.
LANGToolMinimal process base.
LC_*ToolMinimal process base.
TZToolMinimal process base.
USERToolMinimal process base.
SystemRootToolMinimal process base.
ComSpecToolMinimal process base.
PATHEXTToolMinimal process base.
TEMPToolMinimal process base.
TMPToolMinimal process base.
HTTP_PROXYToolRemote network and CA base; mask embedded credentials.
HTTPS_PROXYToolRemote network and CA base; mask embedded credentials.
NO_PROXYToolRemote network and CA base; mask embedded credentials.
http_proxyToolRemote network and CA base; mask embedded credentials.
https_proxyToolRemote network and CA base; mask embedded credentials.
no_proxyToolRemote network and CA base; mask embedded credentials.
NODE_EXTRA_CA_CERTSToolRemote network and CA base; mask embedded credentials.
SSL_CERT_FILEToolRemote network and CA base; mask embedded credentials.
GIT_SSL_CAINFOToolGit CA bundle path; inherited by source acquisition.
GIT_SSL_CAPATHToolGit CA directory; inherited by source acquisition.
NODE_OPTIONSToolJob assignment is always startup environment.
GODEBUGToolJob assignment is always startup environment.
GOMAXPROCSToolJob assignment is always startup environment.
TERMToolTool-owned; remote pipeline delivery requires operator allow-list unless minimal or network base.
TERM_PROGRAMToolTool-owned; remote pipeline delivery requires operator allow-list unless minimal or network base.
MSYSTEMToolTool-owned; remote pipeline delivery requires operator allow-list unless minimal or network base.
GOCACHEToolTool-owned; remote pipeline delivery requires operator allow-list unless minimal or network base.
GOPROXYToolGo toolchain; inherited on the requester's own machine with embedded credentials masked, dropped by Cloud and shared runners unless allow-listed.
GOFLAGSToolGo toolchain; inherited on the requester's own machine with embedded credentials masked, dropped by Cloud and shared runners unless allow-listed.
GOPATHToolGo toolchain; inherited on the requester's own machine with embedded credentials masked, dropped by Cloud and shared runners unless allow-listed.
GOPRIVATEToolGo toolchain; inherited on the requester's own machine with embedded credentials masked, dropped by Cloud and shared runners unless allow-listed.
GONOPROXYToolGo toolchain; inherited on the requester's own machine with embedded credentials masked, dropped by Cloud and shared runners unless allow-listed.
GONOSUMDBToolGo toolchain; inherited on the requester's own machine with embedded credentials masked, dropped by Cloud and shared runners unless allow-listed.
GOSUMDBToolGo toolchain; inherited on the requester's own machine with embedded credentials masked, dropped by Cloud and shared runners unless allow-listed.
GOTOOLCHAINToolGo toolchain; inherited on the requester's own machine with embedded credentials masked, dropped by Cloud and shared runners unless allow-listed.
GOINSECUREToolGo toolchain; inherited on the requester's own machine with embedded credentials masked, dropped by Cloud and shared runners unless allow-listed.
npm_config_cacheToolTool-owned; remote pipeline delivery requires operator allow-list unless minimal or network base.
PIP_INDEX_URLToolTool-owned; remote pipeline delivery requires operator allow-list unless minimal or network base.
PIP_TRUSTED_HOSTToolTool-owned; remote pipeline delivery requires operator allow-list unless minimal or network base.
KUBECONFIGToolTool-owned; remote pipeline delivery requires operator allow-list unless minimal or network base.
OTEL_*ToolTool-owned; remote pipeline delivery requires operator allow-list unless minimal or network base.
AWS_PROFILEToolTool-owned; remote pipeline delivery requires operator allow-list unless minimal or network base.
AWS_REGIONToolTool-owned; remote pipeline delivery requires operator allow-list unless minimal or network base.
AWS_DEFAULT_REGIONToolTool-owned; remote pipeline delivery requires operator allow-list unless minimal or network base.
DOCKER_HOSTToolTool-owned; remote pipeline delivery requires operator allow-list unless minimal or network base.
AWS_ACCESS_KEY_IDCredentialExternal credential; never emitted by Build.
AWS_SECRET_ACCESS_KEYCredentialExternal credential; never emitted by Build.
AWS_SESSION_TOKENCredentialExternal credential; never emitted by Build.
GITHUB_TOKENCredentialExternal credential; never emitted by Build.
GH_TOKENCredentialExternal credential; never emitted by Build.
ACTIONS_ID_TOKEN_REQUEST_TOKENCredentialExternal credential; never emitted by Build.
ACTIONS_ID_TOKEN_REQUEST_URLCredentialExternal credential; never emitted by Build.
SPARKWING_NODE_TOKENCredentialRemoved transport; forbidden in all Build output.
SPARKWING_AGENT_TOKENCredentialRemoved transport; forbidden in all Build output.
SPARKWING_CACHE_GRANTCredentialRemoved transport; forbidden in all Build output.
SPARKWING_SOURCE_TOKENCredentialRemoved transport; forbidden in all Build output.
SPARKWING_API_TOKENCredentialRemoved transport; forbidden in all Build output.
SPARKWING_LEASE_TOKENCredentialRemoved transport; forbidden in all Build output.
SPARKWING_NODE_URLProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_PROTOCOL_HANDLESProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_NODE_CLAIM_*ProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_CONTROLLER_URLProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_NODE_IDProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_WINGD_BINProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_SOURCE_DIRProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_STATE_DBProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_STANDALONE_REASONProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_DEBUG_PAUSE_*ProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_ADMISSION_CLASSProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_WORKERSProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_REPO_*ProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_GITCACHE_URLProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_CACHE_URLProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_PG_URLProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_RERUNProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_RERUN_REFS_DIRProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_CONFIG_ENVProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_FLEET_CONFIGProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_PROFILESProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_REPOSProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_SECRETSProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_START_ATProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_STOP_ATProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_ONLYProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_NO_CACHEProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_REFProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_ALLOWProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_MODEProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_FLEET_PARENT_*ProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_SOURCE_BUNDLE_OBJECTProtocolRemoved engine transport or option; never read as configuration or inherited.
SPARKWING_WORKTREE_BASE_*ProtocolRemoved engine transport or option; never read as configuration or inherited.
_SPARKWING_*ProtocolRemoved engine transport or option; never read as configuration or inherited.