Skip to content

Run the action's version probe through the wrapper that removes credential variables - #62

Merged
monocursive merged 1 commit into
devfrom
codex/action-credential-wrapper
Nov 26, 2026
Merged

monocursive merged 1 commit into
devfrom
codex/action-credential-wrapper

Conversation

@monocursive

Copy link
Copy Markdown
Owner

Found by the self-test on dev after #61: 45831883724, job contained (ubuntu-24.04-arm), row K78.

What was wrong

Every ukai-jail invocation in the action goes through jail() in lib.sh, which removes the variables credentials names from its environment. One did not: the setup step's version --json called 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 of version --json holding the name and the value, and none of any run.

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 a run, 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.
  • The release-tag job (K86) now records how the checkout's action/ differs from the tag's, instead of failing on it. The tag ukai-jail-action-v0.1.1 is 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.

…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.
@github-actions

Copy link
Copy Markdown

ukai-jail (profile agent)

ukai-jail: settled · exited 0 · 156ms exec→settled · survivors: none (verified)
ukai-jail: workspace: 2 paths opened for writing · 3 results with unnamed paths · 2 refused writes
ukai-jail: network: allowed api.github.com:443 (1) · denied 169.254.169.254:80 (1), example.com:443 (1)
ukai-jail: evidence: 6/6 classes active · reads and file contents are not observed
ukai-jail: receipt /home/runner/work/_temp/ukai/data/attempts/att_cc5e3883-5fc6-489b-a6d3-c5bf58c3925a/jail.json

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

Workflow run · artifact selftest-profile-ubuntu-24.04

@github-actions

Copy link
Copy Markdown

ukai-jail (profile agent)

ukai-jail: settled · exited 0 · 200ms exec→settled · survivors: none (verified)
ukai-jail: workspace: 2 paths opened for writing · 3 results with unnamed paths · 2 refused writes
ukai-jail: network: allowed api.github.com:443 (1) · denied 169.254.169.254:80 (1), example.com:443 (1)
ukai-jail: evidence: 6/6 classes active · reads and file contents are not observed
ukai-jail: receipt /home/runner/work/_temp/ukai/data/attempts/att_dfc34d7a-8208-4288-aefb-500d51e694ea/jail.json

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

Workflow run · artifact selftest-profile-ubuntu-24.04-arm

@monocursive
monocursive merged commit 80a1f39 into dev Nov 26, 2026
36 of 37 checks passed
@monocursive
monocursive deleted the codex/action-credential-wrapper branch November 26, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant