Skip to content

Commit 5cec0b3

Browse files
fix: pass codex api key to clawhub judge
1 parent e42ce2d commit 5cec0b3

6 files changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/run-clawscan-benchmark.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ on:
125125
required: false
126126
ANTHROPIC_API_KEY:
127127
required: false
128+
CODEX_API_KEY:
129+
required: false
128130
OPENAI_API_KEY:
129131
required: false
130132
SNYK_TOKEN:
@@ -189,6 +191,7 @@ jobs:
189191
AIG_MODEL_API_KEY: ${{ secrets.AIG_MODEL_API_KEY }}
190192
AIG_MODEL_BASE_URL: ${{ secrets.AIG_MODEL_BASE_URL }}
191193
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
194+
CODEX_API_KEY: ${{ secrets.CODEX_API_KEY || secrets.OPENAI_API_KEY }}
192195
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
193196
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
194197
SOCKET_CLI_API_TOKEN: ${{ secrets.SOCKET_CLI_API_TOKEN }}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ profiles:
232232
sandbox:
233233
env:
234234
- OPENAI_API_KEY
235+
- CODEX_API_KEY
235236
judge:
236237
command: >
237238
codex exec --cd {{ workspace }}

docs/profiles.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ profiles:
3939
sandbox:
4040
env:
4141
- OPENAI_API_KEY
42+
- CODEX_API_KEY
4243
judge:
4344
command: >
4445
codex exec --cd {{ workspace }}

internal/profiles/clawhub/clawscan.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ profiles:
88
sandbox:
99
env:
1010
- OPENAI_API_KEY
11+
- CODEX_API_KEY
1112
judge:
1213
command: >-
1314
codex exec --cd {{ workspace }}

internal/profiles/resolver_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func TestResolveArgsUsesEmbeddedClawHubProfile(t *testing.T) {
4747
if string(opts.Judge.Files["clawhub/output.schema.json"]) == "" {
4848
t.Fatal("expected embedded clawhub output schema file")
4949
}
50-
if got := strings.Join(opts.Sandbox.Env, ","); got != "OPENAI_API_KEY" {
50+
if got := strings.Join(opts.Sandbox.Env, ","); got != "OPENAI_API_KEY,CODEX_API_KEY" {
5151
t.Fatalf("sandbox env = %q", got)
5252
}
5353
}
@@ -390,7 +390,7 @@ func TestResolveArgsAppliesCLIOverrides(t *testing.T) {
390390
if opts.Sandbox.Image != "ghcr.io/acme/runtime:v1" {
391391
t.Fatalf("sandbox image = %q", opts.Sandbox.Image)
392392
}
393-
if got := strings.Join(opts.Sandbox.Env, ","); got != "OPENAI_API_KEY,ANTHROPIC_API_KEY" {
393+
if got := strings.Join(opts.Sandbox.Env, ","); got != "OPENAI_API_KEY,CODEX_API_KEY,ANTHROPIC_API_KEY" {
394394
t.Fatalf("sandbox env = %q", got)
395395
}
396396
}

skills/clawscan-cli/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ sandbox:
106106
mode: docker
107107
env:
108108
- OPENAI_API_KEY
109+
- CODEX_API_KEY
109110
profiles:
110111
review:
111112
scanners:

0 commit comments

Comments
 (0)