oliver-zehentleitner / maity
cli: maity report keeps the placement's proxy for git ls-remote, so a proxied placement can report
tsk-mfac5zscnkxs Done An agent
Found 2026-11-23 on PR #2150 (req-80skqp8ykynx, from codex-006#8zgq): in a placement that reaches GitHub only through a proxy, maity report fails before it submits anything.
What happens:
- The guarded git subprocess (
git ls-remote) drops the placement's proxy variables, so github.com does not resolve. - The forge-probe fallback runs only after that lookup, so it never gets a chance.
- The card cannot be reported from that placement.
Goal: the git transport keeps the proxy variables the placement sets (HTTPS_PROXY/HTTP_PROXY/NO_PROXY, either case, and ALL_PROXY), while the rest of the isolation stays as it is. If the lookup still fails, report falls back to the forge probe instead of aborting.
Deliver:
- First a short findings note on this card, with file:line for where the env is built and dropped.
- Then the fix with tests, including a counter-check that fails without the fix.
- One sentence in docs/agents.md or docs/runners.md if behaviour changes.
- A changelog line.
Boundary:
- Never pass credentials through. Proxy URLs that carry userinfo stay as the placement set them, and they are never logged.
- No change to which GIT_* variables are dropped (#2148).
Notes
An agent · Nov 23, 2026, 17:59 UTC
Findings (6j4u), main
70a0e5ce, from reading the code. Nothing is run yet.Where the proxy is dropped
cli/src/maity/proc.py:99-105: under a placement,proc.runstarts git withclonecheck.kept_env(os.environ)plusNO_PROMPT,GIT_ALLOW_PROTOCOLand the pinnedGIT_*set (clonecheck.py:572-590). It does not useos.environ.cli/src/maity/clonecheck.py:61:ENV_KEPT = ("HOME", "LANG", "TMPDIR"), plus the Windows start-up names at:62.kept_envat:919-923keeps only these, soHTTPS_PROXY/HTTP_PROXY/ALL_PROXY/NO_PROXY(either case) never reach git.
Why report aborts before the probe
gitfacts.collect(gitfacts.py:374) calls_remote_head, which runsls-remotethrough_git_required(:274,:78-83). A failed lookup raisesFactsErrorthere.- That happens before the forge lookup (
:376-382), socli.py:1787aborts. Report's probe fallback (cli.py:1824,_probed_pr) is never reached.
Precedents for the variable list
ghpr.py:59-62(maity gh) passesHTTPS_PROXY/HTTP_PROXY/NO_PROXYin both cases, but notALL_PROXY.runner/skills.py:280-284(the skill fetch) also passesALL_PROXYand the trust roots.
Planned fix
clonecheck: a separateENV_PROXYtuple (https_proxy,HTTPS_PROXY,http_proxy,HTTP_PROXY,all_proxy,ALL_PROXY,no_proxy,NO_PROXY), added tokept_env. Values are passed as set and never logged. NoGIT_*variable changes (#2148's list stays). No trust-root variables: anSSL_CERT_FILEset in front ofmaitywhere no hook holds the line (agy) would let a man-in-the-middle read the remote's credential. A proxy cannot: git's https still verifies the server through the tunnel.report: when thels-remotelookup fails,collectrecords it instead of raising, and report asks the hub's probe for the card's linked pull request whose head is the local HEAD. That is the same stand-in as for a merged, deleted branch (f720dd3c). With no such pull request, the refusal names the git error as today.- Tests, a counter-check, one sentence in docs/runners.md, and a changelog line.