Skip to content

fix(action): restore temporary home permissions on exit - #373

Merged
zpzjzj merged 1 commit into
mainfrom
fix/action-temp-home-permissions
Nov 4, 2026
Merged

zpzjzj merged 1 commit into
mainfrom
fix/action-temp-home-permissions

Conversation

@zpzjzj

@zpzjzj zpzjzj commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Root Docker Action engines can leave private directories under the runner-mounted HOME, such as .qodersec/state, that the unprivileged self-hosted runner cannot traverse. Temp cleanup then fails and unrelated build artifacts accumulate until the disk fills.

Capture HOME's original owner before starting the engine and restore ownership plus owner access in the existing exit trap. Private credential modes remain private. Cleanup runs on successful and failed engine exits, preserves an existing engine failure, and still repairs HOME when report cleanup fails.

Validation:

  • make build, make verify, make test, and make test-action passed.
  • A Linux Docker regression using the currently pinned Action image and the updated entrypoint reproduced runner deletion failure with the old script, then verified successful deletion as the runner user with the fix after engine exits 0 and 7.

Delivery: action.yml still pins the existing immutable image. Rebuild the image and update its digest before this fix is active in the distributed Action. Abrupt container termination cannot execute the exit trap.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T10:14:34.577492Z e8a674d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@zpzjzj
zpzjzj force-pushed the fix/action-temp-home-permissions branch from e8a674d to 4e97900 Compare November 4, 2026 07:49

@JHWang-1997 JHWang-1997 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zpzjzj
zpzjzj added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit 4234ca2 Nov 4, 2026
14 checks passed
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.

2 participants