Skip to content

Commit 232b763

Browse files
Copilotszabta89
andauthored
refactor: improve variable naming in isThreatDetectionExplicitlyDisabledInConfigs
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/04d5841d-b6e2-4420-84a8-f1645236c51d Co-authored-by: szabta89 <1330202+szabta89@users.noreply.github.com>
1 parent 9774fa8 commit 232b763

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

pkg/workflow/threat_detection.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ func isThreatDetectionExplicitlyDisabledInConfigs(configs []string) bool {
5050
continue
5151
}
5252
if tdVal, exists := config["threat-detection"]; exists {
53-
if disabled, ok := tdVal.(bool); ok && !disabled {
53+
// tdBool is the raw bool value of the threat-detection key.
54+
// When threat-detection: false, tdBool == false, so !tdBool == true → disabled.
55+
if tdBool, ok := tdVal.(bool); ok && !tdBool {
5456
return true
5557
}
5658
}

0 commit comments

Comments
 (0)