fix(aws): codebuild service threw KeyError for projects type CODEPIPELINE (#6930)

Co-authored-by: Kay Agahd <kagahd@users.noreply.github.com>
This commit is contained in:
Prowler Bot
2025-02-13 19:53:05 +01:00
committed by GitHub
parent ee534a740e
commit 5020e4713c
@@ -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", {})