prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  CKV_DOCKER_10 mistakes quoted absolute paths for relative paths
  **Describe the issue**
  CKV_DOCKER_10 mistakes quoted absolute paths for relative paths.
  
  **Examples**
  ```
  cat << EOF > Dockerfile
  FROM alpine:3.16
  WORKDIR "/app"
  EOF
  
  checkov --check CKV_DOCKER_10 --file Dockerfile
  ```
  
  ![image](https://user-images.githubusercontent.com/64158840/194717605-6a503e7e-6f6f-45bf-80b4-77a901e91aff.png)
  
  **Version (please complete the following information):**
  2.1.258
  
  
  
  </issue>
  <code>
  [start of checkov/dockerfile/checks/WorkdirIsAbsolute.py]
  1 from __future__ import annotations
  2 
  3 import re
  4 
  5 from checkov.common.models.enums import CheckCategories, CheckResult
  6 from checkov.dockerfile.base_dockerfile_check import BaseDockerfileCheck
  7 
  8 ISABSOLUTE = re.compile("(^/[A-Za-z0-9-_+]*)|(^[A-Za-z0-9-_+]:\\\\.*)|(^\\$[{}A-Za-z0-9-_+].*)")
  9 
  10 
  11 class WorkdirIsAbsolute(BaseDockerfileCheck):
  12     def __init__(self) -> None:
  13         """
  14         For clarity and reliability, you should always use absolute paths for your WORKDIR.
  15         """
  16         name = "Ensure that WORKDIR values are absolute paths"
  17         id = "CKV_DOCKER_10"
  18         supported_instructions = ("WORKDIR",)
  19         categories = (CheckCategories.CONVENTION,)
  20         super().__init__(name=name, id=id, categories=categories, supported_instructions=supported_instructions)
  21 
  22     def scan_entity_conf(self, conf: list[dict[str, int | str]]) -> tuple[CheckResult, list[dict[str, int | str]] | None]:
  23         workdirs = []
  24         for workdir in conf:
  25             path = workdir["value"]
  26             if not re.match(ISABSOLUTE, path):
  27                 workdirs.append(workdir)
  28 
  29         if workdirs:
  30             return CheckResult.FAILED, workdirs
  31 
  32         return CheckResult.PASSED, None
  33 
  34 
  35 check = WorkdirIsAbsolute()
  36
  [end of checkov/dockerfile/checks/WorkdirIsAbsolute.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
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
  @@ -5,7 +5,7 @@
   from checkov.common.models.enums import CheckCategories, CheckResult
   from checkov.dockerfile.base_dockerfile_check import BaseDockerfileCheck
   
  -ISABSOLUTE = re.compile("(^/[A-Za-z0-9-_+]*)|(^[A-Za-z0-9-_+]:\\\\.*)|(^\\$[{}A-Za-z0-9-_+].*)")
  +ISABSOLUTE = re.compile("^\"?((/[A-Za-z0-9-_+]*)|([A-Za-z0-9-_+]:\\\\.*)|(\\$[{}A-Za-z0-9-_+].*))")
   
   
   class WorkdirIsAbsolute(BaseDockerfileCheck):
  
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@@ -5,7 +5,7 @@\n from checkov.common.models.enums import CheckCategories, CheckResult\n from checkov.dockerfile.base_dockerfile_check import BaseDockerfileCheck\n \n-ISABSOLUTE = re.compile(\"(^/[A-Za-z0-9-_+]*)|(^[A-Za-z0-9-_+]:\\\\\\\\.*)|(^\\\\$[{}A-Za-z0-9-_+].*)\")\n+ISABSOLUTE = re.compile(\"^\\\"?((/[A-Za-z0-9-_+]*)|([A-Za-z0-9-_+]:\\\\\\\\.*)|(\\\\$[{}A-Za-z0-9-_+].*))\")\n \n \n class WorkdirIsAbsolute(BaseDockerfileCheck):\n", "issue": "CKV_DOCKER_10 mistakes quoted absolute paths for relative paths\n**Describe the issue**\r\nCKV_DOCKER_10 mistakes quoted absolute paths for relative paths.\r\n\r\n**Examples**\r\n```\r\ncat << EOF > Dockerfile\r\nFROM alpine:3.16\r\nWORKDIR \"/app\"\r\nEOF\r\n\r\ncheckov --check CKV_DOCKER_10 --file Dockerfile\r\n```\r\n\r\n![image](https://user-images.githubusercontent.com/64158840/194717605-6a503e7e-6f6f-45bf-80b4-77a901e91aff.png)\r\n\r\n**Version (please complete the following information):**\r\n2.1.258\r\n\r\n\n", "before_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-Za-z0-9-_+]*)|(^[A-Za-z0-9-_+]:\\\\\\\\.*)|(^\\\\$[{}A-Za-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"}]}