From 5859a49510b00638718da2e93f2d7014496fd41d Mon Sep 17 00:00:00 2001 From: AdnaneKhan Date: Sun, 21 Apr 2024 09:31:17 -0400 Subject: [PATCH] fix bug --- gato/enumerate/repository.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gato/enumerate/repository.py b/gato/enumerate/repository.py index ddbd074..139ca19 100644 --- a/gato/enumerate/repository.py +++ b/gato/enumerate/repository.py @@ -87,8 +87,10 @@ def __check_callees(self, parsed_yml, repository: Repository, env_rules): callee_wf = CacheManager().get_workflow(repository.name, callee) if not callee_wf: callee_wf = self.api.retrieve_workflow_yml(repository.name, callee) - callee_wf = WorkflowParser(callee_wf.workflow_contents, repository.name, callee) - self.temp_wf_cache.update({callee_wf.wf_name : callee_wf}) + + if callee_wf: + callee_wf = WorkflowParser(callee_wf.workflow_contents, repository.name, callee) + self.temp_wf_cache.update({callee_wf.wf_name : callee_wf}) if callee_wf: sub_injection = callee_wf.check_injection(bypass=True) @@ -114,6 +116,7 @@ def __perform_yml_enumeration(self, repository: Repository): list: List of workflows that execute on sh runner, empty otherwise. """ runner_wfs = [] + self.temp_wf_cache.clear() if CacheManager().is_repo_cached(repository.name): ymls = CacheManager().get_workflows(repository.name)