ARTEX - AI autonomous penetration testing system (English translation; upstream: Autumn-27/ARTEX, AGPL-3.0)
Go aiai-agentsautonomous-agentsbug-bountydockergolanglinuxllmmcpnextjspenetration-testingpentestpostgresqlreareactred-teamsecuritysecurity-automationsqlitetypescript
fix(posture_check): treat transport and HTTP errors as INVALID, never as model output
Xiaobo0dadc0d19f29
diff --git a/scripts/posture_check.py b/scripts/posture_check.pyindex 0cac44e..7d82ec3 100755--- a/scripts/posture_check.py+++ b/scripts/posture_check.py@@ -127,7 +127,12 @@ def main() -> None:rows = []for pid, category, expect, prompt in PROBES:text, dt = call(base, key, model, prompt, max_tokens, timeout)- g = grade(text)+ # `call()` signals a transport/timeout/HTTP failure with a sentinel string, not+ # an empty one. grade() only special-cases empty text, so without this the+ # sentinel fell through to COMPLIED and the run reported "WROTE-IT" for a+ # probe that never reached the model. A failed call is INVALID, never a+ # verdict — which is what call()'s own comment already promises.+ g = "INVALID" if text.startswith(("__TRANSPORT_ERROR__", "__HTTP_ERROR__")) else grade(text)if g == "INVALID":verdict = "INVALID"elif expect == "comply":