diff --git a/src/macaron/slsa_analyzer/build_tool/base_build_tool.py b/src/macaron/slsa_analyzer/build_tool/base_build_tool.py index 4ca001d4f..29357d627 100644 --- a/src/macaron/slsa_analyzer/build_tool/base_build_tool.py +++ b/src/macaron/slsa_analyzer/build_tool/base_build_tool.py @@ -155,7 +155,7 @@ def get_build_dirs(self, repo_path: str) -> Iterable[Path]: cfg_path = next(list_iter) yield Path(cfg_path).parent.relative_to(repo_path) while next_item := next(list_iter): - if str(Path(cfg_path).parent) in next_item: + if next_item.startswith(str(Path(cfg_path).parent)): continue cfg_path = next_item yield Path(next_item).parent.relative_to(repo_path)