From 4a2858388b64fa5fc1b83c672e6581aa5fee0e83 Mon Sep 17 00:00:00 2001 From: erezrokah Date: Fri, 24 Nov 2023 14:34:15 +0000 Subject: [PATCH] chore: Reorganize k8s --- ...mations_azure_compliance_free_postgres.yml | 2 +- ...ions_azure_compliance_premium_postgres.yml | 2 +- ...rmations_k8s_compliance_free_postgres.yml} | 24 +++--- ...ations_k8s_compliance_premium_postgres.yml | 61 ++++++++++++++ release-please-config-free.json | 4 - release-please-config-premium.json | 4 - scripts/dbt-pack/README.md | 3 + scripts/dbt-pack/src/index.js | 6 +- .../azure/compliance-free/tests/azure.yml | 8 -- .../azure/compliance-free/tests/pg.yml | 9 --- .../azure/compliance-free/tests/spec.yml | 18 +++++ .../compliance-free/CHANGELOG.md} | 0 .../compliance-free/README.md} | 0 .../compliance-free}/analyses/.gitkeep | 0 .../compliance-free}/dbt_project.yml | 4 +- .../compliance-free}/gen-files.py | 0 .../compliance-free/manifest.json} | 2 +- .../models}/k8s_compliance__cis_v1_7_free.sql | 0 .../k8s_compliance__nsa_cisa_v1_free.sql | 0 .../compliance-free}/requirements.txt | 0 .../compliance-free}/seeds/.gitkeep | 0 .../compliance-free}/snapshots/.gitkeep | 0 .../compliance-free}/tests/profiles.yml | 0 .../compliance-free}/tests/spec.yml | 7 +- .../compliance-premium/CHANGELOG.md} | 0 .../compliance-premium/README.md} | 0 .../k8s/compliance-premium/analyses/.gitkeep | 0 .../k8s/compliance-premium/dbt_project.yml | 40 ++++++++++ .../k8s/compliance-premium/gen-files.py | 80 +++++++++++++++++++ .../compliance-premium/manifest.json} | 2 +- .../models}/k8s_compliance__cis_v1_7.sql | 0 .../models}/k8s_compliance__nsa_cisa_v1.sql | 0 .../k8s/compliance-premium/requirements.txt | 1 + .../k8s/compliance-premium/seeds/.gitkeep | 0 .../k8s/compliance-premium/snapshots/.gitkeep | 0 .../k8s/compliance-premium/tests/profiles.yml | 12 +++ .../k8s/compliance-premium/tests/spec.yml | 21 +++++ .../macros}/api_server/api_server_1_2_1.sql | 0 .../macros}/api_server/api_server_1_2_10.sql | 0 .../macros}/api_server/api_server_1_2_11.sql | 0 .../macros}/api_server/api_server_1_2_12.sql | 0 .../macros}/api_server/api_server_1_2_13.sql | 0 .../macros}/api_server/api_server_1_2_14.sql | 0 .../macros}/api_server/api_server_1_2_15.sql | 0 .../macros}/api_server/api_server_1_2_16.sql | 0 .../macros}/api_server/api_server_1_2_17.sql | 0 .../macros}/api_server/api_server_1_2_18.sql | 0 .../macros}/api_server/api_server_1_2_19.sql | 0 .../macros}/api_server/api_server_1_2_2.sql | 0 .../macros}/api_server/api_server_1_2_20.sql | 0 .../macros}/api_server/api_server_1_2_21.sql | 0 .../macros}/api_server/api_server_1_2_22.sql | 0 .../macros}/api_server/api_server_1_2_23.sql | 0 .../macros}/api_server/api_server_1_2_24.sql | 0 .../macros}/api_server/api_server_1_2_25.sql | 0 .../macros}/api_server/api_server_1_2_26.sql | 0 .../macros}/api_server/api_server_1_2_27.sql | 0 .../macros}/api_server/api_server_1_2_28.sql | 0 .../macros}/api_server/api_server_1_2_29.sql | 0 .../macros}/api_server/api_server_1_2_3.sql | 0 .../macros}/api_server/api_server_1_2_30.sql | 0 .../macros}/api_server/api_server_1_2_31.sql | 0 .../macros}/api_server/api_server_1_2_4.sql | 0 .../macros}/api_server/api_server_1_2_5.sql | 0 .../macros}/api_server/api_server_1_2_6.sql | 0 .../macros}/api_server/api_server_1_2_7.sql | 0 .../macros}/api_server/api_server_1_2_8.sql | 0 .../macros}/api_server/api_server_1_2_9.sql | 0 .../controller_manager_1_3_1.sql | 0 .../controller_manager_1_3_2.sql | 0 .../controller_manager_1_3_3.sql | 0 .../controller_manager_1_3_4.sql | 0 .../controller_manager_1_3_5.sql | 0 .../controller_manager_1_3_6.sql | 0 .../controller_manager_1_3_7.sql | 0 .../pro => k8s/macros}/etcd/etcd_2_1.sql | 0 .../pro => k8s/macros}/etcd/etcd_2_2.sql | 0 .../pro => k8s/macros}/etcd/etcd_2_3.sql | 0 .../pro => k8s/macros}/etcd/etcd_2_4.sql | 0 .../pro => k8s/macros}/etcd/etcd_2_5.sql | 0 .../pro => k8s/macros}/etcd/etcd_2_6.sql | 0 .../pod_security_standards_5_7_2.sql | 0 .../pod_security_standards_5_7_3.sql | 0 .../pod_security_standards_5_7_4.sql | 0 .../macros}/logging/logging_3_2_1.sql | 0 .../network_hardening/daemonset_cpu_limit.sql | 0 .../daemonset_cpu_request.sql | 0 .../daemonset_memory_limit.sql | 0 .../daemonset_memory_request.sql | 0 .../deployment_cpu_limit.sql | 0 .../deployment_cpu_request.sql | 0 .../deployment_memory_limit.sql | 0 .../deployment_memory_request.sql | 0 .../network_hardening/job_cpu_limit.sql | 0 .../network_hardening/job_cpu_request.sql | 0 .../network_hardening/job_memory_limit.sql | 0 .../network_hardening/job_memory_request.sql | 0 ...amespace_limit_range_default_cpu_limit.sql | 0 ...espace_limit_range_default_cpu_request.sql | 0 ...space_limit_range_default_memory_limit.sql | 0 ...ace_limit_range_default_memory_request.sql | 0 .../namespace_resource_quota_cpu_limit.sql | 0 .../namespace_resource_quota_cpu_request.sql | 0 .../namespace_resource_quota_memory_limit.sql | 0 ...amespace_resource_quota_memory_request.sql | 0 .../network_policy_default_deny_egress.sql | 0 .../network_policy_default_deny_ingress.sql | 0 .../replicaset_cpu_limit.sql | 0 .../replicaset_cpu_request.sql | 0 .../replicaset_memory_limit.sql | 0 .../replicaset_memory_request.sql | 0 .../pod_security_standards_5_3_2.sql | 0 ...daemonset_container_privilege_disabled.sql | 0 ...ontainer_privilege_escalation_disabled.sql | 0 ...daemonset_host_network_access_disabled.sql | 0 ...onset_hostpid_hostipc_sharing_disabled.sql | 0 ...emonset_immutable_container_filesystem.sql | 0 .../daemonset_non_root_container.sql | 0 ...eployment_container_privilege_disabled.sql | 0 ...ontainer_privilege_escalation_disabled.sql | 0 ...eployment_host_network_access_disabled.sql | 0 ...yment_hostpid_hostipc_sharing_disabled.sql | 0 ...loyment_immutable_container_filesystem.sql | 0 .../deployment_non_root_container.sql | 0 .../job_container_privilege_disabled.sql | 0 ...ontainer_privilege_escalation_disabled.sql | 0 .../job_host_network_access_disabled.sql | 0 .../job_hostpid_hostipc_sharing_disabled.sql | 0 .../job_immutable_container_filesystem.sql | 0 .../pod_security/job_non_root_container.sql | 0 .../pod_container_privilege_disabled.sql | 0 ...ontainer_privilege_escalation_disabled.sql | 0 .../pod_host_network_access_disabled.sql | 0 .../pod_hostpid_hostipc_sharing_disabled.sql | 0 .../pod_immutable_container_filesystem.sql | 0 .../pod_security/pod_non_root_container.sql | 0 .../pod_service_account_token_disabled.sql | 0 .../pod_security/pod_volume_host_path.sql | 0 ...eplicaset_container_privilege_disabled.sql | 0 ...ontainer_privilege_escalation_disabled.sql | 0 ...eplicaset_host_network_access_disabled.sql | 0 ...caset_hostpid_hostipc_sharing_disabled.sql | 0 ...licaset_immutable_container_filesystem.sql | 0 .../replicaset_non_root_container.sql | 0 .../service_account_token_disabled.sql | 0 .../pod_security_standards_5_2_10.sql | 0 .../pod_security_standards_5_2_11.sql | 0 .../pod_security_standards_5_2_12.sql | 0 .../pod_security_standards_5_2_13.sql | 0 .../pod_security_standards_5_2_2.sql | 0 .../pod_security_standards_5_2_3.sql | 0 .../pod_security_standards_5_2_4.sql | 0 .../pod_security_standards_5_2_5.sql | 0 .../pod_security_standards_5_2_6.sql | 0 .../pod_security_standards_5_2_8.sql | 0 .../pod_security_standards_5_2_9.sql | 0 .../rbac_and_service_accounts_5_1_1.sql | 0 .../rbac_and_service_accounts_5_1_10.sql | 0 .../rbac_and_service_accounts_5_1_11.sql | 0 .../rbac_and_service_accounts_5_1_12.sql | 0 .../rbac_and_service_accounts_5_1_13.sql | 0 .../rbac_and_service_accounts_5_1_2.sql | 0 .../rbac_and_service_accounts_5_1_3.sql | 0 .../rbac_and_service_accounts_5_1_4.sql | 0 .../rbac_and_service_accounts_5_1_5.sql | 0 .../rbac_and_service_accounts_5_1_6.sql | 0 .../rbac_and_service_accounts_5_1_7.sql | 0 .../rbac_and_service_accounts_5_1_8.sql | 0 .../rbac_and_service_accounts_5_1_9.sql | 0 .../macros}/scheduler/scheduler_1_4_1.sql | 0 .../macros}/scheduler/scheduler_1_4_2.sql | 0 .../pod_security_standards_5_4_1.sql | 0 .../pod_security_standards_5_4_2.sql | 0 transformations/k8s_compliance/Makefile | 25 ------ transformations/k8s_compliance/packages.yml | 2 - 175 files changed, 262 insertions(+), 75 deletions(-) rename .github/workflows/{transformations_k8s_compliance.yml => transformations_k8s_compliance_free_postgres.yml} (64%) create mode 100644 .github/workflows/transformations_k8s_compliance_premium_postgres.yml delete mode 100644 transformations/azure/compliance-free/tests/azure.yml delete mode 100644 transformations/azure/compliance-free/tests/pg.yml create mode 100644 transformations/azure/compliance-free/tests/spec.yml rename transformations/{k8s_compliance/CHANGELOG-free.md => k8s/compliance-free/CHANGELOG.md} (100%) rename transformations/{k8s_compliance/README-free.md => k8s/compliance-free/README.md} (100%) rename transformations/{k8s_compliance => k8s/compliance-free}/analyses/.gitkeep (100%) rename transformations/{k8s_compliance => k8s/compliance-free}/dbt_project.yml (94%) rename transformations/{k8s_compliance => k8s/compliance-free}/gen-files.py (100%) rename transformations/{k8s_compliance/manifest-free.json => k8s/compliance-free/manifest.json} (91%) rename transformations/{k8s_compliance/models/free => k8s/compliance-free/models}/k8s_compliance__cis_v1_7_free.sql (100%) rename transformations/{k8s_compliance/models/free => k8s/compliance-free/models}/k8s_compliance__nsa_cisa_v1_free.sql (100%) rename transformations/{k8s_compliance => k8s/compliance-free}/requirements.txt (100%) rename transformations/{k8s_compliance => k8s/compliance-free}/seeds/.gitkeep (100%) rename transformations/{k8s_compliance => k8s/compliance-free}/snapshots/.gitkeep (100%) rename transformations/{k8s_compliance => k8s/compliance-free}/tests/profiles.yml (100%) rename transformations/{k8s_compliance => k8s/compliance-free}/tests/spec.yml (66%) rename transformations/{k8s_compliance/CHANGELOG-premium.md => k8s/compliance-premium/CHANGELOG.md} (100%) rename transformations/{k8s_compliance/README-premium.md => k8s/compliance-premium/README.md} (100%) create mode 100644 transformations/k8s/compliance-premium/analyses/.gitkeep create mode 100644 transformations/k8s/compliance-premium/dbt_project.yml create mode 100644 transformations/k8s/compliance-premium/gen-files.py rename transformations/{k8s_compliance/manifest-premium.json => k8s/compliance-premium/manifest.json} (91%) rename transformations/{k8s_compliance/models/pro => k8s/compliance-premium/models}/k8s_compliance__cis_v1_7.sql (100%) rename transformations/{k8s_compliance/models/pro => k8s/compliance-premium/models}/k8s_compliance__nsa_cisa_v1.sql (100%) create mode 100644 transformations/k8s/compliance-premium/requirements.txt create mode 100644 transformations/k8s/compliance-premium/seeds/.gitkeep create mode 100644 transformations/k8s/compliance-premium/snapshots/.gitkeep create mode 100644 transformations/k8s/compliance-premium/tests/profiles.yml create mode 100644 transformations/k8s/compliance-premium/tests/spec.yml rename transformations/{k8s_compliance/macros/free => k8s/macros}/api_server/api_server_1_2_1.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/api_server/api_server_1_2_10.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/api_server/api_server_1_2_11.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/api_server/api_server_1_2_12.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/api_server/api_server_1_2_13.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/api_server/api_server_1_2_14.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/api_server/api_server_1_2_15.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/api_server/api_server_1_2_16.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/api_server/api_server_1_2_17.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/api_server/api_server_1_2_18.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/api_server/api_server_1_2_19.sql (100%) rename transformations/{k8s_compliance/macros/free => k8s/macros}/api_server/api_server_1_2_2.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/api_server/api_server_1_2_20.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/api_server/api_server_1_2_21.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/api_server/api_server_1_2_22.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/api_server/api_server_1_2_23.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/api_server/api_server_1_2_24.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/api_server/api_server_1_2_25.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/api_server/api_server_1_2_26.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/api_server/api_server_1_2_27.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/api_server/api_server_1_2_28.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/api_server/api_server_1_2_29.sql (100%) rename transformations/{k8s_compliance/macros/free => k8s/macros}/api_server/api_server_1_2_3.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/api_server/api_server_1_2_30.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/api_server/api_server_1_2_31.sql (100%) rename transformations/{k8s_compliance/macros/free => k8s/macros}/api_server/api_server_1_2_4.sql (100%) rename transformations/{k8s_compliance/macros/free => k8s/macros}/api_server/api_server_1_2_5.sql (100%) rename transformations/{k8s_compliance/macros/free => k8s/macros}/api_server/api_server_1_2_6.sql (100%) rename transformations/{k8s_compliance/macros/free => k8s/macros}/api_server/api_server_1_2_7.sql (100%) rename transformations/{k8s_compliance/macros/free => k8s/macros}/api_server/api_server_1_2_8.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/api_server/api_server_1_2_9.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/controller_manager/controller_manager_1_3_1.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/controller_manager/controller_manager_1_3_2.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/controller_manager/controller_manager_1_3_3.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/controller_manager/controller_manager_1_3_4.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/controller_manager/controller_manager_1_3_5.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/controller_manager/controller_manager_1_3_6.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/controller_manager/controller_manager_1_3_7.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/etcd/etcd_2_1.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/etcd/etcd_2_2.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/etcd/etcd_2_3.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/etcd/etcd_2_4.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/etcd/etcd_2_5.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/etcd/etcd_2_6.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/general_policies/pod_security_standards_5_7_2.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/general_policies/pod_security_standards_5_7_3.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/general_policies/pod_security_standards_5_7_4.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/logging/logging_3_2_1.sql (100%) rename transformations/{k8s_compliance/macros/free => k8s/macros}/network_hardening/daemonset_cpu_limit.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/network_hardening/daemonset_cpu_request.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/network_hardening/daemonset_memory_limit.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/network_hardening/daemonset_memory_request.sql (100%) rename transformations/{k8s_compliance/macros/free => k8s/macros}/network_hardening/deployment_cpu_limit.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/network_hardening/deployment_cpu_request.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/network_hardening/deployment_memory_limit.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/network_hardening/deployment_memory_request.sql (100%) rename transformations/{k8s_compliance/macros/free => k8s/macros}/network_hardening/job_cpu_limit.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/network_hardening/job_cpu_request.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/network_hardening/job_memory_limit.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/network_hardening/job_memory_request.sql (100%) rename transformations/{k8s_compliance/macros/free => k8s/macros}/network_hardening/namespace_limit_range_default_cpu_limit.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/network_hardening/namespace_limit_range_default_cpu_request.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/network_hardening/namespace_limit_range_default_memory_limit.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/network_hardening/namespace_limit_range_default_memory_request.sql (100%) rename transformations/{k8s_compliance/macros/free => k8s/macros}/network_hardening/namespace_resource_quota_cpu_limit.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/network_hardening/namespace_resource_quota_cpu_request.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/network_hardening/namespace_resource_quota_memory_limit.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/network_hardening/namespace_resource_quota_memory_request.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/network_hardening/network_policy_default_deny_egress.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/network_hardening/network_policy_default_deny_ingress.sql (100%) rename transformations/{k8s_compliance/macros/free => k8s/macros}/network_hardening/replicaset_cpu_limit.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/network_hardening/replicaset_cpu_request.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/network_hardening/replicaset_memory_limit.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/network_hardening/replicaset_memory_request.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/network_policies_and_cni/pod_security_standards_5_3_2.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/daemonset_container_privilege_disabled.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/daemonset_container_privilege_escalation_disabled.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/daemonset_host_network_access_disabled.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/daemonset_hostpid_hostipc_sharing_disabled.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/daemonset_immutable_container_filesystem.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/daemonset_non_root_container.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/deployment_container_privilege_disabled.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/deployment_container_privilege_escalation_disabled.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/deployment_host_network_access_disabled.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/deployment_hostpid_hostipc_sharing_disabled.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/deployment_immutable_container_filesystem.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/deployment_non_root_container.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/job_container_privilege_disabled.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/job_container_privilege_escalation_disabled.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/job_host_network_access_disabled.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/job_hostpid_hostipc_sharing_disabled.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/job_immutable_container_filesystem.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/job_non_root_container.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/pod_container_privilege_disabled.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/pod_container_privilege_escalation_disabled.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/pod_host_network_access_disabled.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/pod_hostpid_hostipc_sharing_disabled.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/pod_immutable_container_filesystem.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/pod_non_root_container.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/pod_service_account_token_disabled.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/pod_volume_host_path.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/replicaset_container_privilege_disabled.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/replicaset_container_privilege_escalation_disabled.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/replicaset_host_network_access_disabled.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/replicaset_hostpid_hostipc_sharing_disabled.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/replicaset_immutable_container_filesystem.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/replicaset_non_root_container.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security/service_account_token_disabled.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security_standards/pod_security_standards_5_2_10.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security_standards/pod_security_standards_5_2_11.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security_standards/pod_security_standards_5_2_12.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security_standards/pod_security_standards_5_2_13.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security_standards/pod_security_standards_5_2_2.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security_standards/pod_security_standards_5_2_3.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security_standards/pod_security_standards_5_2_4.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security_standards/pod_security_standards_5_2_5.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security_standards/pod_security_standards_5_2_6.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security_standards/pod_security_standards_5_2_8.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/pod_security_standards/pod_security_standards_5_2_9.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/rbac_and_service_accounts/rbac_and_service_accounts_5_1_1.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/rbac_and_service_accounts/rbac_and_service_accounts_5_1_10.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/rbac_and_service_accounts/rbac_and_service_accounts_5_1_11.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/rbac_and_service_accounts/rbac_and_service_accounts_5_1_12.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/rbac_and_service_accounts/rbac_and_service_accounts_5_1_13.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/rbac_and_service_accounts/rbac_and_service_accounts_5_1_2.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/rbac_and_service_accounts/rbac_and_service_accounts_5_1_3.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/rbac_and_service_accounts/rbac_and_service_accounts_5_1_4.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/rbac_and_service_accounts/rbac_and_service_accounts_5_1_5.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/rbac_and_service_accounts/rbac_and_service_accounts_5_1_6.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/rbac_and_service_accounts/rbac_and_service_accounts_5_1_7.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/rbac_and_service_accounts/rbac_and_service_accounts_5_1_8.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/rbac_and_service_accounts/rbac_and_service_accounts_5_1_9.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/scheduler/scheduler_1_4_1.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/scheduler/scheduler_1_4_2.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/secrets_management/pod_security_standards_5_4_1.sql (100%) rename transformations/{k8s_compliance/macros/pro => k8s/macros}/secrets_management/pod_security_standards_5_4_2.sql (100%) delete mode 100644 transformations/k8s_compliance/Makefile delete mode 100644 transformations/k8s_compliance/packages.yml diff --git a/.github/workflows/transformations_azure_compliance_free_postgres.yml b/.github/workflows/transformations_azure_compliance_free_postgres.yml index 31b92ec00..bc0156e02 100644 --- a/.github/workflows/transformations_azure_compliance_free_postgres.yml +++ b/.github/workflows/transformations_azure_compliance_free_postgres.yml @@ -50,7 +50,7 @@ jobs: with: version: v4.0.0 - name: Migrate DB - run: cloudquery migrate tests/azure.yml tests/pg.yml + run: cloudquery migrate tests/spec.yml env: CQ_DSN: postgresql://postgres:pass@localhost:5432/postgres - name: DBT dependencies diff --git a/.github/workflows/transformations_azure_compliance_premium_postgres.yml b/.github/workflows/transformations_azure_compliance_premium_postgres.yml index 0000f9f82..06ae3bc71 100644 --- a/.github/workflows/transformations_azure_compliance_premium_postgres.yml +++ b/.github/workflows/transformations_azure_compliance_premium_postgres.yml @@ -50,7 +50,7 @@ jobs: with: version: v4.0.0 - name: Migrate DB - run: cloudquery migrate tests/azure.yml tests/pg.yml + run: cloudquery migrate tests/spec.yml env: CQ_DSN: postgresql://postgres:pass@localhost:5432/postgres - name: DBT dependencies diff --git a/.github/workflows/transformations_k8s_compliance.yml b/.github/workflows/transformations_k8s_compliance_free_postgres.yml similarity index 64% rename from .github/workflows/transformations_k8s_compliance.yml rename to .github/workflows/transformations_k8s_compliance_free_postgres.yml index e3cf6e268..583f1dd3c 100644 --- a/.github/workflows/transformations_k8s_compliance.yml +++ b/.github/workflows/transformations_k8s_compliance_free_postgres.yml @@ -1,24 +1,25 @@ -name: Test K8s Policies +name: "Test K8S Compliance Free Policies: Postgres" on: pull_request: paths: - - "transformations/k8s_compliance/**" - - ".github/workflows/transformations_k8s_compliance.yml" + - "transformations/k8s/compliance-free/**" + - ".github/workflows/transformations_k8s_compliance_free_postgres.yml" push: branches: - main paths: - - "transformations/k8s_compliance/**" - - ".github/workflows/transformations_k8s_compliance.yml" + - "transformations/k8s/compliance-free/**" + - ".github/workflows/transformations_k8s_compliance_free_postgres.yml" jobs: - test-policies: + transformations-k8s-compliance-free: + name: transformations/k8s/compliance-free timeout-minutes: 30 runs-on: ubuntu-latest defaults: run: - working-directory: ./transformations/k8s_compliance + working-directory: ./transformations/k8s/compliance-free services: postgres: image: postgres:11 @@ -34,7 +35,6 @@ jobs: --health-interval 10s --health-timeout 5s --health-retries 5 - steps: - name: Checkout uses: actions/checkout@v4 @@ -42,7 +42,7 @@ jobs: with: python-version: "3.9" cache: "pip" - cache-dependency-path: "./transformations/k8s_compliance/requirements.txt" + cache-dependency-path: "./transformations/k8s/compliance-free/requirements.txt" - name: Install dependencies run: pip install -r requirements.txt - name: Setup CloudQuery @@ -52,10 +52,10 @@ jobs: - name: Migrate DB run: cloudquery migrate tests/spec.yml env: - CQ_DSN: postgresql://postgres:pass@localhost:5432/postgres + CQ_DSN: postgresql://postgres:pass@localhost:5432/postgres - name: DBT dependencies run: | - dbt deps --target dev --profiles-dir ./tests + dbt deps --target dev-pg --profiles-dir ./tests - name: Run Policies run: | - dbt run --target dev --profiles-dir ./tests + dbt run --target dev-pg --profiles-dir ./tests diff --git a/.github/workflows/transformations_k8s_compliance_premium_postgres.yml b/.github/workflows/transformations_k8s_compliance_premium_postgres.yml new file mode 100644 index 000000000..93404ec92 --- /dev/null +++ b/.github/workflows/transformations_k8s_compliance_premium_postgres.yml @@ -0,0 +1,61 @@ +name: "Test K8S Compliance Premium Policies: Postgres" + +on: + pull_request: + paths: + - "transformations/k8s/compliance-premium/**" + - ".github/workflows/transformations_k8s_compliance_premium_postgres.yml" + push: + branches: + - main + paths: + - "transformations/k8s/compliance-premium/**" + - ".github/workflows/transformations_k8s_compliance_premium_postgres.yml" + +jobs: + transformations-k8s-compliance-premium: + name: transformations/k8s/compliance-premium + timeout-minutes: 30 + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./transformations/k8s/compliance-premium + services: + postgres: + image: postgres:11 + env: + POSTGRES_PASSWORD: pass + POSTGRES_USER: postgres + POSTGRES_DB: postgres + ports: + - 5432:5432 + # Set health checks to wait until postgres has started + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: "3.9" + cache: "pip" + cache-dependency-path: "./transformations/k8s/compliance-premium/requirements.txt" + - name: Install dependencies + run: pip install -r requirements.txt + - name: Setup CloudQuery + uses: cloudquery/setup-cloudquery@v3 + with: + version: v4.0.0 + - name: Migrate DB + run: cloudquery migrate tests/spec.yml + env: + CQ_DSN: postgresql://postgres:pass@localhost:5432/postgres + - name: DBT dependencies + run: | + dbt deps --target dev-pg --profiles-dir ./tests + - name: Run Policies + run: | + dbt run --target dev-pg --profiles-dir ./tests diff --git a/release-please-config-free.json b/release-please-config-free.json index 6b3de62e6..66cb21a49 100644 --- a/release-please-config-free.json +++ b/release-please-config-free.json @@ -8,10 +8,6 @@ "component": "transformation-gcp-compliance-free", "changelog-path": "CHANGELOG-free.md" }, - "transformations/k8s_compliance": { - "component": "transformation-k8s-compliance-free", - "changelog-path": "CHANGELOG-free.md" - }, "transformations/aws_data_resilience": { "component": "transformation-aws-data-resilience", "changelog-path": "CHANGELOG.md" diff --git a/release-please-config-premium.json b/release-please-config-premium.json index 01916d5ee..887e94d64 100644 --- a/release-please-config-premium.json +++ b/release-please-config-premium.json @@ -7,10 +7,6 @@ "transformations/gcp_compliance": { "component": "transformation-gcp-compliance-premium", "changelog-path": "CHANGELOG-premium.md" - }, - "transformations/k8s_compliance": { - "component": "transformation-k8s-compliance-premium", - "changelog-path": "CHANGELOG-premium.md" } }, "pull-request-title-pattern": "chore${scope}: Release${component} v${version}", diff --git a/scripts/dbt-pack/README.md b/scripts/dbt-pack/README.md index 88855d8a7..0ea58b4b6 100644 --- a/scripts/dbt-pack/README.md +++ b/scripts/dbt-pack/README.md @@ -17,4 +17,7 @@ npm ci ```bash node index.js dbt-pack --project-dir=../../transformations/azure/compliance-free node index.js dbt-pack --project-dir=../../transformations/azure/compliance-premium + +node index.js dbt-pack --project-dir=../../transformations/k8s/compliance-free +node index.js dbt-pack --project-dir=../../transformations/k8s/compliance-premium ``` diff --git a/scripts/dbt-pack/src/index.js b/scripts/dbt-pack/src/index.js index eac4ea8bf..5e92748df 100644 --- a/scripts/dbt-pack/src/index.js +++ b/scripts/dbt-pack/src/index.js @@ -52,9 +52,10 @@ const addDependencies = (node, allNodes, allMacros, filesToPack) => { }; const analyzeManifestFile = async (dbtProjectDirectory) => { - console.log(`Reading manifest.json from ${dbtProjectDirectory}`); + const manifestFile = `${dbtProjectDirectory}/target/manifest.json`; + console.log(`Analyzing manifest file ${manifestFile}`); const manifest = JSON.parse( - await fs.readFile(`${dbtProjectDirectory}/target/manifest.json`, "utf8"), + await fs.readFile(manifestFile, "utf8"), ); const { nodes: allNodes, macros: allMacros } = manifest; @@ -114,6 +115,7 @@ const zipProject = async (dbtProjectDirectory, filesToPack, ) => { stdout: "inherit", stderr: "inherit", }); + console.log(`Done packing to ${outputFile}`); }); }; diff --git a/transformations/azure/compliance-free/tests/azure.yml b/transformations/azure/compliance-free/tests/azure.yml deleted file mode 100644 index 8c973242c..000000000 --- a/transformations/azure/compliance-free/tests/azure.yml +++ /dev/null @@ -1,8 +0,0 @@ -kind: source -spec: - name: azure - path: cloudquery/azure - registry: cloudquery - version: "v10.2.0" # latest version of source azure plugin - destinations: ["dest"] - tables: ["*"] diff --git a/transformations/azure/compliance-free/tests/pg.yml b/transformations/azure/compliance-free/tests/pg.yml deleted file mode 100644 index 39d87e833..000000000 --- a/transformations/azure/compliance-free/tests/pg.yml +++ /dev/null @@ -1,9 +0,0 @@ -kind: destination -spec: - name: "dest" - path: "cloudquery/postgresql" - registry: cloudquery - version: "v7.1.0" # latest version of postgresql plugin - spec: - batch_size: 10000 - connection_string: ${CQ_DSN} diff --git a/transformations/azure/compliance-free/tests/spec.yml b/transformations/azure/compliance-free/tests/spec.yml new file mode 100644 index 000000000..93060b405 --- /dev/null +++ b/transformations/azure/compliance-free/tests/spec.yml @@ -0,0 +1,18 @@ +kind: source +spec: + name: azure + path: cloudquery/azure + registry: cloudquery + version: "v10.2.0" # latest version of source azure plugin + destinations: ["dest"] + tables: ["*"] +--- +kind: destination +spec: + name: "dest" + path: "cloudquery/postgresql" + registry: cloudquery + version: "v7.1.0" # latest version of postgresql plugin + spec: + batch_size: 10000 + connection_string: ${CQ_DSN} \ No newline at end of file diff --git a/transformations/k8s_compliance/CHANGELOG-free.md b/transformations/k8s/compliance-free/CHANGELOG.md similarity index 100% rename from transformations/k8s_compliance/CHANGELOG-free.md rename to transformations/k8s/compliance-free/CHANGELOG.md diff --git a/transformations/k8s_compliance/README-free.md b/transformations/k8s/compliance-free/README.md similarity index 100% rename from transformations/k8s_compliance/README-free.md rename to transformations/k8s/compliance-free/README.md diff --git a/transformations/k8s_compliance/analyses/.gitkeep b/transformations/k8s/compliance-free/analyses/.gitkeep similarity index 100% rename from transformations/k8s_compliance/analyses/.gitkeep rename to transformations/k8s/compliance-free/analyses/.gitkeep diff --git a/transformations/k8s_compliance/dbt_project.yml b/transformations/k8s/compliance-free/dbt_project.yml similarity index 94% rename from transformations/k8s_compliance/dbt_project.yml rename to transformations/k8s/compliance-free/dbt_project.yml index 170b72dcb..92722ec96 100644 --- a/transformations/k8s_compliance/dbt_project.yml +++ b/transformations/k8s/compliance-free/dbt_project.yml @@ -12,11 +12,11 @@ profile: 'k8s_compliance' # These configurations specify where dbt should look for different types of files. # The `model-paths` config, for example, states that models in this project can be # found in the "models/" directory. You probably won't need to change these! -model-paths: ["models"] +model-paths: ["models","../models"] analysis-paths: ["analyses"] test-paths: ["tests"] seed-paths: ["seeds"] -macro-paths: ["macros"] +macro-paths: ["macros","../macros"] snapshot-paths: ["snapshots"] clean-targets: # directories to be removed by `dbt clean` diff --git a/transformations/k8s_compliance/gen-files.py b/transformations/k8s/compliance-free/gen-files.py similarity index 100% rename from transformations/k8s_compliance/gen-files.py rename to transformations/k8s/compliance-free/gen-files.py diff --git a/transformations/k8s_compliance/manifest-free.json b/transformations/k8s/compliance-free/manifest.json similarity index 91% rename from transformations/k8s_compliance/manifest-free.json rename to transformations/k8s/compliance-free/manifest.json index b975f4c4e..96d97c124 100644 --- a/transformations/k8s_compliance/manifest-free.json +++ b/transformations/k8s/compliance-free/manifest.json @@ -6,7 +6,7 @@ "addon_type": "transformation", "addon_format": "zip", "message": "@./changelog.md", - "doc": "./README-free.md", + "doc": "./README.md", "path": "./build/k8s_compliance_free.zip", "plugin_deps": ["cloudquery/source/k8s@v5.2.1"], "addon_deps": [] diff --git a/transformations/k8s_compliance/models/free/k8s_compliance__cis_v1_7_free.sql b/transformations/k8s/compliance-free/models/k8s_compliance__cis_v1_7_free.sql similarity index 100% rename from transformations/k8s_compliance/models/free/k8s_compliance__cis_v1_7_free.sql rename to transformations/k8s/compliance-free/models/k8s_compliance__cis_v1_7_free.sql diff --git a/transformations/k8s_compliance/models/free/k8s_compliance__nsa_cisa_v1_free.sql b/transformations/k8s/compliance-free/models/k8s_compliance__nsa_cisa_v1_free.sql similarity index 100% rename from transformations/k8s_compliance/models/free/k8s_compliance__nsa_cisa_v1_free.sql rename to transformations/k8s/compliance-free/models/k8s_compliance__nsa_cisa_v1_free.sql diff --git a/transformations/k8s_compliance/requirements.txt b/transformations/k8s/compliance-free/requirements.txt similarity index 100% rename from transformations/k8s_compliance/requirements.txt rename to transformations/k8s/compliance-free/requirements.txt diff --git a/transformations/k8s_compliance/seeds/.gitkeep b/transformations/k8s/compliance-free/seeds/.gitkeep similarity index 100% rename from transformations/k8s_compliance/seeds/.gitkeep rename to transformations/k8s/compliance-free/seeds/.gitkeep diff --git a/transformations/k8s_compliance/snapshots/.gitkeep b/transformations/k8s/compliance-free/snapshots/.gitkeep similarity index 100% rename from transformations/k8s_compliance/snapshots/.gitkeep rename to transformations/k8s/compliance-free/snapshots/.gitkeep diff --git a/transformations/k8s_compliance/tests/profiles.yml b/transformations/k8s/compliance-free/tests/profiles.yml similarity index 100% rename from transformations/k8s_compliance/tests/profiles.yml rename to transformations/k8s/compliance-free/tests/profiles.yml diff --git a/transformations/k8s_compliance/tests/spec.yml b/transformations/k8s/compliance-free/tests/spec.yml similarity index 66% rename from transformations/k8s_compliance/tests/spec.yml rename to transformations/k8s/compliance-free/tests/spec.yml index 2437590d3..7026735da 100644 --- a/transformations/k8s_compliance/tests/spec.yml +++ b/transformations/k8s/compliance-free/tests/spec.yml @@ -4,7 +4,7 @@ spec: name: k8s path: cloudquery/k8s registry: cloudquery - version: "v5.2.1" + version: "v5.2.1" # latest version of source k8s plugin tables: ["*"] destinations: ["postgresql"] spec: @@ -12,9 +12,10 @@ spec: --- kind: destination spec: - name: "postgresql" + name: "dest" path: "cloudquery/postgresql" - version: "v6.1.1" + registry: cloudquery + version: "v7.1.0" # latest version of postgresql plugin spec: batch_size: 10000 connection_string: ${CQ_DSN} \ No newline at end of file diff --git a/transformations/k8s_compliance/CHANGELOG-premium.md b/transformations/k8s/compliance-premium/CHANGELOG.md similarity index 100% rename from transformations/k8s_compliance/CHANGELOG-premium.md rename to transformations/k8s/compliance-premium/CHANGELOG.md diff --git a/transformations/k8s_compliance/README-premium.md b/transformations/k8s/compliance-premium/README.md similarity index 100% rename from transformations/k8s_compliance/README-premium.md rename to transformations/k8s/compliance-premium/README.md diff --git a/transformations/k8s/compliance-premium/analyses/.gitkeep b/transformations/k8s/compliance-premium/analyses/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/transformations/k8s/compliance-premium/dbt_project.yml b/transformations/k8s/compliance-premium/dbt_project.yml new file mode 100644 index 000000000..92722ec96 --- /dev/null +++ b/transformations/k8s/compliance-premium/dbt_project.yml @@ -0,0 +1,40 @@ + +# Name your project! Project names should contain only lowercase characters +# and underscores. A good package name should reflect your organization's +# name or the intended use of these models +name: 'k8s_compliance' +version: '1.0.0' +config-version: 2 + +# This setting configures which "profile" dbt uses for this project. +profile: 'k8s_compliance' + +# These configurations specify where dbt should look for different types of files. +# The `model-paths` config, for example, states that models in this project can be +# found in the "models/" directory. You probably won't need to change these! +model-paths: ["models","../models"] +analysis-paths: ["analyses"] +test-paths: ["tests"] +seed-paths: ["seeds"] +macro-paths: ["macros","../macros"] +snapshot-paths: ["snapshots"] + +clean-targets: # directories to be removed by `dbt clean` + - "target" + - "dbt_packages" + +# Configuring models +# Full documentation: https://docs.getdbt.com/docs/configuring-models + +# In this example config, we tell dbt to build all models in the example/ +# directory as views. These settings can be overridden in the individual model +# files using the `{{ config(...) }}` macro. +models: + k8s_compliance: + # Config indicated by + and applies to all files under models/example/ + # example: + # +materialized: view + + + + diff --git a/transformations/k8s/compliance-premium/gen-files.py b/transformations/k8s/compliance-premium/gen-files.py new file mode 100644 index 000000000..591f47d3b --- /dev/null +++ b/transformations/k8s/compliance-premium/gen-files.py @@ -0,0 +1,80 @@ +import os + + +def queryName(name): + return ( + f'({{{{ {name}(\'Kubernetes CIS v1.7.0\',\'{name}\') }}}})\n' + f' union' + ) + + +source = "../../to_migrate/k8s/queries_cis_v1_7_0" +dest = "./macros" + +filesToTransform = [ + ("api_server_queries.sql", "api_server"), + ("controller_manager_1_3_queries.sql", "controller_manager"), + + + + ("etcd_queries.sql", "etcd"), + ("general_policies_5_7_queries.sql", "general_policies"), + ("logging_queries.sql", "logging"), + ("network_policies_and_cni_5_3_queries.sql", "network_policies_and_cni"), + ("pod_security_standards_5_2_queries.sql", "pod_security_standards"), + ("rbac_and_service_accounts_queries.sql", "rbac_and_service_accounts"), + ("scheduler_queries.sql", "scheduler"), + ("secrets_managment_5_4_queries.sql", "secrets_management"), +] + + +def genTransforms(sourceName, destName): + with open(source+'/'+sourceName, 'r') as file: + data = file.read() + # split on the following sring: `\echo` + split = data.split('\\echo') + for query in split: + query = query.lstrip() + # print(query) + split_query = query.split('\n', 1) + if len(split_query) == 1: + continue + name = split_query[0] + query = split_query[1] + name = name.replace('"', '') + name = name.replace('.', '_') + # strip leading white space from name + name = name.lstrip() + if len(name) == 0 or len(query) == 0: + continue + query = query.replace('''INSERT INTO k8s_policy_results (resource_id, execution_time, framework, check_id, title, context, namespace, + resource_name, status)''', '') + + query = query.split('-- query')[0] + # check if destination exists and if not create it + if not os.path.exists(f'{dest}/{destName}'): + os.makedirs(f'{dest}/{destName}') + # create file with name of query and then write query to file + + with open(f'{dest}/{destName}/{name}.sql', 'w') as file: + file.write('{% macro '+name+'(framework, check_id) %}') + for line in query.split('\n'): + if 'INSERT INTO k8s_policy_results (resource_id, execution_time, framework, check_id, title, context, namespace' in line: + continue + if ' resource_name, status)' in line: + continue + elif 'AS execution_time' in line: + continue + elif 'AS framework' in line: + file.write(" \'{{framework}}\' As framework,\n") + elif 'AS check_id' in line: + file.write(" \'{{check_id}}\' As check_id,\n") + else: + + file.write(line.removesuffix(';')+'\n') + file.write('{% endmacro %}') + print(queryName(name)) + + +for tup in filesToTransform: + genTransforms(tup[0], tup[1]) diff --git a/transformations/k8s_compliance/manifest-premium.json b/transformations/k8s/compliance-premium/manifest.json similarity index 91% rename from transformations/k8s_compliance/manifest-premium.json rename to transformations/k8s/compliance-premium/manifest.json index b85df7520..b7debddbb 100644 --- a/transformations/k8s_compliance/manifest-premium.json +++ b/transformations/k8s/compliance-premium/manifest.json @@ -6,7 +6,7 @@ "addon_type": "transformation", "addon_format": "zip", "message": "@./changelog.md", - "doc": "./README-premium.md", + "doc": "./README.md", "path": "./build/k8s_compliance_premium.zip", "plugin_deps": ["cloudquery/source/k8s@v5.2.1"], "addon_deps": [] diff --git a/transformations/k8s_compliance/models/pro/k8s_compliance__cis_v1_7.sql b/transformations/k8s/compliance-premium/models/k8s_compliance__cis_v1_7.sql similarity index 100% rename from transformations/k8s_compliance/models/pro/k8s_compliance__cis_v1_7.sql rename to transformations/k8s/compliance-premium/models/k8s_compliance__cis_v1_7.sql diff --git a/transformations/k8s_compliance/models/pro/k8s_compliance__nsa_cisa_v1.sql b/transformations/k8s/compliance-premium/models/k8s_compliance__nsa_cisa_v1.sql similarity index 100% rename from transformations/k8s_compliance/models/pro/k8s_compliance__nsa_cisa_v1.sql rename to transformations/k8s/compliance-premium/models/k8s_compliance__nsa_cisa_v1.sql diff --git a/transformations/k8s/compliance-premium/requirements.txt b/transformations/k8s/compliance-premium/requirements.txt new file mode 100644 index 000000000..d3ccd7693 --- /dev/null +++ b/transformations/k8s/compliance-premium/requirements.txt @@ -0,0 +1 @@ +dbt-postgres==1.6.6 \ No newline at end of file diff --git a/transformations/k8s/compliance-premium/seeds/.gitkeep b/transformations/k8s/compliance-premium/seeds/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/transformations/k8s/compliance-premium/snapshots/.gitkeep b/transformations/k8s/compliance-premium/snapshots/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/transformations/k8s/compliance-premium/tests/profiles.yml b/transformations/k8s/compliance-premium/tests/profiles.yml new file mode 100644 index 000000000..3d7d8893f --- /dev/null +++ b/transformations/k8s/compliance-premium/tests/profiles.yml @@ -0,0 +1,12 @@ +k8s_compliance: # This should match the name in your dbt_project.yml + target: dev + outputs: + dev-pg: + type: postgres + host: 127.0.0.1 + user: postgres + pass: pass + port: 5432 + dbname: postgres + schema: public # default schema where dbt will build the models + threads: 1 # number of threads to use when running in parallel \ No newline at end of file diff --git a/transformations/k8s/compliance-premium/tests/spec.yml b/transformations/k8s/compliance-premium/tests/spec.yml new file mode 100644 index 000000000..7026735da --- /dev/null +++ b/transformations/k8s/compliance-premium/tests/spec.yml @@ -0,0 +1,21 @@ +kind: source +spec: + # Source spec section + name: k8s + path: cloudquery/k8s + registry: cloudquery + version: "v5.2.1" # latest version of source k8s plugin + tables: ["*"] + destinations: ["postgresql"] + spec: + contexts: ["context"] +--- +kind: destination +spec: + name: "dest" + path: "cloudquery/postgresql" + registry: cloudquery + version: "v7.1.0" # latest version of postgresql plugin + spec: + batch_size: 10000 + connection_string: ${CQ_DSN} \ No newline at end of file diff --git a/transformations/k8s_compliance/macros/free/api_server/api_server_1_2_1.sql b/transformations/k8s/macros/api_server/api_server_1_2_1.sql similarity index 100% rename from transformations/k8s_compliance/macros/free/api_server/api_server_1_2_1.sql rename to transformations/k8s/macros/api_server/api_server_1_2_1.sql diff --git a/transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_10.sql b/transformations/k8s/macros/api_server/api_server_1_2_10.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_10.sql rename to transformations/k8s/macros/api_server/api_server_1_2_10.sql diff --git a/transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_11.sql b/transformations/k8s/macros/api_server/api_server_1_2_11.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_11.sql rename to transformations/k8s/macros/api_server/api_server_1_2_11.sql diff --git a/transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_12.sql b/transformations/k8s/macros/api_server/api_server_1_2_12.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_12.sql rename to transformations/k8s/macros/api_server/api_server_1_2_12.sql diff --git a/transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_13.sql b/transformations/k8s/macros/api_server/api_server_1_2_13.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_13.sql rename to transformations/k8s/macros/api_server/api_server_1_2_13.sql diff --git a/transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_14.sql b/transformations/k8s/macros/api_server/api_server_1_2_14.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_14.sql rename to transformations/k8s/macros/api_server/api_server_1_2_14.sql diff --git a/transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_15.sql b/transformations/k8s/macros/api_server/api_server_1_2_15.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_15.sql rename to transformations/k8s/macros/api_server/api_server_1_2_15.sql diff --git a/transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_16.sql b/transformations/k8s/macros/api_server/api_server_1_2_16.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_16.sql rename to transformations/k8s/macros/api_server/api_server_1_2_16.sql diff --git a/transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_17.sql b/transformations/k8s/macros/api_server/api_server_1_2_17.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_17.sql rename to transformations/k8s/macros/api_server/api_server_1_2_17.sql diff --git a/transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_18.sql b/transformations/k8s/macros/api_server/api_server_1_2_18.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_18.sql rename to transformations/k8s/macros/api_server/api_server_1_2_18.sql diff --git a/transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_19.sql b/transformations/k8s/macros/api_server/api_server_1_2_19.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_19.sql rename to transformations/k8s/macros/api_server/api_server_1_2_19.sql diff --git a/transformations/k8s_compliance/macros/free/api_server/api_server_1_2_2.sql b/transformations/k8s/macros/api_server/api_server_1_2_2.sql similarity index 100% rename from transformations/k8s_compliance/macros/free/api_server/api_server_1_2_2.sql rename to transformations/k8s/macros/api_server/api_server_1_2_2.sql diff --git a/transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_20.sql b/transformations/k8s/macros/api_server/api_server_1_2_20.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_20.sql rename to transformations/k8s/macros/api_server/api_server_1_2_20.sql diff --git a/transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_21.sql b/transformations/k8s/macros/api_server/api_server_1_2_21.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_21.sql rename to transformations/k8s/macros/api_server/api_server_1_2_21.sql diff --git a/transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_22.sql b/transformations/k8s/macros/api_server/api_server_1_2_22.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_22.sql rename to transformations/k8s/macros/api_server/api_server_1_2_22.sql diff --git a/transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_23.sql b/transformations/k8s/macros/api_server/api_server_1_2_23.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_23.sql rename to transformations/k8s/macros/api_server/api_server_1_2_23.sql diff --git a/transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_24.sql b/transformations/k8s/macros/api_server/api_server_1_2_24.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_24.sql rename to transformations/k8s/macros/api_server/api_server_1_2_24.sql diff --git a/transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_25.sql b/transformations/k8s/macros/api_server/api_server_1_2_25.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_25.sql rename to transformations/k8s/macros/api_server/api_server_1_2_25.sql diff --git a/transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_26.sql b/transformations/k8s/macros/api_server/api_server_1_2_26.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_26.sql rename to transformations/k8s/macros/api_server/api_server_1_2_26.sql diff --git a/transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_27.sql b/transformations/k8s/macros/api_server/api_server_1_2_27.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_27.sql rename to transformations/k8s/macros/api_server/api_server_1_2_27.sql diff --git a/transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_28.sql b/transformations/k8s/macros/api_server/api_server_1_2_28.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_28.sql rename to transformations/k8s/macros/api_server/api_server_1_2_28.sql diff --git a/transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_29.sql b/transformations/k8s/macros/api_server/api_server_1_2_29.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_29.sql rename to transformations/k8s/macros/api_server/api_server_1_2_29.sql diff --git a/transformations/k8s_compliance/macros/free/api_server/api_server_1_2_3.sql b/transformations/k8s/macros/api_server/api_server_1_2_3.sql similarity index 100% rename from transformations/k8s_compliance/macros/free/api_server/api_server_1_2_3.sql rename to transformations/k8s/macros/api_server/api_server_1_2_3.sql diff --git a/transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_30.sql b/transformations/k8s/macros/api_server/api_server_1_2_30.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_30.sql rename to transformations/k8s/macros/api_server/api_server_1_2_30.sql diff --git a/transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_31.sql b/transformations/k8s/macros/api_server/api_server_1_2_31.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_31.sql rename to transformations/k8s/macros/api_server/api_server_1_2_31.sql diff --git a/transformations/k8s_compliance/macros/free/api_server/api_server_1_2_4.sql b/transformations/k8s/macros/api_server/api_server_1_2_4.sql similarity index 100% rename from transformations/k8s_compliance/macros/free/api_server/api_server_1_2_4.sql rename to transformations/k8s/macros/api_server/api_server_1_2_4.sql diff --git a/transformations/k8s_compliance/macros/free/api_server/api_server_1_2_5.sql b/transformations/k8s/macros/api_server/api_server_1_2_5.sql similarity index 100% rename from transformations/k8s_compliance/macros/free/api_server/api_server_1_2_5.sql rename to transformations/k8s/macros/api_server/api_server_1_2_5.sql diff --git a/transformations/k8s_compliance/macros/free/api_server/api_server_1_2_6.sql b/transformations/k8s/macros/api_server/api_server_1_2_6.sql similarity index 100% rename from transformations/k8s_compliance/macros/free/api_server/api_server_1_2_6.sql rename to transformations/k8s/macros/api_server/api_server_1_2_6.sql diff --git a/transformations/k8s_compliance/macros/free/api_server/api_server_1_2_7.sql b/transformations/k8s/macros/api_server/api_server_1_2_7.sql similarity index 100% rename from transformations/k8s_compliance/macros/free/api_server/api_server_1_2_7.sql rename to transformations/k8s/macros/api_server/api_server_1_2_7.sql diff --git a/transformations/k8s_compliance/macros/free/api_server/api_server_1_2_8.sql b/transformations/k8s/macros/api_server/api_server_1_2_8.sql similarity index 100% rename from transformations/k8s_compliance/macros/free/api_server/api_server_1_2_8.sql rename to transformations/k8s/macros/api_server/api_server_1_2_8.sql diff --git a/transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_9.sql b/transformations/k8s/macros/api_server/api_server_1_2_9.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/api_server/api_server_1_2_9.sql rename to transformations/k8s/macros/api_server/api_server_1_2_9.sql diff --git a/transformations/k8s_compliance/macros/pro/controller_manager/controller_manager_1_3_1.sql b/transformations/k8s/macros/controller_manager/controller_manager_1_3_1.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/controller_manager/controller_manager_1_3_1.sql rename to transformations/k8s/macros/controller_manager/controller_manager_1_3_1.sql diff --git a/transformations/k8s_compliance/macros/pro/controller_manager/controller_manager_1_3_2.sql b/transformations/k8s/macros/controller_manager/controller_manager_1_3_2.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/controller_manager/controller_manager_1_3_2.sql rename to transformations/k8s/macros/controller_manager/controller_manager_1_3_2.sql diff --git a/transformations/k8s_compliance/macros/pro/controller_manager/controller_manager_1_3_3.sql b/transformations/k8s/macros/controller_manager/controller_manager_1_3_3.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/controller_manager/controller_manager_1_3_3.sql rename to transformations/k8s/macros/controller_manager/controller_manager_1_3_3.sql diff --git a/transformations/k8s_compliance/macros/pro/controller_manager/controller_manager_1_3_4.sql b/transformations/k8s/macros/controller_manager/controller_manager_1_3_4.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/controller_manager/controller_manager_1_3_4.sql rename to transformations/k8s/macros/controller_manager/controller_manager_1_3_4.sql diff --git a/transformations/k8s_compliance/macros/pro/controller_manager/controller_manager_1_3_5.sql b/transformations/k8s/macros/controller_manager/controller_manager_1_3_5.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/controller_manager/controller_manager_1_3_5.sql rename to transformations/k8s/macros/controller_manager/controller_manager_1_3_5.sql diff --git a/transformations/k8s_compliance/macros/pro/controller_manager/controller_manager_1_3_6.sql b/transformations/k8s/macros/controller_manager/controller_manager_1_3_6.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/controller_manager/controller_manager_1_3_6.sql rename to transformations/k8s/macros/controller_manager/controller_manager_1_3_6.sql diff --git a/transformations/k8s_compliance/macros/pro/controller_manager/controller_manager_1_3_7.sql b/transformations/k8s/macros/controller_manager/controller_manager_1_3_7.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/controller_manager/controller_manager_1_3_7.sql rename to transformations/k8s/macros/controller_manager/controller_manager_1_3_7.sql diff --git a/transformations/k8s_compliance/macros/pro/etcd/etcd_2_1.sql b/transformations/k8s/macros/etcd/etcd_2_1.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/etcd/etcd_2_1.sql rename to transformations/k8s/macros/etcd/etcd_2_1.sql diff --git a/transformations/k8s_compliance/macros/pro/etcd/etcd_2_2.sql b/transformations/k8s/macros/etcd/etcd_2_2.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/etcd/etcd_2_2.sql rename to transformations/k8s/macros/etcd/etcd_2_2.sql diff --git a/transformations/k8s_compliance/macros/pro/etcd/etcd_2_3.sql b/transformations/k8s/macros/etcd/etcd_2_3.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/etcd/etcd_2_3.sql rename to transformations/k8s/macros/etcd/etcd_2_3.sql diff --git a/transformations/k8s_compliance/macros/pro/etcd/etcd_2_4.sql b/transformations/k8s/macros/etcd/etcd_2_4.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/etcd/etcd_2_4.sql rename to transformations/k8s/macros/etcd/etcd_2_4.sql diff --git a/transformations/k8s_compliance/macros/pro/etcd/etcd_2_5.sql b/transformations/k8s/macros/etcd/etcd_2_5.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/etcd/etcd_2_5.sql rename to transformations/k8s/macros/etcd/etcd_2_5.sql diff --git a/transformations/k8s_compliance/macros/pro/etcd/etcd_2_6.sql b/transformations/k8s/macros/etcd/etcd_2_6.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/etcd/etcd_2_6.sql rename to transformations/k8s/macros/etcd/etcd_2_6.sql diff --git a/transformations/k8s_compliance/macros/pro/general_policies/pod_security_standards_5_7_2.sql b/transformations/k8s/macros/general_policies/pod_security_standards_5_7_2.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/general_policies/pod_security_standards_5_7_2.sql rename to transformations/k8s/macros/general_policies/pod_security_standards_5_7_2.sql diff --git a/transformations/k8s_compliance/macros/pro/general_policies/pod_security_standards_5_7_3.sql b/transformations/k8s/macros/general_policies/pod_security_standards_5_7_3.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/general_policies/pod_security_standards_5_7_3.sql rename to transformations/k8s/macros/general_policies/pod_security_standards_5_7_3.sql diff --git a/transformations/k8s_compliance/macros/pro/general_policies/pod_security_standards_5_7_4.sql b/transformations/k8s/macros/general_policies/pod_security_standards_5_7_4.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/general_policies/pod_security_standards_5_7_4.sql rename to transformations/k8s/macros/general_policies/pod_security_standards_5_7_4.sql diff --git a/transformations/k8s_compliance/macros/pro/logging/logging_3_2_1.sql b/transformations/k8s/macros/logging/logging_3_2_1.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/logging/logging_3_2_1.sql rename to transformations/k8s/macros/logging/logging_3_2_1.sql diff --git a/transformations/k8s_compliance/macros/free/network_hardening/daemonset_cpu_limit.sql b/transformations/k8s/macros/network_hardening/daemonset_cpu_limit.sql similarity index 100% rename from transformations/k8s_compliance/macros/free/network_hardening/daemonset_cpu_limit.sql rename to transformations/k8s/macros/network_hardening/daemonset_cpu_limit.sql diff --git a/transformations/k8s_compliance/macros/pro/network_hardening/daemonset_cpu_request.sql b/transformations/k8s/macros/network_hardening/daemonset_cpu_request.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/network_hardening/daemonset_cpu_request.sql rename to transformations/k8s/macros/network_hardening/daemonset_cpu_request.sql diff --git a/transformations/k8s_compliance/macros/pro/network_hardening/daemonset_memory_limit.sql b/transformations/k8s/macros/network_hardening/daemonset_memory_limit.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/network_hardening/daemonset_memory_limit.sql rename to transformations/k8s/macros/network_hardening/daemonset_memory_limit.sql diff --git a/transformations/k8s_compliance/macros/pro/network_hardening/daemonset_memory_request.sql b/transformations/k8s/macros/network_hardening/daemonset_memory_request.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/network_hardening/daemonset_memory_request.sql rename to transformations/k8s/macros/network_hardening/daemonset_memory_request.sql diff --git a/transformations/k8s_compliance/macros/free/network_hardening/deployment_cpu_limit.sql b/transformations/k8s/macros/network_hardening/deployment_cpu_limit.sql similarity index 100% rename from transformations/k8s_compliance/macros/free/network_hardening/deployment_cpu_limit.sql rename to transformations/k8s/macros/network_hardening/deployment_cpu_limit.sql diff --git a/transformations/k8s_compliance/macros/pro/network_hardening/deployment_cpu_request.sql b/transformations/k8s/macros/network_hardening/deployment_cpu_request.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/network_hardening/deployment_cpu_request.sql rename to transformations/k8s/macros/network_hardening/deployment_cpu_request.sql diff --git a/transformations/k8s_compliance/macros/pro/network_hardening/deployment_memory_limit.sql b/transformations/k8s/macros/network_hardening/deployment_memory_limit.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/network_hardening/deployment_memory_limit.sql rename to transformations/k8s/macros/network_hardening/deployment_memory_limit.sql diff --git a/transformations/k8s_compliance/macros/pro/network_hardening/deployment_memory_request.sql b/transformations/k8s/macros/network_hardening/deployment_memory_request.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/network_hardening/deployment_memory_request.sql rename to transformations/k8s/macros/network_hardening/deployment_memory_request.sql diff --git a/transformations/k8s_compliance/macros/free/network_hardening/job_cpu_limit.sql b/transformations/k8s/macros/network_hardening/job_cpu_limit.sql similarity index 100% rename from transformations/k8s_compliance/macros/free/network_hardening/job_cpu_limit.sql rename to transformations/k8s/macros/network_hardening/job_cpu_limit.sql diff --git a/transformations/k8s_compliance/macros/pro/network_hardening/job_cpu_request.sql b/transformations/k8s/macros/network_hardening/job_cpu_request.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/network_hardening/job_cpu_request.sql rename to transformations/k8s/macros/network_hardening/job_cpu_request.sql diff --git a/transformations/k8s_compliance/macros/pro/network_hardening/job_memory_limit.sql b/transformations/k8s/macros/network_hardening/job_memory_limit.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/network_hardening/job_memory_limit.sql rename to transformations/k8s/macros/network_hardening/job_memory_limit.sql diff --git a/transformations/k8s_compliance/macros/pro/network_hardening/job_memory_request.sql b/transformations/k8s/macros/network_hardening/job_memory_request.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/network_hardening/job_memory_request.sql rename to transformations/k8s/macros/network_hardening/job_memory_request.sql diff --git a/transformations/k8s_compliance/macros/free/network_hardening/namespace_limit_range_default_cpu_limit.sql b/transformations/k8s/macros/network_hardening/namespace_limit_range_default_cpu_limit.sql similarity index 100% rename from transformations/k8s_compliance/macros/free/network_hardening/namespace_limit_range_default_cpu_limit.sql rename to transformations/k8s/macros/network_hardening/namespace_limit_range_default_cpu_limit.sql diff --git a/transformations/k8s_compliance/macros/pro/network_hardening/namespace_limit_range_default_cpu_request.sql b/transformations/k8s/macros/network_hardening/namespace_limit_range_default_cpu_request.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/network_hardening/namespace_limit_range_default_cpu_request.sql rename to transformations/k8s/macros/network_hardening/namespace_limit_range_default_cpu_request.sql diff --git a/transformations/k8s_compliance/macros/pro/network_hardening/namespace_limit_range_default_memory_limit.sql b/transformations/k8s/macros/network_hardening/namespace_limit_range_default_memory_limit.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/network_hardening/namespace_limit_range_default_memory_limit.sql rename to transformations/k8s/macros/network_hardening/namespace_limit_range_default_memory_limit.sql diff --git a/transformations/k8s_compliance/macros/pro/network_hardening/namespace_limit_range_default_memory_request.sql b/transformations/k8s/macros/network_hardening/namespace_limit_range_default_memory_request.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/network_hardening/namespace_limit_range_default_memory_request.sql rename to transformations/k8s/macros/network_hardening/namespace_limit_range_default_memory_request.sql diff --git a/transformations/k8s_compliance/macros/free/network_hardening/namespace_resource_quota_cpu_limit.sql b/transformations/k8s/macros/network_hardening/namespace_resource_quota_cpu_limit.sql similarity index 100% rename from transformations/k8s_compliance/macros/free/network_hardening/namespace_resource_quota_cpu_limit.sql rename to transformations/k8s/macros/network_hardening/namespace_resource_quota_cpu_limit.sql diff --git a/transformations/k8s_compliance/macros/pro/network_hardening/namespace_resource_quota_cpu_request.sql b/transformations/k8s/macros/network_hardening/namespace_resource_quota_cpu_request.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/network_hardening/namespace_resource_quota_cpu_request.sql rename to transformations/k8s/macros/network_hardening/namespace_resource_quota_cpu_request.sql diff --git a/transformations/k8s_compliance/macros/pro/network_hardening/namespace_resource_quota_memory_limit.sql b/transformations/k8s/macros/network_hardening/namespace_resource_quota_memory_limit.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/network_hardening/namespace_resource_quota_memory_limit.sql rename to transformations/k8s/macros/network_hardening/namespace_resource_quota_memory_limit.sql diff --git a/transformations/k8s_compliance/macros/pro/network_hardening/namespace_resource_quota_memory_request.sql b/transformations/k8s/macros/network_hardening/namespace_resource_quota_memory_request.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/network_hardening/namespace_resource_quota_memory_request.sql rename to transformations/k8s/macros/network_hardening/namespace_resource_quota_memory_request.sql diff --git a/transformations/k8s_compliance/macros/pro/network_hardening/network_policy_default_deny_egress.sql b/transformations/k8s/macros/network_hardening/network_policy_default_deny_egress.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/network_hardening/network_policy_default_deny_egress.sql rename to transformations/k8s/macros/network_hardening/network_policy_default_deny_egress.sql diff --git a/transformations/k8s_compliance/macros/pro/network_hardening/network_policy_default_deny_ingress.sql b/transformations/k8s/macros/network_hardening/network_policy_default_deny_ingress.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/network_hardening/network_policy_default_deny_ingress.sql rename to transformations/k8s/macros/network_hardening/network_policy_default_deny_ingress.sql diff --git a/transformations/k8s_compliance/macros/free/network_hardening/replicaset_cpu_limit.sql b/transformations/k8s/macros/network_hardening/replicaset_cpu_limit.sql similarity index 100% rename from transformations/k8s_compliance/macros/free/network_hardening/replicaset_cpu_limit.sql rename to transformations/k8s/macros/network_hardening/replicaset_cpu_limit.sql diff --git a/transformations/k8s_compliance/macros/pro/network_hardening/replicaset_cpu_request.sql b/transformations/k8s/macros/network_hardening/replicaset_cpu_request.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/network_hardening/replicaset_cpu_request.sql rename to transformations/k8s/macros/network_hardening/replicaset_cpu_request.sql diff --git a/transformations/k8s_compliance/macros/pro/network_hardening/replicaset_memory_limit.sql b/transformations/k8s/macros/network_hardening/replicaset_memory_limit.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/network_hardening/replicaset_memory_limit.sql rename to transformations/k8s/macros/network_hardening/replicaset_memory_limit.sql diff --git a/transformations/k8s_compliance/macros/pro/network_hardening/replicaset_memory_request.sql b/transformations/k8s/macros/network_hardening/replicaset_memory_request.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/network_hardening/replicaset_memory_request.sql rename to transformations/k8s/macros/network_hardening/replicaset_memory_request.sql diff --git a/transformations/k8s_compliance/macros/pro/network_policies_and_cni/pod_security_standards_5_3_2.sql b/transformations/k8s/macros/network_policies_and_cni/pod_security_standards_5_3_2.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/network_policies_and_cni/pod_security_standards_5_3_2.sql rename to transformations/k8s/macros/network_policies_and_cni/pod_security_standards_5_3_2.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/daemonset_container_privilege_disabled.sql b/transformations/k8s/macros/pod_security/daemonset_container_privilege_disabled.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/daemonset_container_privilege_disabled.sql rename to transformations/k8s/macros/pod_security/daemonset_container_privilege_disabled.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/daemonset_container_privilege_escalation_disabled.sql b/transformations/k8s/macros/pod_security/daemonset_container_privilege_escalation_disabled.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/daemonset_container_privilege_escalation_disabled.sql rename to transformations/k8s/macros/pod_security/daemonset_container_privilege_escalation_disabled.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/daemonset_host_network_access_disabled.sql b/transformations/k8s/macros/pod_security/daemonset_host_network_access_disabled.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/daemonset_host_network_access_disabled.sql rename to transformations/k8s/macros/pod_security/daemonset_host_network_access_disabled.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/daemonset_hostpid_hostipc_sharing_disabled.sql b/transformations/k8s/macros/pod_security/daemonset_hostpid_hostipc_sharing_disabled.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/daemonset_hostpid_hostipc_sharing_disabled.sql rename to transformations/k8s/macros/pod_security/daemonset_hostpid_hostipc_sharing_disabled.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/daemonset_immutable_container_filesystem.sql b/transformations/k8s/macros/pod_security/daemonset_immutable_container_filesystem.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/daemonset_immutable_container_filesystem.sql rename to transformations/k8s/macros/pod_security/daemonset_immutable_container_filesystem.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/daemonset_non_root_container.sql b/transformations/k8s/macros/pod_security/daemonset_non_root_container.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/daemonset_non_root_container.sql rename to transformations/k8s/macros/pod_security/daemonset_non_root_container.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/deployment_container_privilege_disabled.sql b/transformations/k8s/macros/pod_security/deployment_container_privilege_disabled.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/deployment_container_privilege_disabled.sql rename to transformations/k8s/macros/pod_security/deployment_container_privilege_disabled.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/deployment_container_privilege_escalation_disabled.sql b/transformations/k8s/macros/pod_security/deployment_container_privilege_escalation_disabled.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/deployment_container_privilege_escalation_disabled.sql rename to transformations/k8s/macros/pod_security/deployment_container_privilege_escalation_disabled.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/deployment_host_network_access_disabled.sql b/transformations/k8s/macros/pod_security/deployment_host_network_access_disabled.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/deployment_host_network_access_disabled.sql rename to transformations/k8s/macros/pod_security/deployment_host_network_access_disabled.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/deployment_hostpid_hostipc_sharing_disabled.sql b/transformations/k8s/macros/pod_security/deployment_hostpid_hostipc_sharing_disabled.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/deployment_hostpid_hostipc_sharing_disabled.sql rename to transformations/k8s/macros/pod_security/deployment_hostpid_hostipc_sharing_disabled.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/deployment_immutable_container_filesystem.sql b/transformations/k8s/macros/pod_security/deployment_immutable_container_filesystem.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/deployment_immutable_container_filesystem.sql rename to transformations/k8s/macros/pod_security/deployment_immutable_container_filesystem.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/deployment_non_root_container.sql b/transformations/k8s/macros/pod_security/deployment_non_root_container.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/deployment_non_root_container.sql rename to transformations/k8s/macros/pod_security/deployment_non_root_container.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/job_container_privilege_disabled.sql b/transformations/k8s/macros/pod_security/job_container_privilege_disabled.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/job_container_privilege_disabled.sql rename to transformations/k8s/macros/pod_security/job_container_privilege_disabled.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/job_container_privilege_escalation_disabled.sql b/transformations/k8s/macros/pod_security/job_container_privilege_escalation_disabled.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/job_container_privilege_escalation_disabled.sql rename to transformations/k8s/macros/pod_security/job_container_privilege_escalation_disabled.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/job_host_network_access_disabled.sql b/transformations/k8s/macros/pod_security/job_host_network_access_disabled.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/job_host_network_access_disabled.sql rename to transformations/k8s/macros/pod_security/job_host_network_access_disabled.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/job_hostpid_hostipc_sharing_disabled.sql b/transformations/k8s/macros/pod_security/job_hostpid_hostipc_sharing_disabled.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/job_hostpid_hostipc_sharing_disabled.sql rename to transformations/k8s/macros/pod_security/job_hostpid_hostipc_sharing_disabled.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/job_immutable_container_filesystem.sql b/transformations/k8s/macros/pod_security/job_immutable_container_filesystem.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/job_immutable_container_filesystem.sql rename to transformations/k8s/macros/pod_security/job_immutable_container_filesystem.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/job_non_root_container.sql b/transformations/k8s/macros/pod_security/job_non_root_container.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/job_non_root_container.sql rename to transformations/k8s/macros/pod_security/job_non_root_container.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/pod_container_privilege_disabled.sql b/transformations/k8s/macros/pod_security/pod_container_privilege_disabled.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/pod_container_privilege_disabled.sql rename to transformations/k8s/macros/pod_security/pod_container_privilege_disabled.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/pod_container_privilege_escalation_disabled.sql b/transformations/k8s/macros/pod_security/pod_container_privilege_escalation_disabled.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/pod_container_privilege_escalation_disabled.sql rename to transformations/k8s/macros/pod_security/pod_container_privilege_escalation_disabled.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/pod_host_network_access_disabled.sql b/transformations/k8s/macros/pod_security/pod_host_network_access_disabled.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/pod_host_network_access_disabled.sql rename to transformations/k8s/macros/pod_security/pod_host_network_access_disabled.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/pod_hostpid_hostipc_sharing_disabled.sql b/transformations/k8s/macros/pod_security/pod_hostpid_hostipc_sharing_disabled.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/pod_hostpid_hostipc_sharing_disabled.sql rename to transformations/k8s/macros/pod_security/pod_hostpid_hostipc_sharing_disabled.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/pod_immutable_container_filesystem.sql b/transformations/k8s/macros/pod_security/pod_immutable_container_filesystem.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/pod_immutable_container_filesystem.sql rename to transformations/k8s/macros/pod_security/pod_immutable_container_filesystem.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/pod_non_root_container.sql b/transformations/k8s/macros/pod_security/pod_non_root_container.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/pod_non_root_container.sql rename to transformations/k8s/macros/pod_security/pod_non_root_container.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/pod_service_account_token_disabled.sql b/transformations/k8s/macros/pod_security/pod_service_account_token_disabled.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/pod_service_account_token_disabled.sql rename to transformations/k8s/macros/pod_security/pod_service_account_token_disabled.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/pod_volume_host_path.sql b/transformations/k8s/macros/pod_security/pod_volume_host_path.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/pod_volume_host_path.sql rename to transformations/k8s/macros/pod_security/pod_volume_host_path.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/replicaset_container_privilege_disabled.sql b/transformations/k8s/macros/pod_security/replicaset_container_privilege_disabled.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/replicaset_container_privilege_disabled.sql rename to transformations/k8s/macros/pod_security/replicaset_container_privilege_disabled.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/replicaset_container_privilege_escalation_disabled.sql b/transformations/k8s/macros/pod_security/replicaset_container_privilege_escalation_disabled.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/replicaset_container_privilege_escalation_disabled.sql rename to transformations/k8s/macros/pod_security/replicaset_container_privilege_escalation_disabled.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/replicaset_host_network_access_disabled.sql b/transformations/k8s/macros/pod_security/replicaset_host_network_access_disabled.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/replicaset_host_network_access_disabled.sql rename to transformations/k8s/macros/pod_security/replicaset_host_network_access_disabled.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/replicaset_hostpid_hostipc_sharing_disabled.sql b/transformations/k8s/macros/pod_security/replicaset_hostpid_hostipc_sharing_disabled.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/replicaset_hostpid_hostipc_sharing_disabled.sql rename to transformations/k8s/macros/pod_security/replicaset_hostpid_hostipc_sharing_disabled.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/replicaset_immutable_container_filesystem.sql b/transformations/k8s/macros/pod_security/replicaset_immutable_container_filesystem.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/replicaset_immutable_container_filesystem.sql rename to transformations/k8s/macros/pod_security/replicaset_immutable_container_filesystem.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/replicaset_non_root_container.sql b/transformations/k8s/macros/pod_security/replicaset_non_root_container.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/replicaset_non_root_container.sql rename to transformations/k8s/macros/pod_security/replicaset_non_root_container.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security/service_account_token_disabled.sql b/transformations/k8s/macros/pod_security/service_account_token_disabled.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security/service_account_token_disabled.sql rename to transformations/k8s/macros/pod_security/service_account_token_disabled.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security_standards/pod_security_standards_5_2_10.sql b/transformations/k8s/macros/pod_security_standards/pod_security_standards_5_2_10.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security_standards/pod_security_standards_5_2_10.sql rename to transformations/k8s/macros/pod_security_standards/pod_security_standards_5_2_10.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security_standards/pod_security_standards_5_2_11.sql b/transformations/k8s/macros/pod_security_standards/pod_security_standards_5_2_11.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security_standards/pod_security_standards_5_2_11.sql rename to transformations/k8s/macros/pod_security_standards/pod_security_standards_5_2_11.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security_standards/pod_security_standards_5_2_12.sql b/transformations/k8s/macros/pod_security_standards/pod_security_standards_5_2_12.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security_standards/pod_security_standards_5_2_12.sql rename to transformations/k8s/macros/pod_security_standards/pod_security_standards_5_2_12.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security_standards/pod_security_standards_5_2_13.sql b/transformations/k8s/macros/pod_security_standards/pod_security_standards_5_2_13.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security_standards/pod_security_standards_5_2_13.sql rename to transformations/k8s/macros/pod_security_standards/pod_security_standards_5_2_13.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security_standards/pod_security_standards_5_2_2.sql b/transformations/k8s/macros/pod_security_standards/pod_security_standards_5_2_2.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security_standards/pod_security_standards_5_2_2.sql rename to transformations/k8s/macros/pod_security_standards/pod_security_standards_5_2_2.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security_standards/pod_security_standards_5_2_3.sql b/transformations/k8s/macros/pod_security_standards/pod_security_standards_5_2_3.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security_standards/pod_security_standards_5_2_3.sql rename to transformations/k8s/macros/pod_security_standards/pod_security_standards_5_2_3.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security_standards/pod_security_standards_5_2_4.sql b/transformations/k8s/macros/pod_security_standards/pod_security_standards_5_2_4.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security_standards/pod_security_standards_5_2_4.sql rename to transformations/k8s/macros/pod_security_standards/pod_security_standards_5_2_4.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security_standards/pod_security_standards_5_2_5.sql b/transformations/k8s/macros/pod_security_standards/pod_security_standards_5_2_5.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security_standards/pod_security_standards_5_2_5.sql rename to transformations/k8s/macros/pod_security_standards/pod_security_standards_5_2_5.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security_standards/pod_security_standards_5_2_6.sql b/transformations/k8s/macros/pod_security_standards/pod_security_standards_5_2_6.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security_standards/pod_security_standards_5_2_6.sql rename to transformations/k8s/macros/pod_security_standards/pod_security_standards_5_2_6.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security_standards/pod_security_standards_5_2_8.sql b/transformations/k8s/macros/pod_security_standards/pod_security_standards_5_2_8.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security_standards/pod_security_standards_5_2_8.sql rename to transformations/k8s/macros/pod_security_standards/pod_security_standards_5_2_8.sql diff --git a/transformations/k8s_compliance/macros/pro/pod_security_standards/pod_security_standards_5_2_9.sql b/transformations/k8s/macros/pod_security_standards/pod_security_standards_5_2_9.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/pod_security_standards/pod_security_standards_5_2_9.sql rename to transformations/k8s/macros/pod_security_standards/pod_security_standards_5_2_9.sql diff --git a/transformations/k8s_compliance/macros/pro/rbac_and_service_accounts/rbac_and_service_accounts_5_1_1.sql b/transformations/k8s/macros/rbac_and_service_accounts/rbac_and_service_accounts_5_1_1.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/rbac_and_service_accounts/rbac_and_service_accounts_5_1_1.sql rename to transformations/k8s/macros/rbac_and_service_accounts/rbac_and_service_accounts_5_1_1.sql diff --git a/transformations/k8s_compliance/macros/pro/rbac_and_service_accounts/rbac_and_service_accounts_5_1_10.sql b/transformations/k8s/macros/rbac_and_service_accounts/rbac_and_service_accounts_5_1_10.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/rbac_and_service_accounts/rbac_and_service_accounts_5_1_10.sql rename to transformations/k8s/macros/rbac_and_service_accounts/rbac_and_service_accounts_5_1_10.sql diff --git a/transformations/k8s_compliance/macros/pro/rbac_and_service_accounts/rbac_and_service_accounts_5_1_11.sql b/transformations/k8s/macros/rbac_and_service_accounts/rbac_and_service_accounts_5_1_11.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/rbac_and_service_accounts/rbac_and_service_accounts_5_1_11.sql rename to transformations/k8s/macros/rbac_and_service_accounts/rbac_and_service_accounts_5_1_11.sql diff --git a/transformations/k8s_compliance/macros/pro/rbac_and_service_accounts/rbac_and_service_accounts_5_1_12.sql b/transformations/k8s/macros/rbac_and_service_accounts/rbac_and_service_accounts_5_1_12.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/rbac_and_service_accounts/rbac_and_service_accounts_5_1_12.sql rename to transformations/k8s/macros/rbac_and_service_accounts/rbac_and_service_accounts_5_1_12.sql diff --git a/transformations/k8s_compliance/macros/pro/rbac_and_service_accounts/rbac_and_service_accounts_5_1_13.sql b/transformations/k8s/macros/rbac_and_service_accounts/rbac_and_service_accounts_5_1_13.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/rbac_and_service_accounts/rbac_and_service_accounts_5_1_13.sql rename to transformations/k8s/macros/rbac_and_service_accounts/rbac_and_service_accounts_5_1_13.sql diff --git a/transformations/k8s_compliance/macros/pro/rbac_and_service_accounts/rbac_and_service_accounts_5_1_2.sql b/transformations/k8s/macros/rbac_and_service_accounts/rbac_and_service_accounts_5_1_2.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/rbac_and_service_accounts/rbac_and_service_accounts_5_1_2.sql rename to transformations/k8s/macros/rbac_and_service_accounts/rbac_and_service_accounts_5_1_2.sql diff --git a/transformations/k8s_compliance/macros/pro/rbac_and_service_accounts/rbac_and_service_accounts_5_1_3.sql b/transformations/k8s/macros/rbac_and_service_accounts/rbac_and_service_accounts_5_1_3.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/rbac_and_service_accounts/rbac_and_service_accounts_5_1_3.sql rename to transformations/k8s/macros/rbac_and_service_accounts/rbac_and_service_accounts_5_1_3.sql diff --git a/transformations/k8s_compliance/macros/pro/rbac_and_service_accounts/rbac_and_service_accounts_5_1_4.sql b/transformations/k8s/macros/rbac_and_service_accounts/rbac_and_service_accounts_5_1_4.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/rbac_and_service_accounts/rbac_and_service_accounts_5_1_4.sql rename to transformations/k8s/macros/rbac_and_service_accounts/rbac_and_service_accounts_5_1_4.sql diff --git a/transformations/k8s_compliance/macros/pro/rbac_and_service_accounts/rbac_and_service_accounts_5_1_5.sql b/transformations/k8s/macros/rbac_and_service_accounts/rbac_and_service_accounts_5_1_5.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/rbac_and_service_accounts/rbac_and_service_accounts_5_1_5.sql rename to transformations/k8s/macros/rbac_and_service_accounts/rbac_and_service_accounts_5_1_5.sql diff --git a/transformations/k8s_compliance/macros/pro/rbac_and_service_accounts/rbac_and_service_accounts_5_1_6.sql b/transformations/k8s/macros/rbac_and_service_accounts/rbac_and_service_accounts_5_1_6.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/rbac_and_service_accounts/rbac_and_service_accounts_5_1_6.sql rename to transformations/k8s/macros/rbac_and_service_accounts/rbac_and_service_accounts_5_1_6.sql diff --git a/transformations/k8s_compliance/macros/pro/rbac_and_service_accounts/rbac_and_service_accounts_5_1_7.sql b/transformations/k8s/macros/rbac_and_service_accounts/rbac_and_service_accounts_5_1_7.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/rbac_and_service_accounts/rbac_and_service_accounts_5_1_7.sql rename to transformations/k8s/macros/rbac_and_service_accounts/rbac_and_service_accounts_5_1_7.sql diff --git a/transformations/k8s_compliance/macros/pro/rbac_and_service_accounts/rbac_and_service_accounts_5_1_8.sql b/transformations/k8s/macros/rbac_and_service_accounts/rbac_and_service_accounts_5_1_8.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/rbac_and_service_accounts/rbac_and_service_accounts_5_1_8.sql rename to transformations/k8s/macros/rbac_and_service_accounts/rbac_and_service_accounts_5_1_8.sql diff --git a/transformations/k8s_compliance/macros/pro/rbac_and_service_accounts/rbac_and_service_accounts_5_1_9.sql b/transformations/k8s/macros/rbac_and_service_accounts/rbac_and_service_accounts_5_1_9.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/rbac_and_service_accounts/rbac_and_service_accounts_5_1_9.sql rename to transformations/k8s/macros/rbac_and_service_accounts/rbac_and_service_accounts_5_1_9.sql diff --git a/transformations/k8s_compliance/macros/pro/scheduler/scheduler_1_4_1.sql b/transformations/k8s/macros/scheduler/scheduler_1_4_1.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/scheduler/scheduler_1_4_1.sql rename to transformations/k8s/macros/scheduler/scheduler_1_4_1.sql diff --git a/transformations/k8s_compliance/macros/pro/scheduler/scheduler_1_4_2.sql b/transformations/k8s/macros/scheduler/scheduler_1_4_2.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/scheduler/scheduler_1_4_2.sql rename to transformations/k8s/macros/scheduler/scheduler_1_4_2.sql diff --git a/transformations/k8s_compliance/macros/pro/secrets_management/pod_security_standards_5_4_1.sql b/transformations/k8s/macros/secrets_management/pod_security_standards_5_4_1.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/secrets_management/pod_security_standards_5_4_1.sql rename to transformations/k8s/macros/secrets_management/pod_security_standards_5_4_1.sql diff --git a/transformations/k8s_compliance/macros/pro/secrets_management/pod_security_standards_5_4_2.sql b/transformations/k8s/macros/secrets_management/pod_security_standards_5_4_2.sql similarity index 100% rename from transformations/k8s_compliance/macros/pro/secrets_management/pod_security_standards_5_4_2.sql rename to transformations/k8s/macros/secrets_management/pod_security_standards_5_4_2.sql diff --git a/transformations/k8s_compliance/Makefile b/transformations/k8s_compliance/Makefile deleted file mode 100644 index ddc978116..000000000 --- a/transformations/k8s_compliance/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -.PHONY: build-free -build-free: - @echo "Building free tier compliance pack" - rm -rf ./build/k8s_compliance_free - mkdir -p ./build/k8s_compliance_free - mkdir ./build/k8s_compliance_free/macros - mkdir ./build/k8s_compliance_free/models - cp -r macros/free ./build/k8s_compliance_free/macros/. - cp -r models/free ./build/k8s_compliance_free/models/. - cp dbt_project.yml ./build/k8s_compliance_free/ - zip -r ./build/k8s_compliance_free.zip ./build/k8s_compliance_free - -.PHONY: build-premium -build-premium: - @echo "Building premium tier compliance pack" - rm -rf ./build/k8s_compliance_premium - mkdir -p ./build/k8s_compliance_premium - mkdir ./build/k8s_compliance_premium/macros - mkdir ./build/k8s_compliance_premium/models - cp -r macros/free ./build/k8s_compliance_premium/macros/. - cp -r macros/pro ./build/k8s_compliance_premium/macros/. - cp -r models/pro ./build/k8s_compliance_premium/models/. - cp dbt_project.yml ./build/k8s_compliance_premium/ - cp requirements.txt ./build/k8s_compliance_premium/ - zip -r ./build/k8s_compliance_premium.zip ./build/k8s_compliance_premium \ No newline at end of file diff --git a/transformations/k8s_compliance/packages.yml b/transformations/k8s_compliance/packages.yml deleted file mode 100644 index 77f86795c..000000000 --- a/transformations/k8s_compliance/packages.yml +++ /dev/null @@ -1,2 +0,0 @@ -packages: - - local: "../utils" \ No newline at end of file