@@ -29,22 +29,32 @@ func (c *Compiler) parseCodeScanningAlertsConfig(outputMap map[string]any) *Crea
2929 if driver , exists := configMap ["driver" ]; exists {
3030 if driverStr , ok := driver .(string ); ok {
3131 securityReportsConfig .Driver = driverStr
32+ createCodeScanningAlertLog .Printf ("Using custom SARIF driver name: %s" , driverStr )
3233 }
3334 }
3435
3536 // Parse target-repo
3637 securityReportsConfig .TargetRepoSlug = parseTargetRepoFromConfig (configMap )
38+ if securityReportsConfig .TargetRepoSlug != "" {
39+ createCodeScanningAlertLog .Printf ("Target repo for code scanning alerts: %s" , securityReportsConfig .TargetRepoSlug )
40+ }
3741
3842 // Parse allowed-repos
3943 securityReportsConfig .AllowedRepos = parseAllowedReposFromConfig (configMap )
44+ if len (securityReportsConfig .AllowedRepos ) > 0 {
45+ createCodeScanningAlertLog .Printf ("Allowed repos for cross-repo alerts: %d configured" , len (securityReportsConfig .AllowedRepos ))
46+ }
4047
4148 // Parse common base fields with default max of 0 (unlimited)
4249 c .parseBaseSafeOutputConfig (configMap , & securityReportsConfig .BaseSafeOutputConfig , 0 )
4350 } else {
4451 // If configData is nil or not a map (e.g., "create-code-scanning-alert:" with no value),
4552 // still set the default max (nil = unlimited)
53+ createCodeScanningAlertLog .Print ("No config map provided, using defaults (unlimited max)" )
4654 securityReportsConfig .Max = nil
4755 }
4856
57+ createCodeScanningAlertLog .Printf ("Parsed create-code-scanning-alert config: driver=%q, target-repo=%q, allowed-repos=%d" ,
58+ securityReportsConfig .Driver , securityReportsConfig .TargetRepoSlug , len (securityReportsConfig .AllowedRepos ))
4959 return securityReportsConfig
5060}
0 commit comments