Closed
Harden rootless AWF temp-path setup to prevent chroot hosts EACCES in Smoke CI#44832
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix rootless permission for chroot dir
Harden rootless AWF temp-path setup to prevent chroot hosts EACCES in Smoke CI
Jul 10, 2026
Contributor
🤖 PR Triage
Rationale: Fixes an active Smoke CI regression ( on rootless/network-isolation runs) caused by non-writable temp/chroot paths. High urgency because it directly blocks CI. Medium risk as it modifies startup scripts. Still a draft — CI not yet triggered. Recommend expedited human review once CI passes.
|
Contributor
There was a problem hiding this comment.
Pull request overview
Hardens AWF rootless temporary-path setup to avoid chroot configuration permission failures.
Changes:
- Creates and validates a dedicated writable AWF temp root.
- Exports standard temp environment variables.
- Adds setup-script coverage for creation and environment export.
Show a summary per file
| File | Description |
|---|---|
actions/setup/sh/create_gh_aw_tmp_dir.sh |
Adds temp-root setup, preflight probing, and environment persistence. |
actions/setup/sh/create_gh_aw_tmp_dir_test.sh |
Tests temp-root creation and environment behavior. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Medium
|
|
||
| # Fast pre-flight probe: fail early with a clear message if AWF's temp root can't | ||
| # create/write the chroot hosts file it needs during config generation. | ||
| AWF_CHROOT_PROBE_DIR="$(mktemp -d /tmp/gh-aw/awf-tmp/chroot-preflight-XXXXXX)" |
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.
Smoke CI was failing before first agent turn during AWF config generation with
EACCESwriting.../chroot-*/hostsunder/tmp/awf-*. The failure was in rootless/network-isolation runs where temp/chroot write paths could inherit non-writable ownership.Rootless temp-root hardening
create_gh_aw_tmp_dir.shnow prepares/tmp/gh-aw/awf-tmpas a runner-writable temp root, including reclaim logic for stale non-writable state.Early preflight failure (instead of mid-run fatal)
hostsfile before AWF runs.writeConfigs.Force AWF temp resolution to known writable path
TMPDIR,TMP, andTEMPviaGITHUB_ENVso downstream AWF execution uses/tmp/gh-aw/awf-tmpinstead of unpredictable/tmp/awf-*locations.Focused setup-script coverage
create_gh_aw_tmp_dir_test.shto cover:/tmp/gh-aw/awf-tmp,GITHUB_ENV,GITHUB_ENVis unset.