Skip to content

Fix artifacts-helper non-root temp file append#114

Merged
markphip merged 2 commits intomicrosoft:mainfrom
MJuma:fix-artifacts-helper-nonroot-tempfile
Apr 28, 2026
Merged

Fix artifacts-helper non-root temp file append#114
markphip merged 2 commits intomicrosoft:mainfrom
MJuma:fix-artifacts-helper-nonroot-tempfile

Conversation

@MJuma
Copy link
Copy Markdown
Member

@MJuma MJuma commented Apr 28, 2026

Summary

  • make the root-created aliases temp file readable before appending it as the non-root remote user
  • add a non-root install regression scenario for artifacts-helper
  • bump artifacts-helper to 3.0.9

Fixes #112

Validation

  • jq empty test/artifacts-helper/scenarios.json src/artifacts-helper/devcontainer-feature.json
  • bash -n src/artifacts-helper/install.sh test/artifacts-helper/test_non_root_install.sh test/artifacts-helper/test_shim_integration.sh
  • git diff --check
  • local permission simulation confirming the previous root-owned mktemp read fails and the chmod a+r approach succeeds

Stream the root-created aliases block into the non-root append command over stdin so the remote user does not need read access to the mktemp file. Add a non-root install regression scenario and bump artifacts-helper to 3.0.9.

Fixes microsoft#112

Co-authored-by: Copilot <[email protected]>
@markphip
Copy link
Copy Markdown
Contributor

This PR is better than mine #113 but I think my fix makes more sense. Can you implement it since it is in your fork?

Make the generated aliases temp file readable before appending it as the non-root remote user. This keeps the installer flow aligned with the existing implementation while fixing the non-root permission failure.

Co-authored-by: Copilot <[email protected]>
@MJuma
Copy link
Copy Markdown
Member Author

MJuma commented Apr 28, 2026

Done

@markphip markphip merged commit a761d92 into microsoft:main Apr 28, 2026
5 of 6 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.

artifacts-helper 3.0.8 fails for non-root remoteUser: mktemp file is unreadable

2 participants