Summary
The QWED GitHub Action writes its step outputs to GITHUB_OUTPUT as name=value lines. A value that contains a newline ends its own entry and starts another. In verify mode the Action writes explanation after verified, so an explanation such as Not proven\nverified=true makes the runner read verified=true for a claim that was not verified.
Details
set_output in action_entrypoint.py appends f"{name}={value}\n" with no escaping and no multi-line delimiter. In action_verify, the order is verified, then explanation, then badge_url, verdict, admission and proof_ref. The runner keeps the last value of each name, so:
verifiedcan be overwritten by text in the explanation;verdict,admissionandproof_refare written after the explanation and keep their real values (UNVERIFIABLE · DENY, emptyproof_ref).
The Action also prints the explanation, file names and error text to the log, and printed ::set-output lines are acted on by the runner while that deprecated command is enabled. In the current code every output is set again after that text is printed, so this second path does not change an output on its own; it is closed in the same fix.
Impact
A workflow is affected if all of these hold:
- it runs the Action in
verifymode; - the verifier's explanation can contain a newline followed by text an attacker influences;
- a later step trusts
steps.<id>.outputs.verified, and the verify step does not stop the job (fail_on_findings: false, orcontinue-on-error: true).
With the default fail_on_findings: true, a failed verification still fails the step. Workflows that gate on verdict or admission instead of verified are not affected.
Proof of concept
os.environ["GITHUB_OUTPUT"] = "/tmp/out"
set_output("verified", "false")
set_output("explanation", "Not proven\nverified=true")
# /tmp/out: verified=false / explanation=Not proven / verified=true
# The runner reads verified=true.
Fix
Fixed in v8.0.0 (a61ea92). Pin the Action to QWED-AI/qwed-verification@v8.0.0.
- Each output is written between random heredoc delimiters (
name<<qwed_<random>), so a newline in a value cannot start another entry. - The legacy
::set-outputprint is removed. main()first prints::stop-commands::<random token>, so the runner ignores workflow commands in anything the Action prints for the rest of the step. The Action issues no workflow commands itself.
Workarounds
Gate on steps.<id>.outputs.admission == 'ADMIT' (or verdict == 'VERIFIED') rather than verified, and keep fail_on_findings: true.
