From e5d9ed0a5791f92a8fe054f42657d0e65837902d Mon Sep 17 00:00:00 2001 From: Omri Yoffe Date: Tue, 17 Dec 2024 10:50:40 +0200 Subject: [PATCH 1/2] check attribute is string --- checkov/serverless/graph_builder/local_graph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/checkov/serverless/graph_builder/local_graph.py b/checkov/serverless/graph_builder/local_graph.py index 6601f4bca5a..2cd90746b03 100644 --- a/checkov/serverless/graph_builder/local_graph.py +++ b/checkov/serverless/graph_builder/local_graph.py @@ -59,7 +59,7 @@ def _create_vertex(self, file_path: str, definition: dict[str, Any] | None, else: for attribute in resources: - if attribute in LINE_FIELD_NAMES: + if isinstance(attribute, str) and attribute in LINE_FIELD_NAMES: continue if isinstance(resources, list): From 25d571502beb0a2e98b3a47384eee77b7ffb0409 Mon Sep 17 00:00:00 2001 From: Omri Yoffe Date: Tue, 17 Dec 2024 12:03:16 +0200 Subject: [PATCH 2/2] remove secrets --- .../resource/example_TestMySQLPublicAccessDisabled/fail2.json | 2 +- .../resource/example_TestMySQLPublicAccessDisabled/pass2.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/arm/checks/resource/example_TestMySQLPublicAccessDisabled/fail2.json b/tests/arm/checks/resource/example_TestMySQLPublicAccessDisabled/fail2.json index fa88ce13028..73780d243ef 100644 --- a/tests/arm/checks/resource/example_TestMySQLPublicAccessDisabled/fail2.json +++ b/tests/arm/checks/resource/example_TestMySQLPublicAccessDisabled/fail2.json @@ -15,7 +15,7 @@ "location": "eastus", "properties": { "administratorLogin": "adminuser", - "administratorLoginPassword": "YourSecurePassword123!", + "administratorLoginPassword": "1234", "availabilityZone": "1", "backup": { "backupIntervalHours": 24, diff --git a/tests/arm/checks/resource/example_TestMySQLPublicAccessDisabled/pass2.json b/tests/arm/checks/resource/example_TestMySQLPublicAccessDisabled/pass2.json index d3446b6b07d..a506b7eb7f3 100644 --- a/tests/arm/checks/resource/example_TestMySQLPublicAccessDisabled/pass2.json +++ b/tests/arm/checks/resource/example_TestMySQLPublicAccessDisabled/pass2.json @@ -15,7 +15,7 @@ "location": "eastus", "properties": { "administratorLogin": "adminuser", - "administratorLoginPassword": "YourSecurePassword123!", + "administratorLoginPassword": "1234", "availabilityZone": "1", "backup": { "backupIntervalHours": 24,