Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/aw/actions-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"actions/create-github-app-token@v2": {
"repo": "actions/create-github-app-token",
"version": "v2",
"sha": "7e473efe3cb98aa54f8d4bac15400b15fad77d94"
"sha": "29824e69f54612133e76f7eaac726eef6c875baf"
},
"actions/download-artifact@v6": {
"repo": "actions/download-artifact",
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/artifacts-summary.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions .github/workflows/changeset.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions .github/workflows/daily-file-diet.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 12 additions & 8 deletions .github/workflows/daily-team-status.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions .github/workflows/release.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pkg/cli/mcp_inspect_playwright_live_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestMCPInspectPlaywrightLiveIntegration(t *testing.T) {
defer setup.cleanup()

// Find an available port for our test web server
port, err := findAvailablePort()
port, err := findAvailableTestPort()
if err != nil {
t.Fatalf("Failed to find available port: %v", err)
}
Expand Down Expand Up @@ -319,8 +319,8 @@ URL: ` + docsURL + `/gh-aw/
// This allows the test to work in environments where docker is slow or restricted
}

// findAvailablePort finds an available TCP port on localhost
func findAvailablePort() (int, error) {
// findAvailableTestPort finds an available TCP port on localhost
func findAvailableTestPort() (int, error) {
listener, err := net.Listen("tcp", "127.0.0.1:0")
if err != nil {
return 0, err
Expand Down
2 changes: 1 addition & 1 deletion pkg/workflow/data/action_pins.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"actions/create-github-app-token@v2": {
"repo": "actions/create-github-app-token",
"version": "v2",
"sha": "7e473efe3cb98aa54f8d4bac15400b15fad77d94"
"sha": "29824e69f54612133e76f7eaac726eef6c875baf"
},
"actions/download-artifact@v6": {
"repo": "actions/download-artifact",
Expand Down
8 changes: 2 additions & 6 deletions pkg/workflow/safe_inputs.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,7 @@ func parseSafeInputsMap(safeInputsMap map[string]any) (*SafeInputsConfig, bool)
toolConfig.Timeout = int(t)
case string:
// Try to parse string as integer
if timeoutInt, err := fmt.Sscanf(t, "%d", &toolConfig.Timeout); err == nil && timeoutInt == 1 {
// Successfully parsed
}
_, _ = fmt.Sscanf(t, "%d", &toolConfig.Timeout)
}
}

Expand Down Expand Up @@ -744,9 +742,7 @@ func (c *Compiler) mergeSafeInputs(main *SafeInputsConfig, importedConfigs []str
toolConfig.Timeout = int(t)
case string:
// Try to parse string as integer
if timeoutInt, err := fmt.Sscanf(t, "%d", &toolConfig.Timeout); err == nil && timeoutInt == 1 {
// Successfully parsed
}
_, _ = fmt.Sscanf(t, "%d", &toolConfig.Timeout)
}
}

Expand Down
13 changes: 11 additions & 2 deletions pkg/workflow/step_summary_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,17 @@ This workflow tests the workflow overview for Claude engine.
}

// Verify model is present in aw_info.json
if !strings.Contains(lockContent, "model: \""+tt.expectModel+"\"") {
t.Errorf("Expected model: %q in aw_info.json", tt.expectModel)
if tt.expectModel == "" {
// For empty model, check for the environment variable expression
if !strings.Contains(lockContent, "model: process.env.GH_AW_MODEL_AGENT_COPILOT || \"\"") &&
!strings.Contains(lockContent, "model: process.env.GH_AW_MODEL_DETECTION_COPILOT || \"\"") {
t.Errorf("Expected model to use environment variable with empty string fallback in aw_info.json")
}
} else {
// For non-empty model, check for the literal value
if !strings.Contains(lockContent, "model: \""+tt.expectModel+"\"") {
t.Errorf("Expected model: %q in aw_info.json", tt.expectModel)
}
}

// Verify firewall status in aw_info.json
Expand Down
16 changes: 11 additions & 5 deletions pkg/workflow/threat_detection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1000,14 +1000,20 @@ func TestCopilotDetectionDefaultModel(t *testing.T) {
allSteps := strings.Join(steps, "")

if tt.shouldContainModel {
// Check if the expected model is present in the steps
if !strings.Contains(allSteps, tt.expectedModel) {
t.Errorf("Expected steps to contain model %q, but it was not found.\nGenerated steps:\n%s", tt.expectedModel, allSteps)
}
// Also check for --model flag
// Check for --model flag
if !strings.Contains(allSteps, "--model") {
t.Errorf("Expected steps to contain --model flag, but it was not found.\nGenerated steps:\n%s", allSteps)
}

// For detection jobs, check if either:
// 1. The model is explicitly specified in the command (for custom models)
// 2. The environment variable GH_AW_MODEL_DETECTION_COPILOT is used (for default model)
hasExplicitModel := strings.Contains(allSteps, "--model "+tt.expectedModel)
hasEnvVar := strings.Contains(allSteps, "GH_AW_MODEL_DETECTION_COPILOT")

if !hasExplicitModel && !hasEnvVar {
t.Errorf("Expected steps to contain either explicit model %q or GH_AW_MODEL_DETECTION_COPILOT environment variable, but neither was found.\nGenerated steps:\n%s", tt.expectedModel, allSteps)
}
}
})
}
Expand Down