Repository navigation
feat: configurable allow list for the environment passed to k6 - #222
Merged
Merged
Conversation
STEADYBIT_EXTENSION_K6_ENV_ALLOW_LIST (Helm value k6.envAllowList) adds exact variable names to the built-in defaults. STEADYBIT_EXTENSION_* entries and wildcards are ignored with a warning at startup.
|
Claude finished @DuarteMCSilva's task in 13s —— View job Review of PR #222
No blocking issues found.
Minor note, no action needed: the check in I didn't run the tests or the e2e suite. |
DuarteMCSilva
force-pushed
the
feat/k6-env-allow-list
branch
from
October 20, 2026 10:14
75f1773 to
5f7dbdf
Compare
DuarteMCSilva
enabled auto-merge (squash)
October 20, 2026 10:16
|
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.



Problem
Since #221, k6 only gets a hard-coded set of environment variables. Customers whose scripts (or k6 extensions) rely on other variables of the extension's environment could only get them back through the step's Environment variables parameter.
Change
STEADYBIT_EXTENSION_K6_ENV_ALLOW_LIST(comma-separated exact names), Helm valuek6.envAllowList. The names are added to the built-in defaults, they don't replace them.STEADYBIT_EXTENSION_*entries are dropped with a warning at startup, so a misconfigured entry can't hand the extension's own secrets (e.g.STEADYBIT_EXTENSION_CLOUD_API_TOKEN) back to scripts.k6Environment()also never passesSTEADYBIT_EXTENSION_*variables, as a second safeguard.*are dropped with a warning. A prefix pattern would also expose variables added under it later.K6_*limitation) and a row in the configuration table. Linux package config gets a commented entry. Chart bumped to 1.2.53.Breaking change
From #221, not yet released: k6 scripts no longer see the extension's environment variables via
__ENV, exceptK6_*, proxy, TLS, Kubernetes and basic system variables. It's now listed as a breaking change in the CHANGELOG, with the new allow list and the step's environment variables as the way to migrate.Testing
TestParseConfiguration_k6EnvAllowList) and for the allow list ink6Environment()(Test_k6Environment_withAllowList)k6.envAllowListsteadybit-extension-k6-1.2.52, which goreleaser rejects as not semver (unrelated to this change)Card: https://steadybitgmbh.kanbanize.com/ctrl_board/2/cards/26574/details/