Repository navigation
Run the action's version probe through the wrapper that removes credential variables - #62
Merged
Merged
Conversation
…ntial variables Every ukai-jail invocation in the action went through jail() (lib.sh), which removes the variables `credentials` names from its environment, except the setup step's `version --json`, which called the binary directly. The self-test's sampler caught that process holding the credential's variable (45831883724): K78 says the named variable is absent from ukai-jail's own environment, whichever the command. The call now goes through the wrapper. A stand-in test covers the probe, and check_action.py refuses any script that runs the binary as a command of its own. The action tag ukai-jail-action-v0.1.1 is not moved; it carries the old call, and the release record says so. The self-test's release-tag job therefore records how the checkout's action/ differs from the tag's instead of failing on it.
ukai-jail (profile agent)host setup (this runner only): bubblewrap 0.11.1 built from its release tarball (sha256:c1b7455a…) at /usr/local/bin/bwrap · AppArmor profile ukai-jail-action-bwrap allows user namespaces for that binary only · kernel.apparmor_restrict_unprivileged_userns stays 1 |
ukai-jail (profile agent)host setup (this runner only): bubblewrap 0.11.1 built from its release tarball (sha256:c1b7455a…) at /usr/local/bin/bwrap · AppArmor profile ukai-jail-action-bwrap allows user namespaces for that binary only · kernel.apparmor_restrict_unprivileged_userns stays 1 |
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.
Found by the self-test on
devafter #61: 45831883724, jobcontained (ubuntu-24.04-arm), row K78.What was wrong
Every
ukai-jailinvocation in the action goes throughjail()inlib.sh, which removes the variablescredentialsnames from its environment. One did not: the setup step'sversion --jsoncalled the binary directly. Its process therefore held the job's environment, the credential's variable included, for the few milliseconds it ran. The self-test's sampler polls every 20 ms and happened to land on it. The run's own data shows one readable snapshot ofversion --jsonholding the name and the value, and none of anyrun.K78 reads "the named variable is absent from
ukai-jail's own environment", without qualifying the command, so the check was right and the action was wrong. No value reached arun, and the probe prints build information and exits.The change
action/scripts/setup.sh: the probe goes through the wrapper, like every other call.test_action_scripts.py: a stand-in test that the probe runs without the named variable. It fails on the old call and passes on the new one.check_action.py: refuses any action script that runs the binary as a command of its own, so a direct call cannot come back unnoticed.action/differs from the tag's, instead of failing on it. The tagukai-jail-action-v0.1.1is not moved and carries the old call; the next release's action tag carries the fix. The release record says so.Checks run locally
The action script tests (23),
check_action.py, and shellcheck over the action scripts.