prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  CKV_DOCKER_1 rule not failed when using EXPOSE 22/TCP
  **Issue**
  If it is related to an existing check, CKV_DOCKER_1.
  Dockerfile EXPOSE can accept port using tcp proto by defaut if not specified or you can also specify the protocol with /tcp or /udp.
  
  When using "EXPOSE 22/tcp" the rule does not detect the SSH port. something like '22/tcp'.split('/')[0] will return port without protocol or we can test both '22' or '22/tcp' in the rule.
  
  **Examples**
  Issue can be replicated with a Dockerfile which uses "EXPOSE 22/tcp".
  
  **Version**
   - Checkov Version 2.1.87
  
  **Specification**
  EXPOSE specification https://docs.docker.com/engine/reference/builder/#expose
  
  
  --- 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/ExposePort22.py`
  Content:
  ```
  1 from __future__ import annotations
  2 
  3 from typing import TYPE_CHECKING
  4 
  5 from checkov.common.models.enums import CheckCategories, CheckResult
  6 from checkov.dockerfile.base_dockerfile_check import BaseDockerfileCheck
  7 
  8 if TYPE_CHECKING:
  9     from dockerfile_parse.parser import _Instruction
  10 
  11 
  12 class ExposePort22(BaseDockerfileCheck):
  13     def __init__(self) -> None:
  14         name = "Ensure port 22 is not exposed"
  15         id = "CKV_DOCKER_1"
  16         supported_instructions = ("EXPOSE",)
  17         categories = (CheckCategories.NETWORKING,)
  18         super().__init__(name=name, id=id, categories=categories, supported_instructions=supported_instructions)
  19 
  20     def scan_resource_conf(self, conf: list[_Instruction]) -> tuple[CheckResult, list[_Instruction] | None]:
  21         for expose in conf:
  22             if "22" in expose["value"].split(" "):
  23                 return CheckResult.FAILED, [expose]
  24 
  25         return CheckResult.PASSED, None
  26 
  27 
  28 check = ExposePort22()
  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/ExposePort22.py b/checkov/dockerfile/checks/ExposePort22.py
  --- a/checkov/dockerfile/checks/ExposePort22.py
  +++ b/checkov/dockerfile/checks/ExposePort22.py
  @@ -19,7 +19,7 @@
   
       def scan_resource_conf(self, conf: list[_Instruction]) -> tuple[CheckResult, list[_Instruction] | None]:
           for expose in conf:
  -            if "22" in expose["value"].split(" "):
  +            if any(port in expose["value"].split(" ") for port in ("22", "22/tcp")):
                   return CheckResult.FAILED, [expose]
   
           return CheckResult.PASSED, None
  
verification_info: {"golden_diff": "diff --git a/checkov/dockerfile/checks/ExposePort22.py b/checkov/dockerfile/checks/ExposePort22.py\n--- a/checkov/dockerfile/checks/ExposePort22.py\n+++ b/checkov/dockerfile/checks/ExposePort22.py\n@@ -19,7 +19,7 @@\n \n     def scan_resource_conf(self, conf: list[_Instruction]) -> tuple[CheckResult, list[_Instruction] | None]:\n         for expose in conf:\n-            if \"22\" in expose[\"value\"].split(\" \"):\n+            if any(port in expose[\"value\"].split(\" \") for port in (\"22\", \"22/tcp\")):\n                 return CheckResult.FAILED, [expose]\n \n         return CheckResult.PASSED, None\n", "issue": "CKV_DOCKER_1 rule not failed when using EXPOSE 22/TCP\n**Issue**\r\nIf it is related to an existing check, CKV_DOCKER_1.\r\nDockerfile EXPOSE can accept port using tcp proto by defaut if not specified or you can also specify the protocol with /tcp or /udp.\r\n\r\nWhen using \"EXPOSE 22/tcp\" the rule does not detect the SSH port. something like '22/tcp'.split('/')[0] will return port without protocol or we can test both '22' or '22/tcp' in the rule.\r\n\r\n**Examples**\r\nIssue can be replicated with a Dockerfile which uses \"EXPOSE 22/tcp\".\r\n\r\n**Version**\r\n - Checkov Version 2.1.87\r\n\r\n**Specification**\r\nEXPOSE specification https://docs.docker.com/engine/reference/builder/#expose\r\n\n", "before_files": [{"content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING\n\nfrom checkov.common.models.enums import CheckCategories, CheckResult\nfrom checkov.dockerfile.base_dockerfile_check import BaseDockerfileCheck\n\nif TYPE_CHECKING:\n    from dockerfile_parse.parser import _Instruction\n\n\nclass ExposePort22(BaseDockerfileCheck):\n    def __init__(self) -> None:\n        name = \"Ensure port 22 is not exposed\"\n        id = \"CKV_DOCKER_1\"\n        supported_instructions = (\"EXPOSE\",)\n        categories = (CheckCategories.NETWORKING,)\n        super().__init__(name=name, id=id, categories=categories, supported_instructions=supported_instructions)\n\n    def scan_resource_conf(self, conf: list[_Instruction]) -> tuple[CheckResult, list[_Instruction] | None]:\n        for expose in conf:\n            if \"22\" in expose[\"value\"].split(\" \"):\n                return CheckResult.FAILED, [expose]\n\n        return CheckResult.PASSED, None\n\n\ncheck = ExposePort22()\n", "path": "checkov/dockerfile/checks/ExposePort22.py"}], "after_files": [{"content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING\n\nfrom checkov.common.models.enums import CheckCategories, CheckResult\nfrom checkov.dockerfile.base_dockerfile_check import BaseDockerfileCheck\n\nif TYPE_CHECKING:\n    from dockerfile_parse.parser import _Instruction\n\n\nclass ExposePort22(BaseDockerfileCheck):\n    def __init__(self) -> None:\n        name = \"Ensure port 22 is not exposed\"\n        id = \"CKV_DOCKER_1\"\n        supported_instructions = (\"EXPOSE\",)\n        categories = (CheckCategories.NETWORKING,)\n        super().__init__(name=name, id=id, categories=categories, supported_instructions=supported_instructions)\n\n    def scan_resource_conf(self, conf: list[_Instruction]) -> tuple[CheckResult, list[_Instruction] | None]:\n        for expose in conf:\n            if any(port in expose[\"value\"].split(\" \") for port in (\"22\", \"22/tcp\")):\n                return CheckResult.FAILED, [expose]\n\n        return CheckResult.PASSED, None\n\n\ncheck = ExposePort22()\n", "path": "checkov/dockerfile/checks/ExposePort22.py"}]}