@@ -75,6 +75,7 @@ def get_esp_idf_release_branches():
7575 return [b .strip () for b in env_branches .split (',' )]
7676 return [
7777 'master' ,
78+ 'release/v6.0' ,
7879 'release/v5.5' ,
7980 'release/v5.4' ,
8081 'release/v5.3' ,
@@ -790,31 +791,41 @@ def scan_unified_targets(self, targets, prefer_git_over_docker=False):
790791 return results
791792
792793 def scan_all_v5_releases (self , use_unified_mode = True , prefer_git_over_docker = False ):
793- """Scan all available v5.x tags and release branches efficiently"""
794- logger .info ("Scanning ESP-IDF v5.x releases and branches..." )
795-
796- # Get available v5.x tags and release branches, plus master branch
797- tags , branches = self .get_available_targets (target_patterns = ["v5." , "master" ])
798- release_branches = [b for b in branches if b .startswith ("release/v5." )]
799-
794+ """Scan all available v5.x+ tags and release branches efficiently"""
795+ logger .info ("Scanning ESP-IDF v5.x+ releases and branches..." )
796+
797+ # Get available v5.x and v6.x tags and release branches, plus master branch
798+ tags , branches = self .get_available_targets (target_patterns = ["v5." , "v6." , " master" ])
799+ release_branches = [b for b in branches if b .startswith ("release/v5." ) or b . startswith ( "release/v6." ) ]
800+
800801 # Add master branch if available
801802 if "master" in branches :
802803 release_branches .append ("master" )
803-
804- # Filter to v5.x tags only, excluding rc, dev, beta versions
804+
805+ # Merge in any additional branches from environment variable configuration
806+ # This ensures branches like release/v6.0 are included even if not yet in remote
807+ configured_branches = get_esp_idf_release_branches ()
808+ for branch in configured_branches :
809+ if branch not in release_branches :
810+ # Verify branch exists in remote before adding
811+ if branch in branches or branch == "master" :
812+ release_branches .append (branch )
813+ logger .info (f"Added configured branch: { branch } " )
814+
815+ # Filter to v5.x and v6.x tags, excluding rc, dev, beta versions
805816 # Note: Previously unsupported SBOM versions are now included to show "No SBOM support" status
806- v5_tags = [tag for tag in tags if tag .startswith ("v5." ) and
807- not any (exclude in tag .lower () for exclude in ["rc" , "dev" , "beta" ])]
808-
809- logger .info (f"Found { len (v5_tags )} v5.x tags and { len (release_branches )} v5.x release branches" )
817+ release_tags = [tag for tag in tags if (tag .startswith ("v5." ) or tag .startswith ("v6." )) and
818+ not any (exclude in tag .lower () for exclude in ["rc" , "dev" , "beta" ])]
810819
820+ logger .info (f"Found { len (release_tags )} release tags and { len (release_branches )} release branches" )
821+
811822 if use_unified_mode :
812823 # Combine all targets for unified scanning
813- all_targets = v5_tags + release_branches
824+ all_targets = release_tags + release_branches
814825 return self .scan_unified_targets (all_targets , prefer_git_over_docker )
815826 else :
816827 # Use traditional scanning approach
817- return self .scan_releases (v5_tags , include_branches = release_branches )
828+ return self .scan_releases (release_tags , include_branches = release_branches )
818829
819830def main ():
820831 parser = argparse .ArgumentParser (description = "Scan ESP-IDF releases for security vulnerabilities" )
@@ -833,7 +844,7 @@ def main():
833844 parser .add_argument ("--batch-mode" , action = "store_true" ,
834845 help = "Use optimized batch scanning (single clone for multiple targets)" )
835846 parser .add_argument ("--scan-all-v5" , action = "store_true" ,
836- help = "Scan all available v5.x tags and release branches" )
847+ help = "Scan all available v5.x/v6.x tags and release branches" )
837848 parser .add_argument ("--unified-mode" , action = "store_true" ,
838849 help = "Use unified scanning (single clone for all targets)" )
839850 parser .add_argument ("--git-only" , action = "store_true" ,
0 commit comments