From 5020e4713cb3ceb1f004c170bd1841edf1f5934b Mon Sep 17 00:00:00 2001 From: Prowler Bot Date: Thu, 13 Feb 2025 19:53:05 +0100 Subject: [PATCH] fix(aws): codebuild service threw KeyError for projects type CODEPIPELINE (#6930) Co-authored-by: Kay Agahd --- .../providers/aws/services/codebuild/codebuild_service.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/prowler/providers/aws/services/codebuild/codebuild_service.py b/prowler/providers/aws/services/codebuild/codebuild_service.py index 1ed4226586..a1e00790bb 100644 --- a/prowler/providers/aws/services/codebuild/codebuild_service.py +++ b/prowler/providers/aws/services/codebuild/codebuild_service.py @@ -84,12 +84,13 @@ class Codebuild(AWSService): if project_info["source"]["type"] != "NO_SOURCE": project.source = Source( type=project_info["source"]["type"], - location=project_info["source"]["location"], + location=project_info["source"].get("location", ""), ) project.secondary_sources = [] for secondary_source in project_info.get("secondarySources", []): source_obj = Source( - type=secondary_source["type"], location=secondary_source["location"] + type=secondary_source["type"], + location=secondary_source.get("location", ""), ) project.secondary_sources.append(source_obj) environment = project_info.get("environment", {})