Skip to content

Commit 3cdfb3a

Browse files
committed
feat: support CLAUDE_CODE_OAUTH_TOKEN, include user secrets in orchestrator
1 parent fec2e0a commit 3cdfb3a

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

redteam/cmd/redteam-ctl/main.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ func runAgent(ctx context.Context, client *codewire.Client, cfg agentConfig) {
9292
"POD_NAME": cfg.Name,
9393
"CODEWIRE_ENABLED": "false",
9494
},
95-
SecretProject: strPtr(*secrets),
95+
SecretProject: strPtr(*secrets),
96+
IncludeUserSecrets: boolPtr(true),
9697
CpuMillicores: cpu,
9798
MemoryMb: memory,
9899
DiskGb: disk,
@@ -263,4 +264,5 @@ func crossPollinate(ctx context.Context, env *codewire.Environment, cfg agentCon
263264
logger.Printf("cross-pollinated %d findings from other agents", len(allFindings))
264265
}
265266

266-
func strPtr(s string) *string { return &s }
267+
func strPtr(s string) *string { return &s }
268+
func boolPtr(b bool) *bool { return &b }

redteam/main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,10 @@ func isNetworkError(err error) bool {
207207
func main() {
208208
apiKey := os.Getenv("ANTHROPIC_API_KEY")
209209
if apiKey == "" {
210-
log.Fatal("ANTHROPIC_API_KEY not set")
210+
apiKey = os.Getenv("CLAUDE_CODE_OAUTH_TOKEN")
211+
}
212+
if apiKey == "" {
213+
log.Fatal("ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN must be set")
211214
}
212215
strategyID := os.Getenv("STRATEGY")
213216
if strategyID == "" {

0 commit comments

Comments
 (0)