File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -815,13 +815,19 @@ def main() -> None:
815815 _tprint (bold (f"━━━ cull: searching for { labels } ━━━" ))
816816
817817 all_findings : list [Finding ] = []
818+ has_other_source = (
819+ args .github_org or args .docker or args .images
820+ or args .gcr_project or args .gar_repo
821+ )
822+ scan_dirs = args .dirs or (None if has_other_source else ["." ])
818823
819824 for target in targets :
820825 pkg , bad_version = target .name , target .version
821826 print_header (f"▸ { target .label } " )
822827
823- print_header (" LOCAL DIRECTORIES" )
824- all_findings .extend (scan_local (args .dirs or ["." ], pkg , bad_version ))
828+ if scan_dirs :
829+ print_header (" LOCAL DIRECTORIES" )
830+ all_findings .extend (scan_local (scan_dirs , pkg , bad_version ))
825831
826832 if args .github_token and args .github_org :
827833 print_header (" GITHUB" )
You can’t perform that action at this time.
0 commit comments