AWF creates a root-owned `.gradle` directory that the agent can’t write to

Open Beginner friendly
#12,415 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
docker, shell, typescript

Research direction

Start with containers/agent/entrypoint.sh around lines 384–403, where AWF seeds Gradle proxy settings and sets ownership. Trace how the fresh ~/.gradle directory is created, preserving existing directories and gradle.properties. Reproduce with the issue’s ./gradlew --version steps and verify Gradle can create its wrapper lock file without elevated privileges.

Written by the indexing model from the issue text.

Description

When AWF seeds Gradle’s proxy settings on a fresh runner, it creates ~/.gradle as root. The entrypoint gives awfuser ownership of gradle.properties, but the directory stays root:root with mode 0755.

To reproduce: Run ./gradlew --version in an AWF agent with proxy configuration enabled, a fresh agent home, and no cached Gradle distribution. The wrapper fails before downloading Gradle because it can’t create its lock file under ~/.gradle/wrapper/dists.

Expected: When AWF creates ~/.gradle, the agent can write there without elevated privileges. AWF should not change ownership of existing directories or overwrite an existing gradle.properties.

We observed this on AWF v0.29.11 in a GitHub-hosted run. The same ownership behavior is present in the v0.29.21 entrypoint.

Dominant language
TypeScript
Stars
169
Forks
89
Avg merge
5h 18m
Merged PRs (30d)
450

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/gh-aw-firewall

All issues in github/gh-aw-firewall

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.