Repository: bridgecrewio/checkov

Issue:
CKV_ARGO_1 / CKV_ARGO_2 - false positives for kinds Application / ApplicationSet / AppProject
**Describe the issue**
CKV_ARGO_1 / CKV_ARGO_2 checks trigger false positives for argocd kinds Application / ApplicationSet / AppProject

**Examples**
```yaml
# AppProject
---
apiVersion: argoproj.io/v1alpha1
kind: AppProject
metadata:
  name: default
spec:
  clusterResourceWhitelist:
    - group: "*"
      kind: "*"
  destinations:
    - namespace: "*"
      server: "*"
  sourceRepos:
    - "*"
```
```yaml
# Application
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: cert-manager
spec:
  destination:
    namespace: cert-manager
    server: https://kubernetes.default.svc
  project: default
  source:
    chart: cert-manager
    helm:
      values: |
        installCRDs: true

        prometheus:
          enabled: false

    repoURL: https://charts.jetstack.io
    targetRevision: v1.9.0
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true
```
```yaml
# ApplicationSet
---
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: cert-manager
spec:
  generators:
    - matrix:
        generators:
          - list:
              elements:
                - env: dev
                - env: qa
                - env: preprod
                - env: demo
                - env: training
  template:
    metadata:
      name: "cert-manager-{{env}}"
    spec:
      project: "{{env}}"
      source:
        chart: cert-manager
        helm:
          values: |
            installCRDs: true

            prometheus:
              enabled: false

        repoURL: https://charts.jetstack.io
        targetRevision: v1.9.0
      destination:
        namespace: "cert-manager-{{env}}"
        server: https://kubernetes.default.svc
```

**Version (please complete the following information):**
 - 2.1.207
 



Discussion:

Resolving patch:
diff --git a/checkov/argo_workflows/runner.py b/checkov/argo_workflows/runner.py
--- a/checkov/argo_workflows/runner.py
+++ b/checkov/argo_workflows/runner.py
@@ -15,6 +15,7 @@
     from checkov.common.checks.base_check_registry import BaseCheckRegistry
 
 API_VERSION_PATTERN = re.compile(r"^apiVersion:\s*argoproj.io/", re.MULTILINE)
+KIND_PATTERN = re.compile(r"^kind:\s*Workflow", re.MULTILINE)
 
 
 class Runner(YamlRunner, ImageReferencer):
@@ -44,9 +45,12 @@ def _get_workflow_file_content(self, file_path: str) -> str | None:
             return None
 
         content = Path(file_path).read_text()
-        match = re.search(API_VERSION_PATTERN, content)
-        if match:
-            return content
+        match_api = re.search(API_VERSION_PATTERN, content)
+        if match_api:
+            match_kind = re.search(KIND_PATTERN, content)
+            if match_kind:
+                # only scan Argo Workflows
+                return content
 
         return None
 


Test patch:
diff --git a/tests/argo_workflows/examples/argo_cd_application.yaml b/tests/argo_workflows/examples/argo_cd_application.yaml
new file mode 100644
--- /dev/null
+++ b/tests/argo_workflows/examples/argo_cd_application.yaml
@@ -0,0 +1,14 @@
+apiVersion: argoproj.io/v1alpha1
+kind: Application
+metadata:
+  name: guestbook
+  namespace: argocd
+spec:
+  project: default
+  source:
+    repoURL: https://github.com/argoproj/argocd-example-apps.git
+    targetRevision: HEAD
+    path: guestbook
+  destination:
+    server: https://kubernetes.default.svc
+    namespace: guestbook
diff --git a/tests/argo_workflows/test_runner.py b/tests/argo_workflows/test_runner.py
--- a/tests/argo_workflows/test_runner.py
+++ b/tests/argo_workflows/test_runner.py
@@ -1,7 +1,5 @@
 from pathlib import Path
 
-from pytest_mock import MockerFixture
-
 from checkov.argo_workflows.runner import Runner
 from checkov.common.bridgecrew.check_type import CheckType
 from checkov.common.bridgecrew.severities import Severities, BcSeverities
@@ -68,6 +66,23 @@ def test_runner_failing_check():
     assert summary["parsing_errors"] == 0
 
 
+def test_runner_ignore_argo_cd():
+    # given
+    test_file = EXAMPLES_DIR / "argo_cd_application.yaml"
+
+    # when
+    report = Runner().run(root_folder="", files=[str(test_file)], runner_filter=RunnerFilter())
+
+    # then
+    summary = report.get_summary()
+
+    assert summary["passed"] == 0
+    assert summary["failed"] == 0
+    assert summary["skipped"] == 0
+    assert summary["parsing_errors"] == 0
+    assert summary["resource_count"] == 0
+
+
 def test_get_image():
     # given
     test_file = EXAMPLES_DIR / "scripts_python.yaml"