prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  only caputring the first line https://github.com/bridgecrewio/checkov/blob/2.0.1131/checkov/dockerfile/checks/WorkdirIsAbsolute.py
  def scan_entity_conf(self, conf):
          for mydir in conf:
              mypath = mydir["value"]
              if re.match(PATH, mypath):
                  return CheckResult.FAILED, mydir
          return CheckResult.PASSED, None
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `checkov/dockerfile/checks/WorkdirIsAbsolute.py`
  Content:
  ```
  1 import re
  2 
  3 from checkov.common.models.enums import CheckCategories, CheckResult
  4 from checkov.dockerfile.base_dockerfile_check import BaseDockerfileCheck
  5 
  6 ISABSOLUTE = re.compile("(^/[A-z0-9-_+]*)|(^[A-z0-9-_+]:\\\\.*)|(^\\$[{}A-z0-9-_+].*)")
  7 
  8 
  9 class WorkdirIsAbsolute(BaseDockerfileCheck):
  10     def __init__(self):
  11         """
  12         For clarity and reliability, you should always use absolute paths for your WORKDIR.
  13         """
  14         name = "Ensure that WORKDIR values are absolute paths"
  15         id = "CKV_DOCKER_10"
  16         supported_instructions = ["WORKDIR"]
  17         categories = [CheckCategories.CONVENTION]
  18         super().__init__(name=name, id=id, categories=categories, supported_instructions=supported_instructions)
  19 
  20     def scan_entity_conf(self, conf):
  21         for mydir in conf:
  22             mypath = mydir["value"]
  23             if not re.match(ISABSOLUTE, mypath):
  24                 return CheckResult.FAILED, mydir
  25         return CheckResult.PASSED, None
  26 
  27 
  28 check = WorkdirIsAbsolute()
  29
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/checkov/dockerfile/checks/WorkdirIsAbsolute.py b/checkov/dockerfile/checks/WorkdirIsAbsolute.py
  --- a/checkov/dockerfile/checks/WorkdirIsAbsolute.py
  +++ b/checkov/dockerfile/checks/WorkdirIsAbsolute.py
  @@ -1,3 +1,5 @@
  +from __future__ import annotations
  +
   import re
   
   from checkov.common.models.enums import CheckCategories, CheckResult
  @@ -7,21 +9,26 @@
   
   
   class WorkdirIsAbsolute(BaseDockerfileCheck):
  -    def __init__(self):
  +    def __init__(self) -> None:
           """
           For clarity and reliability, you should always use absolute paths for your WORKDIR.
           """
           name = "Ensure that WORKDIR values are absolute paths"
           id = "CKV_DOCKER_10"
  -        supported_instructions = ["WORKDIR"]
  -        categories = [CheckCategories.CONVENTION]
  +        supported_instructions = ("WORKDIR",)
  +        categories = (CheckCategories.CONVENTION,)
           super().__init__(name=name, id=id, categories=categories, supported_instructions=supported_instructions)
   
  -    def scan_entity_conf(self, conf):
  -        for mydir in conf:
  -            mypath = mydir["value"]
  -            if not re.match(ISABSOLUTE, mypath):
  -                return CheckResult.FAILED, mydir
  +    def scan_entity_conf(self, conf: list[dict[str, int | str]]) -> tuple[CheckResult, list[dict[str, int | str]] | None]:
  +        workdirs = []
  +        for workdir in conf:
  +            path = workdir["value"]
  +            if not re.match(ISABSOLUTE, path):
  +                workdirs.append(workdir)
  +
  +        if workdirs:
  +            return CheckResult.FAILED, workdirs
  +
           return CheckResult.PASSED, None
  
verification_info: {"golden_diff": "diff --git a/checkov/dockerfile/checks/WorkdirIsAbsolute.py b/checkov/dockerfile/checks/WorkdirIsAbsolute.py\n--- a/checkov/dockerfile/checks/WorkdirIsAbsolute.py\n+++ b/checkov/dockerfile/checks/WorkdirIsAbsolute.py\n@@ -1,3 +1,5 @@\n+from __future__ import annotations\n+\n import re\n \n from checkov.common.models.enums import CheckCategories, CheckResult\n@@ -7,21 +9,26 @@\n \n \n class WorkdirIsAbsolute(BaseDockerfileCheck):\n-    def __init__(self):\n+    def __init__(self) -> None:\n         \"\"\"\n         For clarity and reliability, you should always use absolute paths for your WORKDIR.\n         \"\"\"\n         name = \"Ensure that WORKDIR values are absolute paths\"\n         id = \"CKV_DOCKER_10\"\n-        supported_instructions = [\"WORKDIR\"]\n-        categories = [CheckCategories.CONVENTION]\n+        supported_instructions = (\"WORKDIR\",)\n+        categories = (CheckCategories.CONVENTION,)\n         super().__init__(name=name, id=id, categories=categories, supported_instructions=supported_instructions)\n \n-    def scan_entity_conf(self, conf):\n-        for mydir in conf:\n-            mypath = mydir[\"value\"]\n-            if not re.match(ISABSOLUTE, mypath):\n-                return CheckResult.FAILED, mydir\n+    def scan_entity_conf(self, conf: list[dict[str, int | str]]) -> tuple[CheckResult, list[dict[str, int | str]] | None]:\n+        workdirs = []\n+        for workdir in conf:\n+            path = workdir[\"value\"]\n+            if not re.match(ISABSOLUTE, path):\n+                workdirs.append(workdir)\n+\n+        if workdirs:\n+            return CheckResult.FAILED, workdirs\n+\n         return CheckResult.PASSED, None\n", "issue": "only caputring the first line https://github.com/bridgecrewio/checkov/blob/2.0.1131/checkov/dockerfile/checks/WorkdirIsAbsolute.py\ndef scan_entity_conf(self, conf):\r\n        for mydir in conf:\r\n            mypath = mydir[\"value\"]\r\n            if re.match(PATH, mypath):\r\n                return CheckResult.FAILED, mydir\r\n        return CheckResult.PASSED, None\n", "before_files": [{"content": "import re\n\nfrom checkov.common.models.enums import CheckCategories, CheckResult\nfrom checkov.dockerfile.base_dockerfile_check import BaseDockerfileCheck\n\nISABSOLUTE = re.compile(\"(^/[A-z0-9-_+]*)|(^[A-z0-9-_+]:\\\\\\\\.*)|(^\\\\$[{}A-z0-9-_+].*)\")\n\n\nclass WorkdirIsAbsolute(BaseDockerfileCheck):\n    def __init__(self):\n        \"\"\"\n        For clarity and reliability, you should always use absolute paths for your WORKDIR.\n        \"\"\"\n        name = \"Ensure that WORKDIR values are absolute paths\"\n        id = \"CKV_DOCKER_10\"\n        supported_instructions = [\"WORKDIR\"]\n        categories = [CheckCategories.CONVENTION]\n        super().__init__(name=name, id=id, categories=categories, supported_instructions=supported_instructions)\n\n    def scan_entity_conf(self, conf):\n        for mydir in conf:\n            mypath = mydir[\"value\"]\n            if not re.match(ISABSOLUTE, mypath):\n                return CheckResult.FAILED, mydir\n        return CheckResult.PASSED, None\n\n\ncheck = WorkdirIsAbsolute()\n", "path": "checkov/dockerfile/checks/WorkdirIsAbsolute.py"}], "after_files": [{"content": "from __future__ import annotations\n\nimport re\n\nfrom checkov.common.models.enums import CheckCategories, CheckResult\nfrom checkov.dockerfile.base_dockerfile_check import BaseDockerfileCheck\n\nISABSOLUTE = re.compile(\"(^/[A-z0-9-_+]*)|(^[A-z0-9-_+]:\\\\\\\\.*)|(^\\\\$[{}A-z0-9-_+].*)\")\n\n\nclass WorkdirIsAbsolute(BaseDockerfileCheck):\n    def __init__(self) -> None:\n        \"\"\"\n        For clarity and reliability, you should always use absolute paths for your WORKDIR.\n        \"\"\"\n        name = \"Ensure that WORKDIR values are absolute paths\"\n        id = \"CKV_DOCKER_10\"\n        supported_instructions = (\"WORKDIR\",)\n        categories = (CheckCategories.CONVENTION,)\n        super().__init__(name=name, id=id, categories=categories, supported_instructions=supported_instructions)\n\n    def scan_entity_conf(self, conf: list[dict[str, int | str]]) -> tuple[CheckResult, list[dict[str, int | str]] | None]:\n        workdirs = []\n        for workdir in conf:\n            path = workdir[\"value\"]\n            if not re.match(ISABSOLUTE, path):\n                workdirs.append(workdir)\n\n        if workdirs:\n            return CheckResult.FAILED, workdirs\n\n        return CheckResult.PASSED, None\n\n\ncheck = WorkdirIsAbsolute()\n", "path": "checkov/dockerfile/checks/WorkdirIsAbsolute.py"}]}