|
31 | 31 | with: |
32 | 32 | node-version: 24.22.2 |
33 | 33 |
|
34 | | - - name: Build ClawScan and install the judge and pinned overview harness |
| 34 | + - name: Build ClawScan and install Codex for the judge and overview |
35 | 35 | run: | |
36 | 36 | go build -o ./dist/clawscan ./cmd/clawscan |
37 | | - ln -sf "$PWD/docker/clawscan-runtime/judges/clawscan_decisions_judge.py" ./dist/clawscan-decisions-judge |
38 | | - echo "$PWD/dist" >> "$GITHUB_PATH" |
39 | 37 | npm install -g @openai/codex@0.164.0 |
40 | 38 | codex --version |
41 | 39 |
|
@@ -74,21 +72,22 @@ jobs: |
74 | 72 | CLAWSCAN_PROGRESS="1", CLAWSCAN_CHILD_PROGRESS="1", |
75 | 73 | TMPDIR=temp, TMP=temp, TEMP=temp, |
76 | 74 | ) |
77 | | - subprocess.run([ |
| 75 | + scan = subprocess.run([ |
78 | 76 | str(binary), str(package), "--profile", "clawhub", "--sandbox", "off", |
79 | 77 | "--scanner-result", f"skillspector={skillspector}", |
80 | 78 | "--scanner-result", f"aig={aig}", "--output", str(report), |
81 | | - ], cwd=root, env=env, check=True, timeout=240) |
| 79 | + ], cwd=root, env=env, timeout=240) |
| 80 | + if not report.exists(): |
| 81 | + scan.check_returncode() |
82 | 82 | artifact = json.loads(report.read_text()) |
83 | 83 | judge = artifact.get("judge", {}) |
84 | 84 | overview = artifact.get("overview") or {} |
85 | | - decision = (judge.get("result") or {}).get("decision") or {} |
86 | 85 | print(json.dumps({ |
87 | | - "judge": judge.get("status"), "error": judge.get("error"), |
| 86 | + "judge": judge.get("status"), |
88 | 87 | "verdict": (judge.get("result") or {}).get("verdict"), |
89 | | - "model": decision.get("model"), "latencyMs": decision.get("latencyMs"), |
90 | | - "overview": overview.get("status"), "overviewError": overview.get("error"), |
| 88 | + "overview": overview.get("status"), |
91 | 89 | })) |
| 90 | + scan.check_returncode() |
92 | 91 | assert judge.get("status") == "completed", "Judge did not complete" |
93 | 92 | assert judge["result"]["verdict"] in ("benign", "suspicious", "malicious") |
94 | 93 | assert overview.get("status") == "completed", "Overview did not complete" |
|
0 commit comments