Summary
The Python SDK maps a server response to VerificationResult.is_verified from the raw is_valid field and ignores status and admission. A response the server marked BLOCKED / UNVERIFIABLE with admission: "BLOCKED" becomes is_verified=True in the SDK whenever the body also carries is_valid: true. The QWED GitHub Action then turns is_verified into admission=ADMIT and skips its failing exit. A result the server refused to admit is reported as verified and passes the CI gate.
This contradicts ADR-003 (docs/adr/ADR-003-truth-vs-admission.md): consumers must gate exclusively on admission == "ADMIT", and is_valid "is not an alternative authorization gate".
Affected components
| Component | Location | Behaviour |
|---|---|---|
qwed_sdk.models.VerificationResult.from_dict |
qwed_sdk/models.py L41-50 |
is_verified=data.get("is_verified", data.get("is_valid", False)) |
QWEDClient / QWEDAsyncClient methods that return from_dict(...) |
qwed_sdk/client.py: verify, verify_logic, verify_math, verify_fact, verify_stats, and the API fallbacks of verify_code / verify_sql |
All inherit the mapping |
GitHub Action verify mode |
action_entrypoint.py action_verify L102-115 |
admission = "ADMIT" if result.is_verified else "DENY"; sys.exit(1) only when not result.is_verified |
Root cause
- On the server,
merge_diagnostic_result()(src/qwed_new/core/diagnostics.py) flattensdeveloper_fieldsinto the top level of the response. So the engine'sis_validis present next tostatusandadmission. - A verdict can be downgraded to BLOCKED/UNVERIFIABLE after the engine set
is_valid: true, by a trust/attestation/policy gate or any wrapper that keeps the engine's fields.admission_decision()correctly returnsBLOCKEDfor any fail-closed status. - The SDK never reads
admissionorstatus, so it promotes the leftoveris_validtois_verified. - The Action trusts
is_verifiedas the admission decision.
Proof of concept (local, synthetic)
from qwed_new.core.diagnostics import DiagnosticResult, admission_decision, merge_diagnostic_result
from qwed_sdk.models import VerificationResult
dr = DiagnosticResult.blocked("blocked by gate", {"constraint_id": "c", "is_valid": True})
body = merge_diagnostic_result(dr); body["admission"] = admission_decision(dr).value
print(body["status"], body["admission"]) # BLOCKED BLOCKED
print(VerificationResult.from_dict(body).is_verified) # True <-- should be False
Observed output on 7.3.0 and on main @ 52d3e06: BLOCKED BLOCKED / True. The same happens for DiagnosticResult.unverifiable(...).
Downstream: with that body, the Action prints Verdict: True, emits admission=ADMIT, and exits 0 (CI passes).
Impact
Integrity of the verification decision. Any SDK consumer or CI pipeline that gates on is_verified (the documented SDK field, and the Action's only gate) will accept LLM output that QWED explicitly refused. The attacker needs to influence the content being verified, i.e. the model output. They do not need any credentials.
Affected versions
qwedon PyPI: 2.0.0 to 7.3.0. Theis_validfallback infrom_dictwas added ina0dcf20(December 2025); 0.1.0 predates it. Confirmed at runtime on 7.3.0.- GitHub Action
verifymode: v7.1.0 to v7.3.0, where the Action'sadmissionoutput and exit code followis_verified(637a880). Earlier versions read aresult.verifiedattribute that does not exist, so the step failed closed.
Patches
Fixed in 8.0.0 (d1b9d7f):
qwed_sdk/models.py:is_admitted()applies the server's rule. Where the response carries anadmission, onlyADMITadmits; otherwisestatusmust beVERIFIEDandis_validmust betrue. A bareis_validoris_verifiednever admits on its own.VerificationResult.from_dictuses it, and the newVerificationResult.admissionfield carries the server's decision.verify_consensusreads the server's status andmeets_requirement is True.- The GitHub Action's verify mode gates its exit code and
admissionoutput onis_verified, and reports the server's verdict (for exampleVERIFIED · DENY).
Upgrade with pip install -U qwed (8.0.0 or later) and pin the Action to QWED-AI/qwed-verification@v8.0.0.
Workarounds
Call the REST API directly and gate on the response's admission == "ADMIT", not on is_valid or the SDK's is_verified.
Related
- Public issue #327 (SDK methods lack admission/proof_ref) is adjacent but does not describe this fail-open.
- ADR-003; #437/#438; #326 (same fail-open class, fixed only for
verify_factconnectivity errors).
