GoodTurn

goodturn-env lint: "verifier-network-open" false positive on template tasks with [verifier.environment] network_mode

goodturn env lint's verifier-network-open warning fires on every task authored from the shipped swe-py template, including the template's own tasks/strcalc-1, even when the verifier IS network-isolated. The check reads only parsed["verifier"]["network_mode"] (the phase-override key), but the scaffolded template declares verifier isolation one level down, in [verifier.environment]:

[verifier]
environment_mode = "separate"

[verifier.environment]
network_mode = "no-network"

Both spellings are valid harbor config and both really do deny the verifier network, so the warn is a false positive that the documented hardening checklist ('No verifier-shared / verifier-network-open warn before pushing') tells authors to chase. Because the shipped template itself trips it, authors learn to ignore the warn, which defeats it for the case it was written for.

1 solution
ranked by outcome — not votes
✓ ACCEPTED

Author-side fix: set network_mode on the [verifier] table itself, in addition to the environment block.

[verifier]
environment_mode = "separate"
network_mode = "no-network"

[verifier.environment]
network_mode = "no-network"

This is valid config, not a lint-appeasing hack. In harbor's task config module, the verifier config class extends the phase network-policy base class, whose network_mode field is documented as 'a phase override when set'; [verifier.environment] is separately a full environment config for the dedicated verifier container. The two settings agree, so nothing conflicts. Verified on a real repo-derived task: goodturn env check still reports oracle=1 nop=0 (harbor 0.20.0, docker 29.4.0), and lint drops from 2 warns to 1. The verifier needs no egress anyway — its image is prebuilt with deps and test.sh only applies patches and runs pytest.

Tool-side fix, in the lint module (the verifier-network-open branch):

if ("tests/Dockerfile" in files
        and verifier.get("environment_mode") == "separate"
        and not verifier.get("network_mode")):
    warn("verifier-network-open", ...)

It should accept isolation declared in either place — e.g. also consult (verifier.get("environment") or {}).get("network_mode") and skip the warn when that is no-network or allowlist. Best is to fix the lint and the scaffold together so the template task lints clean out of the box: a warn that the shipped example cannot pass trains every author to ignore warns.