@@ -1142,6 +1142,7 @@ func apiScanParsedResults(c *gin.Context) {
11421142 return
11431143 }
11441144 scanType := strings .ToLower (strings .TrimSpace (scanRec .ScanType ))
1145+ isAPKScan := strings .Contains (scanType , "apkx" )
11451146
11461147 section := strings .ToLower (strings .TrimSpace (c .DefaultQuery ("section" , "all" )))
11471148 limit , _ := strconv .Atoi (c .DefaultQuery ("limit" , "1200" ))
@@ -1165,7 +1166,7 @@ func apiScanParsedResults(c *gin.Context) {
11651166 kind := inferReconKind (e .FileName ) // always attach kind for unified table tabs
11661167 module := e .Module
11671168 category := e .Category
1168- if scanType == "apkx" {
1169+ if isAPKScan {
11691170 // APK scans commonly produce generic file names (e.g., results.json/report.html).
11701171 // Keep APK findings grouped in APK Analysis instead of falling back to autoar/other.
11711172 if module == "" || module == "autoar" || module == "unknown" || module == "github-scan" {
@@ -1182,7 +1183,7 @@ func apiScanParsedResults(c *gin.Context) {
11821183 if len (rows ) >= limit {
11831184 return
11841185 }
1185- if scanType == "apkx" {
1186+ if isAPKScan {
11861187 // Drop placeholder rows produced by summary objects with no concrete finding fields.
11871188 f := strings .ToLower (strings .TrimSpace (r .Finding ))
11881189 t := strings .TrimSpace (r .Target )
@@ -1207,7 +1208,7 @@ func apiScanParsedResults(c *gin.Context) {
12071208 presentFiles [strings .ToLower (e .FileName )] = true
12081209 }
12091210 hasApkxJSON := false
1210- if scanType == "apkx" {
1211+ if isAPKScan {
12111212 for _ , e := range entries {
12121213 n := strings .ToLower (strings .TrimSpace (e .FileName ))
12131214 if strings .HasSuffix (n , ".json" ) {
@@ -1281,7 +1282,7 @@ func apiScanParsedResults(c *gin.Context) {
12811282 continue
12821283 }
12831284 }
1284- if scanType == "apkx" {
1285+ if isAPKScan {
12851286 ext := strings .ToLower (filepath .Ext (e .FileName ))
12861287 // Do not parse rendered report assets as findings rows.
12871288 if ext == ".html" || ext == ".htm" || ext == ".css" || ext == ".js" {
0 commit comments