Skip to content

Pass --allow-escape-sequences when downloading release assets - #178

Merged
Jesse Hills (jesserockz) merged 1 commit into
mainfrom
jesserockz-2026-586
Aug 14, 2026
Merged

Jesse Hills (jesserockz) merged 1 commit into
mainfrom
jesserockz-2026-586

Conversation

@jesserockz

Copy link
Copy Markdown
Member

gh 2.97.0 added a security guard that refuses to write a response body containing terminal escape bytes, offering --allow-escape-sequences as the opt-out. Firmware images are arbitrary binary, so whether any given one contains such a byte sequence is luck. That made asset downloads fail nondeterministically: this bluetooth-proxies run lost 4 of 9 "Prepare artifact" jobs, which in turn blocked Upload to R2 and both promote jobs, while the other 5 devices passed on identical code.

Both sites that stream an asset body through gh api now pass the flag: the firmware download in publish-firmware-to-r2.yml (the actual failure) and the manifest download in publish-draft-release.yml. Manifests are JSON and rarely trip the guard, but a release body embedded in one could carry an escape byte, so it gets the same treatment.

The asset listing calls still use plain gh api. They return JSON that gh is happy to write, and --jq is convenient there.

Verified against gl-s10-esp32.factory.bin, one of the assets that actually failed: without the flag gh api exits 1 having written 0 bytes; with it, it exits 0 and produces a file byte-identical (sha256 06d1d08d…) to the same asset fetched over plain curl. So the flag suppresses the check outright rather than rewriting the payload, and binary passes through intact.

One deployment note: the guard and the flag both shipped in gh 2.97.0, so any runner new enough to reject a download is new enough to accept the flag. The reverse is the only risk, since gh 2.96 would reject the flag as unknown. actions/runner-images still lists 2.96.0 in its ubuntu-latest README, but the failing run above clearly hit the 2.97 guard, so that README is lagging the rollout rather than describing it.

Consumers pinning this workflow will need their pin bumped once this is released.

gh 2.97.0 added a guard that refuses to write a response body containing
terminal escape bytes. Firmware images are arbitrary binary, so whether a
given one trips it is luck: this failed 4 of 9 matrix jobs in
esphome/bluetooth-proxies and blocked the R2 upload and both promote jobs.

Verified the flag returns the asset byte-identical to a direct download.
@jesserockz
Jesse Hills (jesserockz) merged commit 0fdd5e3 into main Aug 14, 2026
36 checks passed
@jesserockz
Jesse Hills (jesserockz) deleted the jesserockz-2026-586 branch August 14, 2026 02:18
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