Northy1717/SWE-bench-Live huggingface dataset:
Repository: bridgecrewio/checkov

Issue:
CKV_GCP_79: Update latest Major Postgres version to 16
**Describe the issue**
CKV_GCP_79: "Ensure SQL database is using latest Major version" is outdated now that Postgres 16 is available on GCP. We should update this rule to ensure it checks for Postgres 16 instead of 15.

**Examples**
This triggers check CKV_GCP_79:
```terraform
resource "google_sql_database_instance" "default" {
  database_version = "POSTGRES_16"
```
when it should pass the check.

https://github.com/bridgecrewio/checkov/blob/91932f8c23eae0eaf9fd2b705a936c06c45185c5/checkov/terraform/checks/resource/gcp/CloudSqlMajorVersion.py#L17 should be updated to `"POSTGRES_16"`


**Version (please complete the following information):**
 - Checkov Docker image version 3.2.238


Discussion:
@lucaspierru-convelio thanks for the comment, would you want to open a PR to add this behavior?



Patch:
diff --git a/checkov/terraform/checks/resource/gcp/CloudSqlMajorVersion.py b/checkov/terraform/checks/resource/gcp/CloudSqlMajorVersion.py
index 4df7105ccd..59734da0f8 100644
--- a/checkov/terraform/checks/resource/gcp/CloudSqlMajorVersion.py
+++ b/checkov/terraform/checks/resource/gcp/CloudSqlMajorVersion.py
@@ -14,7 +14,7 @@ def get_inspected_key(self):
         return 'database_version'
 
     def get_expected_values(self):
-        return ["POSTGRES_15", "MYSQL_8_0", "SQLSERVER_2022_STANDARD", "SQLSERVER_2022_WEB",
+        return ["POSTGRES_16", "MYSQL_8_0", "SQLSERVER_2022_STANDARD", "SQLSERVER_2022_WEB",
                 "SQLSERVER_2022_ENTERPRISE", "SQLSERVER_2022_EXPRESS"]
 
 


Test patch:
diff --git a/tests/terraform/checks/resource/gcp/example_CloudSqlMajorVersion/main.tf b/tests/terraform/checks/resource/gcp/example_CloudSqlMajorVersion/main.tf
index 431cf323c6..5e1f061df9 100644
--- a/tests/terraform/checks/resource/gcp/example_CloudSqlMajorVersion/main.tf
+++ b/tests/terraform/checks/resource/gcp/example_CloudSqlMajorVersion/main.tf
@@ -94,7 +94,7 @@ resource "google_sql_database_instance" "fail2" {
 }
 
 resource "google_sql_database_instance" "pass2" {
-  database_version = "POSTGRES_15"
+  database_version = "POSTGRES_16"
   name             = "general-pos121"
   project          = "gcp-bridgecrew-deployment"
   region           = "us-central1"
Repository: aws-cloudformation/cfn-lint

Issue:
[BUG] v0 fails for bad mapping but not v1
### CloudFormation Lint Version

cfn-lint 1.8.2

### What operating system are you using?

Mac

### Describe the bug

Create a CFT like

```
Mappings:
  qa:
    global:
      global:
      subnet: abc123
```

cfn-lint v0 fails for `E7001     Mapping qa has invalid property at global`
cfn-lint v1 passes


### Expected behavior

V1 should fail like V0 did

### Reproduction template


```
Mappings:
  qa:
    global:
      global:
      subnet: abc123
```


Discussion:

Patch:
diff --git a/src/cfnlint/jsonschema/_keywords_cfn.py b/src/cfnlint/jsonschema/_keywords_cfn.py
index 95851220ec..65bfe9f73b 100644
--- a/src/cfnlint/jsonschema/_keywords_cfn.py
+++ b/src/cfnlint/jsonschema/_keywords_cfn.py
@@ -85,7 +85,7 @@ def validate(
 # Type checks
 #####
 def _raw_type(validator: Validator, tS: Any, instance: Any) -> bool:
-    if tS in ["object", "array"]:
+    if tS in ["object", "array", "null"] or validator.is_type(instance, "null"):
         return validator.is_type(instance, tS)
     if "string" == tS:
         if validator.is_type(instance, "object") or validator.is_type(


Test patch:
diff --git a/test/unit/module/jsonschema/test_keywords_cfn.py b/test/unit/module/jsonschema/test_keywords_cfn.py
index 312f196f9d..6d088e848c 100644
--- a/test/unit/module/jsonschema/test_keywords_cfn.py
+++ b/test/unit/module/jsonschema/test_keywords_cfn.py
@@ -101,6 +101,32 @@ def test_standard_values(self):
         self.build_execute_tests(True, ["string", "boolean"])
         self.build_execute_tests("true", ["string", "boolean"])
 
+    def test_null_values(self):
+        self.message_errors(
+            "Null value with string type",
+            None,
+            ["None is not of type 'string'"],
+            {"type": "string"},
+        )
+        self.message_errors(
+            "String value with null type",
+            "foo",
+            ["'foo' is not of type 'null'"],
+            {"type": "null"},
+        )
+        self.message_errors(
+            "Object value with null type",
+            {},
+            ["{} is not of type 'null'"],
+            {"type": "null"},
+        )
+        self.message_errors(
+            "None value with multiple types",
+            None,
+            [],
+            {"type": ["string", "null"]},
+        )
+
 
 class TestMultiCfnTypes(Base):
     def build_execute_tests(self, instance, supported_types, unsupported_type) -> None:
Repository: keras-team/keras

Issue:
SVD operation failed when compute_uv=False (TF backend)
### Problem raised

TensorFlow `tf.linalg.svd()` with compute_uv=False returns a single tensor containing the singular values, and not three tensors "s, u, v" when compute_uv=True.
However, code line 188 in `keras/src/backend/tensorflow/linalg.py` always expects three returned tensors, even if only one is expected when compute_uv=False. It raises a ValueError: not enough values to unpack.
https://github.com/keras-team/keras/blob/6abd865eaa1af31d8fc60a573992a9e75f570bb8/keras/src/backend/tensorflow/linalg.py#L188)

### Tested versions:

- Keras 3.4.1
- TensorFlow 2.17.0

### Code to reproduce:

```python
import keras
keras.ops.svd([[1.0, 0.0], [2.0, 0.0]], compute_uv=False)
```


Discussion:
Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSdHag0RVFS7UXzZkKcsFCKOcX8raCupKK9RHSlYxp5U8lSJbQ/viewform?entry.492125872=Yes&entry.243948740=https://github.com/keras-team/keras/issues/20094">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSdHag0RVFS7UXzZkKcsFCKOcX8raCupKK9RHSlYxp5U8lSJbQ/viewform?entry.492125872=No&entry.243948740=https://github.com/keras-team/keras/issues/20094">No</a>




Patch:
diff --git a/keras/src/backend/tensorflow/linalg.py b/keras/src/backend/tensorflow/linalg.py
index 636586d144a4..2813303a4c4a 100644
--- a/keras/src/backend/tensorflow/linalg.py
+++ b/keras/src/backend/tensorflow/linalg.py
@@ -185,6 +185,8 @@ def solve_triangular(a, b, lower=False):
 
 
 def svd(x, full_matrices=True, compute_uv=True):
+    if compute_uv is False:
+        return tf.linalg.svd(x, full_matrices=full_matrices, compute_uv=False)
     s, u, v = tf.linalg.svd(
         x, full_matrices=full_matrices, compute_uv=compute_uv
     )
diff --git a/keras/src/backend/torch/linalg.py b/keras/src/backend/torch/linalg.py
index 17a710867384..7bd2a5a0579d 100644
--- a/keras/src/backend/torch/linalg.py
+++ b/keras/src/backend/torch/linalg.py
@@ -68,9 +68,7 @@ def solve_triangular(a, b, lower=False):
 
 def svd(x, full_matrices=True, compute_uv=True):
     if not compute_uv:
-        raise NotImplementedError(
-            "`compute_uv=False` is not supported for torch backend."
-        )
+        return torch.linalg.svdvals(x)
     return torch.linalg.svd(x, full_matrices=full_matrices)
 
 


Test patch:
diff --git a/keras/src/ops/linalg_test.py b/keras/src/ops/linalg_test.py
index bc04ab0b0d26..8e722dd4125b 100644
--- a/keras/src/ops/linalg_test.py
+++ b/keras/src/ops/linalg_test.py
@@ -534,6 +534,10 @@ def test_svd(self):
         # High tolerance due to numerical instability
         self.assertAllClose(x_reconstructed, x, atol=1e-3)
 
+        # Test `compute_uv=False`
+        s_no_uv = linalg.svd(x, compute_uv=False)
+        self.assertAllClose(s_no_uv, s)
+
     @parameterized.named_parameters(
         ("b_rank_1", 1, None),
         ("b_rank_2", 2, None),