diff --git a/rules/.manifest b/checks/.manifest similarity index 100% rename from rules/.manifest rename to checks/.manifest diff --git a/rules/cloud/policies/aws/accessanalyzer/enable_access_analyzer.go b/checks/cloud/aws/accessanalyzer/enable_access_analyzer.go similarity index 95% rename from rules/cloud/policies/aws/accessanalyzer/enable_access_analyzer.go rename to checks/cloud/aws/accessanalyzer/enable_access_analyzer.go index 3017de56..902b27b4 100755 --- a/rules/cloud/policies/aws/accessanalyzer/enable_access_analyzer.go +++ b/checks/cloud/aws/accessanalyzer/enable_access_analyzer.go @@ -7,10 +7,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" defsecTypes "github.com/aquasecurity/defsec/pkg/types" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableAccessAnalyzer = rules.Register( +var CheckEnableAccessAnalyzer = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0175", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/accessanalyzer/enable_access_analyzer_test.go b/checks/cloud/aws/accessanalyzer/enable_access_analyzer_test.go similarity index 100% rename from rules/cloud/policies/aws/accessanalyzer/enable_access_analyzer_test.go rename to checks/cloud/aws/accessanalyzer/enable_access_analyzer_test.go diff --git a/rules/cloud/policies/aws/apigateway/enable_access_logging.cf.go b/checks/cloud/aws/apigateway/enable_access_logging.cf.go similarity index 100% rename from rules/cloud/policies/aws/apigateway/enable_access_logging.cf.go rename to checks/cloud/aws/apigateway/enable_access_logging.cf.go diff --git a/rules/cloud/policies/aws/apigateway/enable_access_logging.go b/checks/cloud/aws/apigateway/enable_access_logging.go similarity index 95% rename from rules/cloud/policies/aws/apigateway/enable_access_logging.go rename to checks/cloud/aws/apigateway/enable_access_logging.go index 81577d8a..52c2aa97 100755 --- a/rules/cloud/policies/aws/apigateway/enable_access_logging.go +++ b/checks/cloud/aws/apigateway/enable_access_logging.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableAccessLogging = rules.Register( +var CheckEnableAccessLogging = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0001", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/apigateway/enable_access_logging.tf.go b/checks/cloud/aws/apigateway/enable_access_logging.tf.go similarity index 100% rename from rules/cloud/policies/aws/apigateway/enable_access_logging.tf.go rename to checks/cloud/aws/apigateway/enable_access_logging.tf.go diff --git a/rules/cloud/policies/aws/apigateway/enable_access_logging_test.go b/checks/cloud/aws/apigateway/enable_access_logging_test.go similarity index 100% rename from rules/cloud/policies/aws/apigateway/enable_access_logging_test.go rename to checks/cloud/aws/apigateway/enable_access_logging_test.go diff --git a/rules/cloud/policies/aws/apigateway/enable_cache.go b/checks/cloud/aws/apigateway/enable_cache.go similarity index 95% rename from rules/cloud/policies/aws/apigateway/enable_cache.go rename to checks/cloud/aws/apigateway/enable_cache.go index 65ae11fb..80324025 100644 --- a/rules/cloud/policies/aws/apigateway/enable_cache.go +++ b/checks/cloud/aws/apigateway/enable_cache.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableCache = rules.Register( +var CheckEnableCache = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0190", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/apigateway/enable_cache.tf.go b/checks/cloud/aws/apigateway/enable_cache.tf.go similarity index 100% rename from rules/cloud/policies/aws/apigateway/enable_cache.tf.go rename to checks/cloud/aws/apigateway/enable_cache.tf.go diff --git a/rules/cloud/policies/aws/apigateway/enable_cache_encryption.go b/checks/cloud/aws/apigateway/enable_cache_encryption.go similarity index 94% rename from rules/cloud/policies/aws/apigateway/enable_cache_encryption.go rename to checks/cloud/aws/apigateway/enable_cache_encryption.go index ac7dd5d8..02639e19 100755 --- a/rules/cloud/policies/aws/apigateway/enable_cache_encryption.go +++ b/checks/cloud/aws/apigateway/enable_cache_encryption.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableCacheEncryption = rules.Register( +var CheckEnableCacheEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0002", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/apigateway/enable_cache_encryption.tf.go b/checks/cloud/aws/apigateway/enable_cache_encryption.tf.go similarity index 100% rename from rules/cloud/policies/aws/apigateway/enable_cache_encryption.tf.go rename to checks/cloud/aws/apigateway/enable_cache_encryption.tf.go diff --git a/rules/cloud/policies/aws/apigateway/enable_cache_encryption_test.go b/checks/cloud/aws/apigateway/enable_cache_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/apigateway/enable_cache_encryption_test.go rename to checks/cloud/aws/apigateway/enable_cache_encryption_test.go diff --git a/rules/cloud/policies/aws/apigateway/enable_cache_test.go b/checks/cloud/aws/apigateway/enable_cache_test.go similarity index 100% rename from rules/cloud/policies/aws/apigateway/enable_cache_test.go rename to checks/cloud/aws/apigateway/enable_cache_test.go diff --git a/rules/cloud/policies/aws/apigateway/enable_tracing.go b/checks/cloud/aws/apigateway/enable_tracing.go similarity index 93% rename from rules/cloud/policies/aws/apigateway/enable_tracing.go rename to checks/cloud/aws/apigateway/enable_tracing.go index d4e6a2e3..84ac919f 100755 --- a/rules/cloud/policies/aws/apigateway/enable_tracing.go +++ b/checks/cloud/aws/apigateway/enable_tracing.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableTracing = rules.Register( +var CheckEnableTracing = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0003", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/apigateway/enable_tracing.tf.go b/checks/cloud/aws/apigateway/enable_tracing.tf.go similarity index 100% rename from rules/cloud/policies/aws/apigateway/enable_tracing.tf.go rename to checks/cloud/aws/apigateway/enable_tracing.tf.go diff --git a/rules/cloud/policies/aws/apigateway/enable_tracing_test.go b/checks/cloud/aws/apigateway/enable_tracing_test.go similarity index 100% rename from rules/cloud/policies/aws/apigateway/enable_tracing_test.go rename to checks/cloud/aws/apigateway/enable_tracing_test.go diff --git a/rules/cloud/policies/aws/apigateway/no_public_access.go b/checks/cloud/aws/apigateway/no_public_access.go similarity index 94% rename from rules/cloud/policies/aws/apigateway/no_public_access.go rename to checks/cloud/aws/apigateway/no_public_access.go index e2b4e8b9..b14846b5 100755 --- a/rules/cloud/policies/aws/apigateway/no_public_access.go +++ b/checks/cloud/aws/apigateway/no_public_access.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicAccess = rules.Register( +var CheckNoPublicAccess = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0004", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/apigateway/no_public_access.tf.go b/checks/cloud/aws/apigateway/no_public_access.tf.go similarity index 100% rename from rules/cloud/policies/aws/apigateway/no_public_access.tf.go rename to checks/cloud/aws/apigateway/no_public_access.tf.go diff --git a/rules/cloud/policies/aws/apigateway/no_public_access_test.go b/checks/cloud/aws/apigateway/no_public_access_test.go similarity index 100% rename from rules/cloud/policies/aws/apigateway/no_public_access_test.go rename to checks/cloud/aws/apigateway/no_public_access_test.go diff --git a/rules/cloud/policies/aws/apigateway/use_secure_tls_policy.go b/checks/cloud/aws/apigateway/use_secure_tls_policy.go similarity index 94% rename from rules/cloud/policies/aws/apigateway/use_secure_tls_policy.go rename to checks/cloud/aws/apigateway/use_secure_tls_policy.go index d860dc07..172202b0 100755 --- a/rules/cloud/policies/aws/apigateway/use_secure_tls_policy.go +++ b/checks/cloud/aws/apigateway/use_secure_tls_policy.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckUseSecureTlsPolicy = rules.Register( +var CheckUseSecureTlsPolicy = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0005", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/apigateway/use_secure_tls_policy.tf.go b/checks/cloud/aws/apigateway/use_secure_tls_policy.tf.go similarity index 100% rename from rules/cloud/policies/aws/apigateway/use_secure_tls_policy.tf.go rename to checks/cloud/aws/apigateway/use_secure_tls_policy.tf.go diff --git a/rules/cloud/policies/aws/apigateway/use_secure_tls_policy_test.go b/checks/cloud/aws/apigateway/use_secure_tls_policy_test.go similarity index 100% rename from rules/cloud/policies/aws/apigateway/use_secure_tls_policy_test.go rename to checks/cloud/aws/apigateway/use_secure_tls_policy_test.go diff --git a/rules/cloud/policies/aws/athena/enable_at_rest_encryption.cf.go b/checks/cloud/aws/athena/enable_at_rest_encryption.cf.go similarity index 100% rename from rules/cloud/policies/aws/athena/enable_at_rest_encryption.cf.go rename to checks/cloud/aws/athena/enable_at_rest_encryption.cf.go diff --git a/rules/cloud/policies/aws/athena/enable_at_rest_encryption.go b/checks/cloud/aws/athena/enable_at_rest_encryption.go similarity index 95% rename from rules/cloud/policies/aws/athena/enable_at_rest_encryption.go rename to checks/cloud/aws/athena/enable_at_rest_encryption.go index 384c6cda..fee67aee 100755 --- a/rules/cloud/policies/aws/athena/enable_at_rest_encryption.go +++ b/checks/cloud/aws/athena/enable_at_rest_encryption.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableAtRestEncryption = rules.Register( +var CheckEnableAtRestEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0006", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/athena/enable_at_rest_encryption.tf.go b/checks/cloud/aws/athena/enable_at_rest_encryption.tf.go similarity index 100% rename from rules/cloud/policies/aws/athena/enable_at_rest_encryption.tf.go rename to checks/cloud/aws/athena/enable_at_rest_encryption.tf.go diff --git a/rules/cloud/policies/aws/athena/enable_at_rest_encryption_test.go b/checks/cloud/aws/athena/enable_at_rest_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/athena/enable_at_rest_encryption_test.go rename to checks/cloud/aws/athena/enable_at_rest_encryption_test.go diff --git a/rules/cloud/policies/aws/athena/no_encryption_override.cf.go b/checks/cloud/aws/athena/no_encryption_override.cf.go similarity index 100% rename from rules/cloud/policies/aws/athena/no_encryption_override.cf.go rename to checks/cloud/aws/athena/no_encryption_override.cf.go diff --git a/rules/cloud/policies/aws/athena/no_encryption_override.go b/checks/cloud/aws/athena/no_encryption_override.go similarity index 94% rename from rules/cloud/policies/aws/athena/no_encryption_override.go rename to checks/cloud/aws/athena/no_encryption_override.go index 7de17ad1..6c39ffb5 100755 --- a/rules/cloud/policies/aws/athena/no_encryption_override.go +++ b/checks/cloud/aws/athena/no_encryption_override.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoEncryptionOverride = rules.Register( +var CheckNoEncryptionOverride = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0007", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/athena/no_encryption_override.tf.go b/checks/cloud/aws/athena/no_encryption_override.tf.go similarity index 100% rename from rules/cloud/policies/aws/athena/no_encryption_override.tf.go rename to checks/cloud/aws/athena/no_encryption_override.tf.go diff --git a/rules/cloud/policies/aws/athena/no_encryption_override_test.go b/checks/cloud/aws/athena/no_encryption_override_test.go similarity index 100% rename from rules/cloud/policies/aws/athena/no_encryption_override_test.go rename to checks/cloud/aws/athena/no_encryption_override_test.go diff --git a/rules/cloud/policies/aws/cloudfront/enable_logging.cf.go b/checks/cloud/aws/cloudfront/enable_logging.cf.go similarity index 100% rename from rules/cloud/policies/aws/cloudfront/enable_logging.cf.go rename to checks/cloud/aws/cloudfront/enable_logging.cf.go diff --git a/rules/cloud/policies/aws/cloudfront/enable_logging.go b/checks/cloud/aws/cloudfront/enable_logging.go similarity index 94% rename from rules/cloud/policies/aws/cloudfront/enable_logging.go rename to checks/cloud/aws/cloudfront/enable_logging.go index 203335f6..b8d4da14 100755 --- a/rules/cloud/policies/aws/cloudfront/enable_logging.go +++ b/checks/cloud/aws/cloudfront/enable_logging.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableLogging = rules.Register( +var CheckEnableLogging = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0010", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/cloudfront/enable_logging.tf.go b/checks/cloud/aws/cloudfront/enable_logging.tf.go similarity index 100% rename from rules/cloud/policies/aws/cloudfront/enable_logging.tf.go rename to checks/cloud/aws/cloudfront/enable_logging.tf.go diff --git a/rules/cloud/policies/aws/cloudfront/enable_logging_test.go b/checks/cloud/aws/cloudfront/enable_logging_test.go similarity index 100% rename from rules/cloud/policies/aws/cloudfront/enable_logging_test.go rename to checks/cloud/aws/cloudfront/enable_logging_test.go diff --git a/rules/cloud/policies/aws/cloudfront/enable_waf.cf.go b/checks/cloud/aws/cloudfront/enable_waf.cf.go similarity index 100% rename from rules/cloud/policies/aws/cloudfront/enable_waf.cf.go rename to checks/cloud/aws/cloudfront/enable_waf.cf.go diff --git a/rules/cloud/policies/aws/cloudfront/enable_waf.go b/checks/cloud/aws/cloudfront/enable_waf.go similarity index 94% rename from rules/cloud/policies/aws/cloudfront/enable_waf.go rename to checks/cloud/aws/cloudfront/enable_waf.go index a4c37289..56b728a5 100755 --- a/rules/cloud/policies/aws/cloudfront/enable_waf.go +++ b/checks/cloud/aws/cloudfront/enable_waf.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableWaf = rules.Register( +var CheckEnableWaf = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0011", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/cloudfront/enable_waf.tf.go b/checks/cloud/aws/cloudfront/enable_waf.tf.go similarity index 100% rename from rules/cloud/policies/aws/cloudfront/enable_waf.tf.go rename to checks/cloud/aws/cloudfront/enable_waf.tf.go diff --git a/rules/cloud/policies/aws/cloudfront/enable_waf_test.go b/checks/cloud/aws/cloudfront/enable_waf_test.go similarity index 100% rename from rules/cloud/policies/aws/cloudfront/enable_waf_test.go rename to checks/cloud/aws/cloudfront/enable_waf_test.go diff --git a/rules/cloud/policies/aws/cloudfront/enforce_https.cf.go b/checks/cloud/aws/cloudfront/enforce_https.cf.go similarity index 100% rename from rules/cloud/policies/aws/cloudfront/enforce_https.cf.go rename to checks/cloud/aws/cloudfront/enforce_https.cf.go diff --git a/rules/cloud/policies/aws/cloudfront/enforce_https.go b/checks/cloud/aws/cloudfront/enforce_https.go similarity index 96% rename from rules/cloud/policies/aws/cloudfront/enforce_https.go rename to checks/cloud/aws/cloudfront/enforce_https.go index 47b4206a..d4ac081a 100755 --- a/rules/cloud/policies/aws/cloudfront/enforce_https.go +++ b/checks/cloud/aws/cloudfront/enforce_https.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnforceHttps = rules.Register( +var CheckEnforceHttps = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0012", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/cloudfront/enforce_https.tf.go b/checks/cloud/aws/cloudfront/enforce_https.tf.go similarity index 100% rename from rules/cloud/policies/aws/cloudfront/enforce_https.tf.go rename to checks/cloud/aws/cloudfront/enforce_https.tf.go diff --git a/rules/cloud/policies/aws/cloudfront/enforce_https_test.go b/checks/cloud/aws/cloudfront/enforce_https_test.go similarity index 100% rename from rules/cloud/policies/aws/cloudfront/enforce_https_test.go rename to checks/cloud/aws/cloudfront/enforce_https_test.go diff --git a/rules/cloud/policies/aws/cloudfront/use_secure_tls_policy.cf.go b/checks/cloud/aws/cloudfront/use_secure_tls_policy.cf.go similarity index 100% rename from rules/cloud/policies/aws/cloudfront/use_secure_tls_policy.cf.go rename to checks/cloud/aws/cloudfront/use_secure_tls_policy.cf.go diff --git a/rules/cloud/policies/aws/cloudfront/use_secure_tls_policy.go b/checks/cloud/aws/cloudfront/use_secure_tls_policy.go similarity index 96% rename from rules/cloud/policies/aws/cloudfront/use_secure_tls_policy.go rename to checks/cloud/aws/cloudfront/use_secure_tls_policy.go index 39d91767..bcf70d81 100755 --- a/rules/cloud/policies/aws/cloudfront/use_secure_tls_policy.go +++ b/checks/cloud/aws/cloudfront/use_secure_tls_policy.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckUseSecureTlsPolicy = rules.Register( +var CheckUseSecureTlsPolicy = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0013", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/cloudfront/use_secure_tls_policy.tf.go b/checks/cloud/aws/cloudfront/use_secure_tls_policy.tf.go similarity index 100% rename from rules/cloud/policies/aws/cloudfront/use_secure_tls_policy.tf.go rename to checks/cloud/aws/cloudfront/use_secure_tls_policy.tf.go diff --git a/rules/cloud/policies/aws/cloudfront/use_secure_tls_policy_test.go b/checks/cloud/aws/cloudfront/use_secure_tls_policy_test.go similarity index 100% rename from rules/cloud/policies/aws/cloudfront/use_secure_tls_policy_test.go rename to checks/cloud/aws/cloudfront/use_secure_tls_policy_test.go diff --git a/rules/cloud/policies/aws/cloudtrail/enable_all_regions.cf.go b/checks/cloud/aws/cloudtrail/enable_all_regions.cf.go similarity index 100% rename from rules/cloud/policies/aws/cloudtrail/enable_all_regions.cf.go rename to checks/cloud/aws/cloudtrail/enable_all_regions.cf.go diff --git a/rules/cloud/policies/aws/cloudtrail/enable_all_regions.go b/checks/cloud/aws/cloudtrail/enable_all_regions.go similarity index 95% rename from rules/cloud/policies/aws/cloudtrail/enable_all_regions.go rename to checks/cloud/aws/cloudtrail/enable_all_regions.go index b9a765d3..32a0629c 100755 --- a/rules/cloud/policies/aws/cloudtrail/enable_all_regions.go +++ b/checks/cloud/aws/cloudtrail/enable_all_regions.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableAllRegions = rules.Register( +var CheckEnableAllRegions = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0014", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/cloudtrail/enable_all_regions.tf.go b/checks/cloud/aws/cloudtrail/enable_all_regions.tf.go similarity index 100% rename from rules/cloud/policies/aws/cloudtrail/enable_all_regions.tf.go rename to checks/cloud/aws/cloudtrail/enable_all_regions.tf.go diff --git a/rules/cloud/policies/aws/cloudtrail/enable_all_regions_test.go b/checks/cloud/aws/cloudtrail/enable_all_regions_test.go similarity index 100% rename from rules/cloud/policies/aws/cloudtrail/enable_all_regions_test.go rename to checks/cloud/aws/cloudtrail/enable_all_regions_test.go diff --git a/rules/cloud/policies/aws/cloudtrail/enable_at_rest_encryption.cf.go b/checks/cloud/aws/cloudtrail/enable_at_rest_encryption.cf.go similarity index 100% rename from rules/cloud/policies/aws/cloudtrail/enable_at_rest_encryption.cf.go rename to checks/cloud/aws/cloudtrail/enable_at_rest_encryption.cf.go diff --git a/rules/cloud/policies/aws/cloudtrail/enable_at_rest_encryption.go b/checks/cloud/aws/cloudtrail/enable_at_rest_encryption.go similarity index 94% rename from rules/cloud/policies/aws/cloudtrail/enable_at_rest_encryption.go rename to checks/cloud/aws/cloudtrail/enable_at_rest_encryption.go index 83fb8fb9..4368cf45 100755 --- a/rules/cloud/policies/aws/cloudtrail/enable_at_rest_encryption.go +++ b/checks/cloud/aws/cloudtrail/enable_at_rest_encryption.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableAtRestEncryption = rules.Register( +var CheckEnableAtRestEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0015", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/cloudtrail/enable_at_rest_encryption.tf.go b/checks/cloud/aws/cloudtrail/enable_at_rest_encryption.tf.go similarity index 100% rename from rules/cloud/policies/aws/cloudtrail/enable_at_rest_encryption.tf.go rename to checks/cloud/aws/cloudtrail/enable_at_rest_encryption.tf.go diff --git a/rules/cloud/policies/aws/cloudtrail/enable_at_rest_encryption_test.go b/checks/cloud/aws/cloudtrail/enable_at_rest_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/cloudtrail/enable_at_rest_encryption_test.go rename to checks/cloud/aws/cloudtrail/enable_at_rest_encryption_test.go diff --git a/rules/cloud/policies/aws/cloudtrail/enable_log_validation.cf.go b/checks/cloud/aws/cloudtrail/enable_log_validation.cf.go similarity index 100% rename from rules/cloud/policies/aws/cloudtrail/enable_log_validation.cf.go rename to checks/cloud/aws/cloudtrail/enable_log_validation.cf.go diff --git a/rules/cloud/policies/aws/cloudtrail/enable_log_validation.go b/checks/cloud/aws/cloudtrail/enable_log_validation.go similarity index 95% rename from rules/cloud/policies/aws/cloudtrail/enable_log_validation.go rename to checks/cloud/aws/cloudtrail/enable_log_validation.go index 53150dc0..ecd8c523 100755 --- a/rules/cloud/policies/aws/cloudtrail/enable_log_validation.go +++ b/checks/cloud/aws/cloudtrail/enable_log_validation.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableLogValidation = rules.Register( +var CheckEnableLogValidation = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0016", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/cloudtrail/enable_log_validation.tf.go b/checks/cloud/aws/cloudtrail/enable_log_validation.tf.go similarity index 100% rename from rules/cloud/policies/aws/cloudtrail/enable_log_validation.tf.go rename to checks/cloud/aws/cloudtrail/enable_log_validation.tf.go diff --git a/rules/cloud/policies/aws/cloudtrail/enable_log_validation_test.go b/checks/cloud/aws/cloudtrail/enable_log_validation_test.go similarity index 100% rename from rules/cloud/policies/aws/cloudtrail/enable_log_validation_test.go rename to checks/cloud/aws/cloudtrail/enable_log_validation_test.go diff --git a/rules/cloud/policies/aws/cloudtrail/ensure_cloudwatch_integration.cf.go b/checks/cloud/aws/cloudtrail/ensure_cloudwatch_integration.cf.go similarity index 100% rename from rules/cloud/policies/aws/cloudtrail/ensure_cloudwatch_integration.cf.go rename to checks/cloud/aws/cloudtrail/ensure_cloudwatch_integration.cf.go diff --git a/rules/cloud/policies/aws/cloudtrail/ensure_cloudwatch_integration.go b/checks/cloud/aws/cloudtrail/ensure_cloudwatch_integration.go similarity index 96% rename from rules/cloud/policies/aws/cloudtrail/ensure_cloudwatch_integration.go rename to checks/cloud/aws/cloudtrail/ensure_cloudwatch_integration.go index f45058de..711412cb 100755 --- a/rules/cloud/policies/aws/cloudtrail/ensure_cloudwatch_integration.go +++ b/checks/cloud/aws/cloudtrail/ensure_cloudwatch_integration.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var checkEnsureCloudwatchIntegration = rules.Register( +var checkEnsureCloudwatchIntegration = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0162", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/cloudtrail/ensure_cloudwatch_integration.tf.go b/checks/cloud/aws/cloudtrail/ensure_cloudwatch_integration.tf.go similarity index 100% rename from rules/cloud/policies/aws/cloudtrail/ensure_cloudwatch_integration.tf.go rename to checks/cloud/aws/cloudtrail/ensure_cloudwatch_integration.tf.go diff --git a/rules/cloud/policies/aws/cloudtrail/ensure_cloudwatch_integration_test.go b/checks/cloud/aws/cloudtrail/ensure_cloudwatch_integration_test.go similarity index 100% rename from rules/cloud/policies/aws/cloudtrail/ensure_cloudwatch_integration_test.go rename to checks/cloud/aws/cloudtrail/ensure_cloudwatch_integration_test.go diff --git a/rules/cloud/policies/aws/cloudtrail/no_public_log_access.cf.go b/checks/cloud/aws/cloudtrail/no_public_log_access.cf.go similarity index 100% rename from rules/cloud/policies/aws/cloudtrail/no_public_log_access.cf.go rename to checks/cloud/aws/cloudtrail/no_public_log_access.cf.go diff --git a/rules/cloud/policies/aws/cloudtrail/no_public_log_access.go b/checks/cloud/aws/cloudtrail/no_public_log_access.go similarity index 96% rename from rules/cloud/policies/aws/cloudtrail/no_public_log_access.go rename to checks/cloud/aws/cloudtrail/no_public_log_access.go index 2aa5541a..1180c6d6 100755 --- a/rules/cloud/policies/aws/cloudtrail/no_public_log_access.go +++ b/checks/cloud/aws/cloudtrail/no_public_log_access.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var checkNoPublicLogAccess = rules.Register( +var checkNoPublicLogAccess = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0161", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/cloudtrail/no_public_log_access.tf.go b/checks/cloud/aws/cloudtrail/no_public_log_access.tf.go similarity index 100% rename from rules/cloud/policies/aws/cloudtrail/no_public_log_access.tf.go rename to checks/cloud/aws/cloudtrail/no_public_log_access.tf.go diff --git a/rules/cloud/policies/aws/cloudtrail/no_public_log_access_test.go b/checks/cloud/aws/cloudtrail/no_public_log_access_test.go similarity index 100% rename from rules/cloud/policies/aws/cloudtrail/no_public_log_access_test.go rename to checks/cloud/aws/cloudtrail/no_public_log_access_test.go diff --git a/rules/cloud/policies/aws/cloudtrail/require_bucket_access_logging.cf.go b/checks/cloud/aws/cloudtrail/require_bucket_access_logging.cf.go similarity index 100% rename from rules/cloud/policies/aws/cloudtrail/require_bucket_access_logging.cf.go rename to checks/cloud/aws/cloudtrail/require_bucket_access_logging.cf.go diff --git a/rules/cloud/policies/aws/cloudtrail/require_bucket_access_logging.go b/checks/cloud/aws/cloudtrail/require_bucket_access_logging.go similarity index 96% rename from rules/cloud/policies/aws/cloudtrail/require_bucket_access_logging.go rename to checks/cloud/aws/cloudtrail/require_bucket_access_logging.go index e297847e..cc68e684 100755 --- a/rules/cloud/policies/aws/cloudtrail/require_bucket_access_logging.go +++ b/checks/cloud/aws/cloudtrail/require_bucket_access_logging.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var checkBucketAccessLoggingRequired = rules.Register( +var checkBucketAccessLoggingRequired = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0163", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/cloudtrail/require_bucket_access_logging.tf.go b/checks/cloud/aws/cloudtrail/require_bucket_access_logging.tf.go similarity index 100% rename from rules/cloud/policies/aws/cloudtrail/require_bucket_access_logging.tf.go rename to checks/cloud/aws/cloudtrail/require_bucket_access_logging.tf.go diff --git a/rules/cloud/policies/aws/cloudtrail/require_bucket_access_logging_test.go b/checks/cloud/aws/cloudtrail/require_bucket_access_logging_test.go similarity index 100% rename from rules/cloud/policies/aws/cloudtrail/require_bucket_access_logging_test.go rename to checks/cloud/aws/cloudtrail/require_bucket_access_logging_test.go diff --git a/rules/cloud/policies/aws/cloudwatch/log_group_customer_key.cf.go b/checks/cloud/aws/cloudwatch/log_group_customer_key.cf.go similarity index 100% rename from rules/cloud/policies/aws/cloudwatch/log_group_customer_key.cf.go rename to checks/cloud/aws/cloudwatch/log_group_customer_key.cf.go diff --git a/rules/cloud/policies/aws/cloudwatch/log_group_customer_key.go b/checks/cloud/aws/cloudwatch/log_group_customer_key.go similarity index 94% rename from rules/cloud/policies/aws/cloudwatch/log_group_customer_key.go rename to checks/cloud/aws/cloudwatch/log_group_customer_key.go index f2792ac6..f81474c5 100755 --- a/rules/cloud/policies/aws/cloudwatch/log_group_customer_key.go +++ b/checks/cloud/aws/cloudwatch/log_group_customer_key.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckLogGroupCustomerKey = rules.Register( +var CheckLogGroupCustomerKey = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0017", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/cloudwatch/log_group_customer_key.tf.go b/checks/cloud/aws/cloudwatch/log_group_customer_key.tf.go similarity index 100% rename from rules/cloud/policies/aws/cloudwatch/log_group_customer_key.tf.go rename to checks/cloud/aws/cloudwatch/log_group_customer_key.tf.go diff --git a/rules/cloud/policies/aws/cloudwatch/log_group_customer_key_test.go b/checks/cloud/aws/cloudwatch/log_group_customer_key_test.go similarity index 100% rename from rules/cloud/policies/aws/cloudwatch/log_group_customer_key_test.go rename to checks/cloud/aws/cloudwatch/log_group_customer_key_test.go diff --git a/rules/cloud/policies/aws/cloudwatch/require_cloudtrail_change_alarm.go b/checks/cloud/aws/cloudwatch/require_cloudtrail_change_alarm.go similarity index 96% rename from rules/cloud/policies/aws/cloudwatch/require_cloudtrail_change_alarm.go rename to checks/cloud/aws/cloudwatch/require_cloudtrail_change_alarm.go index 9294ec52..63a63a09 100644 --- a/rules/cloud/policies/aws/cloudwatch/require_cloudtrail_change_alarm.go +++ b/checks/cloud/aws/cloudwatch/require_cloudtrail_change_alarm.go @@ -8,10 +8,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/defsec/pkg/types" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var requireCloudTrailChangeAlarm = rules.Register( +var requireCloudTrailChangeAlarm = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0151", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/cloudwatch/require_cloudtrail_change_alarm_test.go b/checks/cloud/aws/cloudwatch/require_cloudtrail_change_alarm_test.go similarity index 100% rename from rules/cloud/policies/aws/cloudwatch/require_cloudtrail_change_alarm_test.go rename to checks/cloud/aws/cloudwatch/require_cloudtrail_change_alarm_test.go diff --git a/rules/cloud/policies/aws/cloudwatch/require_cmk_disabled_alarm.go b/checks/cloud/aws/cloudwatch/require_cmk_disabled_alarm.go similarity index 96% rename from rules/cloud/policies/aws/cloudwatch/require_cmk_disabled_alarm.go rename to checks/cloud/aws/cloudwatch/require_cmk_disabled_alarm.go index 14efb1ee..22c23dcd 100644 --- a/rules/cloud/policies/aws/cloudwatch/require_cmk_disabled_alarm.go +++ b/checks/cloud/aws/cloudwatch/require_cmk_disabled_alarm.go @@ -8,10 +8,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/defsec/pkg/types" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var requireCMKDisabledAlarm = rules.Register( +var requireCMKDisabledAlarm = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0153", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/cloudwatch/require_cmk_disabled_alarm_test.go b/checks/cloud/aws/cloudwatch/require_cmk_disabled_alarm_test.go similarity index 100% rename from rules/cloud/policies/aws/cloudwatch/require_cmk_disabled_alarm_test.go rename to checks/cloud/aws/cloudwatch/require_cmk_disabled_alarm_test.go diff --git a/rules/cloud/policies/aws/cloudwatch/require_config_configuration_change_alarm.go b/checks/cloud/aws/cloudwatch/require_config_configuration_change_alarm.go similarity index 96% rename from rules/cloud/policies/aws/cloudwatch/require_config_configuration_change_alarm.go rename to checks/cloud/aws/cloudwatch/require_config_configuration_change_alarm.go index 12abc8c9..622429c2 100644 --- a/rules/cloud/policies/aws/cloudwatch/require_config_configuration_change_alarm.go +++ b/checks/cloud/aws/cloudwatch/require_config_configuration_change_alarm.go @@ -8,10 +8,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/defsec/pkg/types" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var requireConfigConfigurationChangeAlarm = rules.Register( +var requireConfigConfigurationChangeAlarm = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0155", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/cloudwatch/require_config_configuration_change_alarm_test.go b/checks/cloud/aws/cloudwatch/require_config_configuration_change_alarm_test.go similarity index 100% rename from rules/cloud/policies/aws/cloudwatch/require_config_configuration_change_alarm_test.go rename to checks/cloud/aws/cloudwatch/require_config_configuration_change_alarm_test.go diff --git a/rules/cloud/policies/aws/cloudwatch/require_console_login_failure_alarm.go b/checks/cloud/aws/cloudwatch/require_console_login_failure_alarm.go similarity index 96% rename from rules/cloud/policies/aws/cloudwatch/require_console_login_failure_alarm.go rename to checks/cloud/aws/cloudwatch/require_console_login_failure_alarm.go index 8005c103..e40cec28 100644 --- a/rules/cloud/policies/aws/cloudwatch/require_console_login_failure_alarm.go +++ b/checks/cloud/aws/cloudwatch/require_console_login_failure_alarm.go @@ -8,10 +8,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/defsec/pkg/types" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var requireConsoleLoginFailureAlarm = rules.Register( +var requireConsoleLoginFailureAlarm = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0152", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/cloudwatch/require_console_login_failure_alarm_test.go b/checks/cloud/aws/cloudwatch/require_console_login_failure_alarm_test.go similarity index 100% rename from rules/cloud/policies/aws/cloudwatch/require_console_login_failure_alarm_test.go rename to checks/cloud/aws/cloudwatch/require_console_login_failure_alarm_test.go diff --git a/rules/cloud/policies/aws/cloudwatch/require_iam_policy_change_alarm.go b/checks/cloud/aws/cloudwatch/require_iam_policy_change_alarm.go similarity index 96% rename from rules/cloud/policies/aws/cloudwatch/require_iam_policy_change_alarm.go rename to checks/cloud/aws/cloudwatch/require_iam_policy_change_alarm.go index 0006018c..17c7ea29 100644 --- a/rules/cloud/policies/aws/cloudwatch/require_iam_policy_change_alarm.go +++ b/checks/cloud/aws/cloudwatch/require_iam_policy_change_alarm.go @@ -8,10 +8,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/defsec/pkg/types" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var requireIAMPolicyChangeAlarm = rules.Register( +var requireIAMPolicyChangeAlarm = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0150", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/cloudwatch/require_iam_policy_change_alarm_test.go b/checks/cloud/aws/cloudwatch/require_iam_policy_change_alarm_test.go similarity index 100% rename from rules/cloud/policies/aws/cloudwatch/require_iam_policy_change_alarm_test.go rename to checks/cloud/aws/cloudwatch/require_iam_policy_change_alarm_test.go diff --git a/rules/cloud/policies/aws/cloudwatch/require_nacl_change_alarm.go b/checks/cloud/aws/cloudwatch/require_nacl_change_alarm.go similarity index 96% rename from rules/cloud/policies/aws/cloudwatch/require_nacl_change_alarm.go rename to checks/cloud/aws/cloudwatch/require_nacl_change_alarm.go index 1d686160..e5c4814b 100644 --- a/rules/cloud/policies/aws/cloudwatch/require_nacl_change_alarm.go +++ b/checks/cloud/aws/cloudwatch/require_nacl_change_alarm.go @@ -8,10 +8,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/defsec/pkg/types" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var requireNACLChangeAlarm = rules.Register( +var requireNACLChangeAlarm = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0157", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/cloudwatch/require_nacl_change_alarm_test.go b/checks/cloud/aws/cloudwatch/require_nacl_change_alarm_test.go similarity index 100% rename from rules/cloud/policies/aws/cloudwatch/require_nacl_change_alarm_test.go rename to checks/cloud/aws/cloudwatch/require_nacl_change_alarm_test.go diff --git a/rules/cloud/policies/aws/cloudwatch/require_network_gateway_change_alarm.go b/checks/cloud/aws/cloudwatch/require_network_gateway_change_alarm.go similarity index 96% rename from rules/cloud/policies/aws/cloudwatch/require_network_gateway_change_alarm.go rename to checks/cloud/aws/cloudwatch/require_network_gateway_change_alarm.go index c24ddbb6..253286ad 100644 --- a/rules/cloud/policies/aws/cloudwatch/require_network_gateway_change_alarm.go +++ b/checks/cloud/aws/cloudwatch/require_network_gateway_change_alarm.go @@ -8,10 +8,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/defsec/pkg/types" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var requireNetworkGatewayChangeAlarm = rules.Register( +var requireNetworkGatewayChangeAlarm = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0158", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/cloudwatch/require_network_gateway_change_alarm_test.go b/checks/cloud/aws/cloudwatch/require_network_gateway_change_alarm_test.go similarity index 100% rename from rules/cloud/policies/aws/cloudwatch/require_network_gateway_change_alarm_test.go rename to checks/cloud/aws/cloudwatch/require_network_gateway_change_alarm_test.go diff --git a/rules/cloud/policies/aws/cloudwatch/require_non_mfa_login_alarm.go b/checks/cloud/aws/cloudwatch/require_non_mfa_login_alarm.go similarity index 96% rename from rules/cloud/policies/aws/cloudwatch/require_non_mfa_login_alarm.go rename to checks/cloud/aws/cloudwatch/require_non_mfa_login_alarm.go index 46ba4433..a96cfb48 100644 --- a/rules/cloud/policies/aws/cloudwatch/require_non_mfa_login_alarm.go +++ b/checks/cloud/aws/cloudwatch/require_non_mfa_login_alarm.go @@ -8,10 +8,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/defsec/pkg/types" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var requireNonMFALoginAlarm = rules.Register( +var requireNonMFALoginAlarm = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0148", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/cloudwatch/require_non_mfa_login_alarm_test.go b/checks/cloud/aws/cloudwatch/require_non_mfa_login_alarm_test.go similarity index 100% rename from rules/cloud/policies/aws/cloudwatch/require_non_mfa_login_alarm_test.go rename to checks/cloud/aws/cloudwatch/require_non_mfa_login_alarm_test.go diff --git a/rules/cloud/policies/aws/cloudwatch/require_org_changes_alarm.go b/checks/cloud/aws/cloudwatch/require_org_changes_alarm.go similarity index 95% rename from rules/cloud/policies/aws/cloudwatch/require_org_changes_alarm.go rename to checks/cloud/aws/cloudwatch/require_org_changes_alarm.go index 7fab4463..718b1ad2 100644 --- a/rules/cloud/policies/aws/cloudwatch/require_org_changes_alarm.go +++ b/checks/cloud/aws/cloudwatch/require_org_changes_alarm.go @@ -8,10 +8,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/defsec/pkg/types" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckRequireOrgChangesAlarm = rules.Register( +var CheckRequireOrgChangesAlarm = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0174", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/cloudwatch/require_org_changes_alarm_test.go b/checks/cloud/aws/cloudwatch/require_org_changes_alarm_test.go similarity index 100% rename from rules/cloud/policies/aws/cloudwatch/require_org_changes_alarm_test.go rename to checks/cloud/aws/cloudwatch/require_org_changes_alarm_test.go diff --git a/rules/cloud/policies/aws/cloudwatch/require_root_user_usage_alarm.go b/checks/cloud/aws/cloudwatch/require_root_user_usage_alarm.go similarity index 96% rename from rules/cloud/policies/aws/cloudwatch/require_root_user_usage_alarm.go rename to checks/cloud/aws/cloudwatch/require_root_user_usage_alarm.go index 1f35861c..12ddef96 100644 --- a/rules/cloud/policies/aws/cloudwatch/require_root_user_usage_alarm.go +++ b/checks/cloud/aws/cloudwatch/require_root_user_usage_alarm.go @@ -8,10 +8,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/defsec/pkg/types" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var requireRootUserUsageAlarm = rules.Register( +var requireRootUserUsageAlarm = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0149", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/cloudwatch/require_root_user_usage_alarm_test.go b/checks/cloud/aws/cloudwatch/require_root_user_usage_alarm_test.go similarity index 100% rename from rules/cloud/policies/aws/cloudwatch/require_root_user_usage_alarm_test.go rename to checks/cloud/aws/cloudwatch/require_root_user_usage_alarm_test.go diff --git a/rules/cloud/policies/aws/cloudwatch/require_route_table_change_alarm.go b/checks/cloud/aws/cloudwatch/require_route_table_change_alarm.go similarity index 96% rename from rules/cloud/policies/aws/cloudwatch/require_route_table_change_alarm.go rename to checks/cloud/aws/cloudwatch/require_route_table_change_alarm.go index e8e3dd84..76bc54e8 100644 --- a/rules/cloud/policies/aws/cloudwatch/require_route_table_change_alarm.go +++ b/checks/cloud/aws/cloudwatch/require_route_table_change_alarm.go @@ -8,10 +8,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/defsec/pkg/types" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var requireRouteTableChangeAlarm = rules.Register( +var requireRouteTableChangeAlarm = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0159", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/cloudwatch/require_route_table_change_alarm_test.go b/checks/cloud/aws/cloudwatch/require_route_table_change_alarm_test.go similarity index 100% rename from rules/cloud/policies/aws/cloudwatch/require_route_table_change_alarm_test.go rename to checks/cloud/aws/cloudwatch/require_route_table_change_alarm_test.go diff --git a/rules/cloud/policies/aws/cloudwatch/require_s3_bucket_policy_change_alarm.go b/checks/cloud/aws/cloudwatch/require_s3_bucket_policy_change_alarm.go similarity index 96% rename from rules/cloud/policies/aws/cloudwatch/require_s3_bucket_policy_change_alarm.go rename to checks/cloud/aws/cloudwatch/require_s3_bucket_policy_change_alarm.go index fcfef831..2bbaa7b3 100644 --- a/rules/cloud/policies/aws/cloudwatch/require_s3_bucket_policy_change_alarm.go +++ b/checks/cloud/aws/cloudwatch/require_s3_bucket_policy_change_alarm.go @@ -8,10 +8,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/defsec/pkg/types" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var requireS3BucketPolicyChangeAlarm = rules.Register( +var requireS3BucketPolicyChangeAlarm = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0154", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/cloudwatch/require_s3_bucket_policy_change_alarm_test.go b/checks/cloud/aws/cloudwatch/require_s3_bucket_policy_change_alarm_test.go similarity index 100% rename from rules/cloud/policies/aws/cloudwatch/require_s3_bucket_policy_change_alarm_test.go rename to checks/cloud/aws/cloudwatch/require_s3_bucket_policy_change_alarm_test.go diff --git a/rules/cloud/policies/aws/cloudwatch/require_security_group_change_alarm.go b/checks/cloud/aws/cloudwatch/require_security_group_change_alarm.go similarity index 96% rename from rules/cloud/policies/aws/cloudwatch/require_security_group_change_alarm.go rename to checks/cloud/aws/cloudwatch/require_security_group_change_alarm.go index 98801858..bb8b8e04 100644 --- a/rules/cloud/policies/aws/cloudwatch/require_security_group_change_alarm.go +++ b/checks/cloud/aws/cloudwatch/require_security_group_change_alarm.go @@ -8,10 +8,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/defsec/pkg/types" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var requireSecurityGroupChangeAlarm = rules.Register( +var requireSecurityGroupChangeAlarm = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0156", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/cloudwatch/require_security_group_change_alarm_test.go b/checks/cloud/aws/cloudwatch/require_security_group_change_alarm_test.go similarity index 100% rename from rules/cloud/policies/aws/cloudwatch/require_security_group_change_alarm_test.go rename to checks/cloud/aws/cloudwatch/require_security_group_change_alarm_test.go diff --git a/rules/cloud/policies/aws/cloudwatch/require_unauthorised_api_call_alarm.go b/checks/cloud/aws/cloudwatch/require_unauthorised_api_call_alarm.go similarity index 96% rename from rules/cloud/policies/aws/cloudwatch/require_unauthorised_api_call_alarm.go rename to checks/cloud/aws/cloudwatch/require_unauthorised_api_call_alarm.go index de40a167..545cc516 100644 --- a/rules/cloud/policies/aws/cloudwatch/require_unauthorised_api_call_alarm.go +++ b/checks/cloud/aws/cloudwatch/require_unauthorised_api_call_alarm.go @@ -8,10 +8,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/defsec/pkg/types" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var requireUnauthorizedApiCallAlarm = rules.Register( +var requireUnauthorizedApiCallAlarm = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0147", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/cloudwatch/require_unauthorised_api_call_alarm_test.go b/checks/cloud/aws/cloudwatch/require_unauthorised_api_call_alarm_test.go similarity index 100% rename from rules/cloud/policies/aws/cloudwatch/require_unauthorised_api_call_alarm_test.go rename to checks/cloud/aws/cloudwatch/require_unauthorised_api_call_alarm_test.go diff --git a/rules/cloud/policies/aws/cloudwatch/require_vpc_change_alarm.go b/checks/cloud/aws/cloudwatch/require_vpc_change_alarm.go similarity index 97% rename from rules/cloud/policies/aws/cloudwatch/require_vpc_change_alarm.go rename to checks/cloud/aws/cloudwatch/require_vpc_change_alarm.go index 66503820..5eb189c2 100644 --- a/rules/cloud/policies/aws/cloudwatch/require_vpc_change_alarm.go +++ b/checks/cloud/aws/cloudwatch/require_vpc_change_alarm.go @@ -8,10 +8,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/defsec/pkg/types" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var requireVPCChangeAlarm = rules.Register( +var requireVPCChangeAlarm = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0160", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/cloudwatch/require_vpc_change_alarm_test.go b/checks/cloud/aws/cloudwatch/require_vpc_change_alarm_test.go similarity index 100% rename from rules/cloud/policies/aws/cloudwatch/require_vpc_change_alarm_test.go rename to checks/cloud/aws/cloudwatch/require_vpc_change_alarm_test.go diff --git a/rules/cloud/policies/aws/codebuild/enable_encryption.cf.go b/checks/cloud/aws/codebuild/enable_encryption.cf.go similarity index 100% rename from rules/cloud/policies/aws/codebuild/enable_encryption.cf.go rename to checks/cloud/aws/codebuild/enable_encryption.cf.go diff --git a/rules/cloud/policies/aws/codebuild/enable_encryption.go b/checks/cloud/aws/codebuild/enable_encryption.go similarity index 95% rename from rules/cloud/policies/aws/codebuild/enable_encryption.go rename to checks/cloud/aws/codebuild/enable_encryption.go index b70fff48..5d7c3382 100755 --- a/rules/cloud/policies/aws/codebuild/enable_encryption.go +++ b/checks/cloud/aws/codebuild/enable_encryption.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableEncryption = rules.Register( +var CheckEnableEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0018", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/codebuild/enable_encryption.tf.go b/checks/cloud/aws/codebuild/enable_encryption.tf.go similarity index 100% rename from rules/cloud/policies/aws/codebuild/enable_encryption.tf.go rename to checks/cloud/aws/codebuild/enable_encryption.tf.go diff --git a/rules/cloud/policies/aws/codebuild/enable_encryption_test.go b/checks/cloud/aws/codebuild/enable_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/codebuild/enable_encryption_test.go rename to checks/cloud/aws/codebuild/enable_encryption_test.go diff --git a/rules/cloud/policies/aws/config/aggregate_all_regions.cf.go b/checks/cloud/aws/config/aggregate_all_regions.cf.go similarity index 100% rename from rules/cloud/policies/aws/config/aggregate_all_regions.cf.go rename to checks/cloud/aws/config/aggregate_all_regions.cf.go diff --git a/rules/cloud/policies/aws/config/aggregate_all_regions.go b/checks/cloud/aws/config/aggregate_all_regions.go similarity index 95% rename from rules/cloud/policies/aws/config/aggregate_all_regions.go rename to checks/cloud/aws/config/aggregate_all_regions.go index 117389a0..4c8699a8 100755 --- a/rules/cloud/policies/aws/config/aggregate_all_regions.go +++ b/checks/cloud/aws/config/aggregate_all_regions.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckAggregateAllRegions = rules.Register( +var CheckAggregateAllRegions = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0019", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/config/aggregate_all_regions.tf.go b/checks/cloud/aws/config/aggregate_all_regions.tf.go similarity index 100% rename from rules/cloud/policies/aws/config/aggregate_all_regions.tf.go rename to checks/cloud/aws/config/aggregate_all_regions.tf.go diff --git a/rules/cloud/policies/aws/config/aggregate_all_regions_test.go b/checks/cloud/aws/config/aggregate_all_regions_test.go similarity index 100% rename from rules/cloud/policies/aws/config/aggregate_all_regions_test.go rename to checks/cloud/aws/config/aggregate_all_regions_test.go diff --git a/rules/cloud/policies/aws/documentdb/enable_log_export.cf.go b/checks/cloud/aws/documentdb/enable_log_export.cf.go similarity index 100% rename from rules/cloud/policies/aws/documentdb/enable_log_export.cf.go rename to checks/cloud/aws/documentdb/enable_log_export.cf.go diff --git a/rules/cloud/policies/aws/documentdb/enable_log_export.go b/checks/cloud/aws/documentdb/enable_log_export.go similarity index 95% rename from rules/cloud/policies/aws/documentdb/enable_log_export.go rename to checks/cloud/aws/documentdb/enable_log_export.go index f441031a..7c9db2f9 100755 --- a/rules/cloud/policies/aws/documentdb/enable_log_export.go +++ b/checks/cloud/aws/documentdb/enable_log_export.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableLogExport = rules.Register( +var CheckEnableLogExport = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0020", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/documentdb/enable_log_export.tf.go b/checks/cloud/aws/documentdb/enable_log_export.tf.go similarity index 100% rename from rules/cloud/policies/aws/documentdb/enable_log_export.tf.go rename to checks/cloud/aws/documentdb/enable_log_export.tf.go diff --git a/rules/cloud/policies/aws/documentdb/enable_log_export_test.go b/checks/cloud/aws/documentdb/enable_log_export_test.go similarity index 100% rename from rules/cloud/policies/aws/documentdb/enable_log_export_test.go rename to checks/cloud/aws/documentdb/enable_log_export_test.go diff --git a/rules/cloud/policies/aws/documentdb/enable_storage_encryption.cf.go b/checks/cloud/aws/documentdb/enable_storage_encryption.cf.go similarity index 100% rename from rules/cloud/policies/aws/documentdb/enable_storage_encryption.cf.go rename to checks/cloud/aws/documentdb/enable_storage_encryption.cf.go diff --git a/rules/cloud/policies/aws/documentdb/enable_storage_encryption.go b/checks/cloud/aws/documentdb/enable_storage_encryption.go similarity index 94% rename from rules/cloud/policies/aws/documentdb/enable_storage_encryption.go rename to checks/cloud/aws/documentdb/enable_storage_encryption.go index 084ab76d..95747487 100755 --- a/rules/cloud/policies/aws/documentdb/enable_storage_encryption.go +++ b/checks/cloud/aws/documentdb/enable_storage_encryption.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableStorageEncryption = rules.Register( +var CheckEnableStorageEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0021", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/documentdb/enable_storage_encryption.tf.go b/checks/cloud/aws/documentdb/enable_storage_encryption.tf.go similarity index 100% rename from rules/cloud/policies/aws/documentdb/enable_storage_encryption.tf.go rename to checks/cloud/aws/documentdb/enable_storage_encryption.tf.go diff --git a/rules/cloud/policies/aws/documentdb/enable_storage_encryption_test.go b/checks/cloud/aws/documentdb/enable_storage_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/documentdb/enable_storage_encryption_test.go rename to checks/cloud/aws/documentdb/enable_storage_encryption_test.go diff --git a/rules/cloud/policies/aws/documentdb/encryption_customer_key.cf.go b/checks/cloud/aws/documentdb/encryption_customer_key.cf.go similarity index 100% rename from rules/cloud/policies/aws/documentdb/encryption_customer_key.cf.go rename to checks/cloud/aws/documentdb/encryption_customer_key.cf.go diff --git a/rules/cloud/policies/aws/documentdb/encryption_customer_key.go b/checks/cloud/aws/documentdb/encryption_customer_key.go similarity index 95% rename from rules/cloud/policies/aws/documentdb/encryption_customer_key.go rename to checks/cloud/aws/documentdb/encryption_customer_key.go index 1c58fd67..1ebe4b0f 100755 --- a/rules/cloud/policies/aws/documentdb/encryption_customer_key.go +++ b/checks/cloud/aws/documentdb/encryption_customer_key.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEncryptionCustomerKey = rules.Register( +var CheckEncryptionCustomerKey = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0022", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/documentdb/encryption_customer_key.tf.go b/checks/cloud/aws/documentdb/encryption_customer_key.tf.go similarity index 100% rename from rules/cloud/policies/aws/documentdb/encryption_customer_key.tf.go rename to checks/cloud/aws/documentdb/encryption_customer_key.tf.go diff --git a/rules/cloud/policies/aws/documentdb/encryption_customer_key_test.go b/checks/cloud/aws/documentdb/encryption_customer_key_test.go similarity index 100% rename from rules/cloud/policies/aws/documentdb/encryption_customer_key_test.go rename to checks/cloud/aws/documentdb/encryption_customer_key_test.go diff --git a/rules/cloud/policies/aws/dynamodb/enable_at_rest_encryption.cf.go b/checks/cloud/aws/dynamodb/enable_at_rest_encryption.cf.go similarity index 100% rename from rules/cloud/policies/aws/dynamodb/enable_at_rest_encryption.cf.go rename to checks/cloud/aws/dynamodb/enable_at_rest_encryption.cf.go diff --git a/rules/cloud/policies/aws/dynamodb/enable_at_rest_encryption.go b/checks/cloud/aws/dynamodb/enable_at_rest_encryption.go similarity index 95% rename from rules/cloud/policies/aws/dynamodb/enable_at_rest_encryption.go rename to checks/cloud/aws/dynamodb/enable_at_rest_encryption.go index 34d45b52..c7cf2eff 100755 --- a/rules/cloud/policies/aws/dynamodb/enable_at_rest_encryption.go +++ b/checks/cloud/aws/dynamodb/enable_at_rest_encryption.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableAtRestEncryption = rules.Register( +var CheckEnableAtRestEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0023", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/dynamodb/enable_at_rest_encryption.tf.go b/checks/cloud/aws/dynamodb/enable_at_rest_encryption.tf.go similarity index 100% rename from rules/cloud/policies/aws/dynamodb/enable_at_rest_encryption.tf.go rename to checks/cloud/aws/dynamodb/enable_at_rest_encryption.tf.go diff --git a/rules/cloud/policies/aws/dynamodb/enable_at_rest_encryption_test.go b/checks/cloud/aws/dynamodb/enable_at_rest_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/dynamodb/enable_at_rest_encryption_test.go rename to checks/cloud/aws/dynamodb/enable_at_rest_encryption_test.go diff --git a/rules/cloud/policies/aws/dynamodb/enable_recovery.go b/checks/cloud/aws/dynamodb/enable_recovery.go similarity index 95% rename from rules/cloud/policies/aws/dynamodb/enable_recovery.go rename to checks/cloud/aws/dynamodb/enable_recovery.go index a46a4417..8e4c8c6d 100755 --- a/rules/cloud/policies/aws/dynamodb/enable_recovery.go +++ b/checks/cloud/aws/dynamodb/enable_recovery.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableRecovery = rules.Register( +var CheckEnableRecovery = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0024", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/dynamodb/enable_recovery.tf.go b/checks/cloud/aws/dynamodb/enable_recovery.tf.go similarity index 100% rename from rules/cloud/policies/aws/dynamodb/enable_recovery.tf.go rename to checks/cloud/aws/dynamodb/enable_recovery.tf.go diff --git a/rules/cloud/policies/aws/dynamodb/enable_recovery_test.go b/checks/cloud/aws/dynamodb/enable_recovery_test.go similarity index 100% rename from rules/cloud/policies/aws/dynamodb/enable_recovery_test.go rename to checks/cloud/aws/dynamodb/enable_recovery_test.go diff --git a/rules/cloud/policies/aws/dynamodb/table_customer_key.go b/checks/cloud/aws/dynamodb/table_customer_key.go similarity index 95% rename from rules/cloud/policies/aws/dynamodb/table_customer_key.go rename to checks/cloud/aws/dynamodb/table_customer_key.go index e72309ea..1636870f 100755 --- a/rules/cloud/policies/aws/dynamodb/table_customer_key.go +++ b/checks/cloud/aws/dynamodb/table_customer_key.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckTableCustomerKey = rules.Register( +var CheckTableCustomerKey = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0025", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/dynamodb/table_customer_key.tf.go b/checks/cloud/aws/dynamodb/table_customer_key.tf.go similarity index 100% rename from rules/cloud/policies/aws/dynamodb/table_customer_key.tf.go rename to checks/cloud/aws/dynamodb/table_customer_key.tf.go diff --git a/rules/cloud/policies/aws/dynamodb/table_customer_key_test.go b/checks/cloud/aws/dynamodb/table_customer_key_test.go similarity index 100% rename from rules/cloud/policies/aws/dynamodb/table_customer_key_test.go rename to checks/cloud/aws/dynamodb/table_customer_key_test.go diff --git a/rules/cloud/policies/aws/ec2/add_description_to_security_group.cf.go b/checks/cloud/aws/ec2/add_description_to_security_group.cf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/add_description_to_security_group.cf.go rename to checks/cloud/aws/ec2/add_description_to_security_group.cf.go diff --git a/rules/cloud/policies/aws/ec2/add_description_to_security_group.go b/checks/cloud/aws/ec2/add_description_to_security_group.go similarity index 95% rename from rules/cloud/policies/aws/ec2/add_description_to_security_group.go rename to checks/cloud/aws/ec2/add_description_to_security_group.go index 3865d873..39f7de39 100755 --- a/rules/cloud/policies/aws/ec2/add_description_to_security_group.go +++ b/checks/cloud/aws/ec2/add_description_to_security_group.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckAddDescriptionToSecurityGroup = rules.Register( +var CheckAddDescriptionToSecurityGroup = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0099", Aliases: []string{"aws-vpc-add-description-to-security-group"}, diff --git a/rules/cloud/policies/aws/ec2/add_description_to_security_group.tf.go b/checks/cloud/aws/ec2/add_description_to_security_group.tf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/add_description_to_security_group.tf.go rename to checks/cloud/aws/ec2/add_description_to_security_group.tf.go diff --git a/rules/cloud/policies/aws/ec2/add_description_to_security_group_rule.cf.go b/checks/cloud/aws/ec2/add_description_to_security_group_rule.cf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/add_description_to_security_group_rule.cf.go rename to checks/cloud/aws/ec2/add_description_to_security_group_rule.cf.go diff --git a/rules/cloud/policies/aws/ec2/add_description_to_security_group_rule.go b/checks/cloud/aws/ec2/add_description_to_security_group_rule.go similarity index 87% rename from rules/cloud/policies/aws/ec2/add_description_to_security_group_rule.go rename to checks/cloud/aws/ec2/add_description_to_security_group_rule.go index 9e67404c..3e201c65 100755 --- a/rules/cloud/policies/aws/ec2/add_description_to_security_group_rule.go +++ b/checks/cloud/aws/ec2/add_description_to_security_group_rule.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckAddDescriptionToSecurityGroupRule = rules.Register( +var CheckAddDescriptionToSecurityGroupRule = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0124", Aliases: []string{"aws-vpc-add-description-to-security-group-rule"}, @@ -17,8 +17,8 @@ var CheckAddDescriptionToSecurityGroupRule = rules.Register( ShortCode: "add-description-to-security-group-rule", Summary: "Missing description for security group rule.", Impact: "Descriptions provide context for the firewall rule reasons", - Resolution: "Add descriptions for all security groups rules", - Explanation: `Security group rules should include a description for auditing purposes. + Resolution: "Add descriptions for all security groups checks", + Explanation: `Security group checks should include a description for auditing purposes. Simplifies auditing, debugging, and managing security groups.`, Links: []string{ diff --git a/rules/cloud/policies/aws/ec2/add_description_to_security_group_rule.tf.go b/checks/cloud/aws/ec2/add_description_to_security_group_rule.tf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/add_description_to_security_group_rule.tf.go rename to checks/cloud/aws/ec2/add_description_to_security_group_rule.tf.go diff --git a/rules/cloud/policies/aws/ec2/add_description_to_security_group_rule_test.go b/checks/cloud/aws/ec2/add_description_to_security_group_rule_test.go similarity index 100% rename from rules/cloud/policies/aws/ec2/add_description_to_security_group_rule_test.go rename to checks/cloud/aws/ec2/add_description_to_security_group_rule_test.go diff --git a/rules/cloud/policies/aws/ec2/add_description_to_security_group_test.go b/checks/cloud/aws/ec2/add_description_to_security_group_test.go similarity index 100% rename from rules/cloud/policies/aws/ec2/add_description_to_security_group_test.go rename to checks/cloud/aws/ec2/add_description_to_security_group_test.go diff --git a/rules/cloud/policies/aws/ec2/as_enable_at_rest_encryption.cf.go b/checks/cloud/aws/ec2/as_enable_at_rest_encryption.cf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/as_enable_at_rest_encryption.cf.go rename to checks/cloud/aws/ec2/as_enable_at_rest_encryption.cf.go diff --git a/rules/cloud/policies/aws/ec2/as_enable_at_rest_encryption.go b/checks/cloud/aws/ec2/as_enable_at_rest_encryption.go similarity index 95% rename from rules/cloud/policies/aws/ec2/as_enable_at_rest_encryption.go rename to checks/cloud/aws/ec2/as_enable_at_rest_encryption.go index f2a87aad..649c6cc0 100755 --- a/rules/cloud/policies/aws/ec2/as_enable_at_rest_encryption.go +++ b/checks/cloud/aws/ec2/as_enable_at_rest_encryption.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckASEnableAtRestEncryption = rules.Register( +var CheckASEnableAtRestEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0008", Aliases: []string{"aws-autoscaling-enable-at-rest-encryption"}, diff --git a/rules/cloud/policies/aws/ec2/as_enable_at_rest_encryption.tf.go b/checks/cloud/aws/ec2/as_enable_at_rest_encryption.tf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/as_enable_at_rest_encryption.tf.go rename to checks/cloud/aws/ec2/as_enable_at_rest_encryption.tf.go diff --git a/rules/cloud/policies/aws/ec2/as_enable_at_rest_encryption_test.go b/checks/cloud/aws/ec2/as_enable_at_rest_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/ec2/as_enable_at_rest_encryption_test.go rename to checks/cloud/aws/ec2/as_enable_at_rest_encryption_test.go diff --git a/rules/cloud/policies/aws/ec2/as_enforce_http_token_imds.cf.go b/checks/cloud/aws/ec2/as_enforce_http_token_imds.cf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/as_enforce_http_token_imds.cf.go rename to checks/cloud/aws/ec2/as_enforce_http_token_imds.cf.go diff --git a/rules/cloud/policies/aws/ec2/as_enforce_http_token_imds.go b/checks/cloud/aws/ec2/as_enforce_http_token_imds.go similarity index 96% rename from rules/cloud/policies/aws/ec2/as_enforce_http_token_imds.go rename to checks/cloud/aws/ec2/as_enforce_http_token_imds.go index 3a8ad611..aea7cee3 100755 --- a/rules/cloud/policies/aws/ec2/as_enforce_http_token_imds.go +++ b/checks/cloud/aws/ec2/as_enforce_http_token_imds.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckASIMDSAccessRequiresToken = rules.Register( +var CheckASIMDSAccessRequiresToken = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0130", Aliases: []string{"aws-autoscaling-enforce-http-token-imds"}, diff --git a/rules/cloud/policies/aws/ec2/as_enforce_http_token_imds.tf.go b/checks/cloud/aws/ec2/as_enforce_http_token_imds.tf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/as_enforce_http_token_imds.tf.go rename to checks/cloud/aws/ec2/as_enforce_http_token_imds.tf.go diff --git a/rules/cloud/policies/aws/ec2/as_enforce_http_token_imds_test.go b/checks/cloud/aws/ec2/as_enforce_http_token_imds_test.go similarity index 100% rename from rules/cloud/policies/aws/ec2/as_enforce_http_token_imds_test.go rename to checks/cloud/aws/ec2/as_enforce_http_token_imds_test.go diff --git a/rules/cloud/policies/aws/ec2/as_no_secrets_in_user_data.cf.go b/checks/cloud/aws/ec2/as_no_secrets_in_user_data.cf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/as_no_secrets_in_user_data.cf.go rename to checks/cloud/aws/ec2/as_no_secrets_in_user_data.cf.go diff --git a/rules/cloud/policies/aws/ec2/as_no_secrets_in_user_data.go b/checks/cloud/aws/ec2/as_no_secrets_in_user_data.go similarity index 95% rename from rules/cloud/policies/aws/ec2/as_no_secrets_in_user_data.go rename to checks/cloud/aws/ec2/as_no_secrets_in_user_data.go index e8f1fb47..f5f4a2b5 100755 --- a/rules/cloud/policies/aws/ec2/as_no_secrets_in_user_data.go +++ b/checks/cloud/aws/ec2/as_no_secrets_in_user_data.go @@ -9,7 +9,7 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/defsec/pkg/providers" @@ -18,7 +18,7 @@ import ( var scanner = squealer.NewStringScanner() -var CheckASNoSecretsInUserData = rules.Register( +var CheckASNoSecretsInUserData = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0129", Aliases: []string{"aws-autoscaling-no-secrets-in-user-data"}, diff --git a/rules/cloud/policies/aws/ec2/as_no_secrets_in_user_data.tf.go b/checks/cloud/aws/ec2/as_no_secrets_in_user_data.tf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/as_no_secrets_in_user_data.tf.go rename to checks/cloud/aws/ec2/as_no_secrets_in_user_data.tf.go diff --git a/rules/cloud/policies/aws/ec2/as_no_secrets_in_user_data_test.go b/checks/cloud/aws/ec2/as_no_secrets_in_user_data_test.go similarity index 100% rename from rules/cloud/policies/aws/ec2/as_no_secrets_in_user_data_test.go rename to checks/cloud/aws/ec2/as_no_secrets_in_user_data_test.go diff --git a/rules/cloud/policies/aws/ec2/enable_at_rest_encryption.cf.go b/checks/cloud/aws/ec2/enable_at_rest_encryption.cf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/enable_at_rest_encryption.cf.go rename to checks/cloud/aws/ec2/enable_at_rest_encryption.cf.go diff --git a/rules/cloud/policies/aws/ec2/enable_at_rest_encryption.go b/checks/cloud/aws/ec2/enable_at_rest_encryption.go similarity index 95% rename from rules/cloud/policies/aws/ec2/enable_at_rest_encryption.go rename to checks/cloud/aws/ec2/enable_at_rest_encryption.go index 2ff8c6f4..49fb2885 100755 --- a/rules/cloud/policies/aws/ec2/enable_at_rest_encryption.go +++ b/checks/cloud/aws/ec2/enable_at_rest_encryption.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableAtRestEncryption = rules.Register( +var CheckEnableAtRestEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0131", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/ec2/enable_at_rest_encryption.tf.go b/checks/cloud/aws/ec2/enable_at_rest_encryption.tf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/enable_at_rest_encryption.tf.go rename to checks/cloud/aws/ec2/enable_at_rest_encryption.tf.go diff --git a/rules/cloud/policies/aws/ec2/enable_at_rest_encryption_test.go b/checks/cloud/aws/ec2/enable_at_rest_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/ec2/enable_at_rest_encryption_test.go rename to checks/cloud/aws/ec2/enable_at_rest_encryption_test.go diff --git a/rules/cloud/policies/aws/ec2/enable_volume_encryption.cf.go b/checks/cloud/aws/ec2/enable_volume_encryption.cf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/enable_volume_encryption.cf.go rename to checks/cloud/aws/ec2/enable_volume_encryption.cf.go diff --git a/rules/cloud/policies/aws/ec2/enable_volume_encryption.go b/checks/cloud/aws/ec2/enable_volume_encryption.go similarity index 94% rename from rules/cloud/policies/aws/ec2/enable_volume_encryption.go rename to checks/cloud/aws/ec2/enable_volume_encryption.go index 7b76d789..4c208388 100755 --- a/rules/cloud/policies/aws/ec2/enable_volume_encryption.go +++ b/checks/cloud/aws/ec2/enable_volume_encryption.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableVolumeEncryption = rules.Register( +var CheckEnableVolumeEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0026", Aliases: []string{"aws-ebs-enable-volume-encryption"}, diff --git a/rules/cloud/policies/aws/ec2/enable_volume_encryption.tf.go b/checks/cloud/aws/ec2/enable_volume_encryption.tf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/enable_volume_encryption.tf.go rename to checks/cloud/aws/ec2/enable_volume_encryption.tf.go diff --git a/rules/cloud/policies/aws/ec2/enable_volume_encryption_test.go b/checks/cloud/aws/ec2/enable_volume_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/ec2/enable_volume_encryption_test.go rename to checks/cloud/aws/ec2/enable_volume_encryption_test.go diff --git a/rules/cloud/policies/aws/ec2/encryption_customer_key.cf.go b/checks/cloud/aws/ec2/encryption_customer_key.cf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/encryption_customer_key.cf.go rename to checks/cloud/aws/ec2/encryption_customer_key.cf.go diff --git a/rules/cloud/policies/aws/ec2/encryption_customer_key.go b/checks/cloud/aws/ec2/encryption_customer_key.go similarity index 95% rename from rules/cloud/policies/aws/ec2/encryption_customer_key.go rename to checks/cloud/aws/ec2/encryption_customer_key.go index c1d2f4a4..d4211c22 100755 --- a/rules/cloud/policies/aws/ec2/encryption_customer_key.go +++ b/checks/cloud/aws/ec2/encryption_customer_key.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEncryptionCustomerKey = rules.Register( +var CheckEncryptionCustomerKey = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0027", Aliases: []string{"aws-ebs-encryption-customer-key"}, diff --git a/rules/cloud/policies/aws/ec2/encryption_customer_key.tf.go b/checks/cloud/aws/ec2/encryption_customer_key.tf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/encryption_customer_key.tf.go rename to checks/cloud/aws/ec2/encryption_customer_key.tf.go diff --git a/rules/cloud/policies/aws/ec2/encryption_customer_key_test.go b/checks/cloud/aws/ec2/encryption_customer_key_test.go similarity index 100% rename from rules/cloud/policies/aws/ec2/encryption_customer_key_test.go rename to checks/cloud/aws/ec2/encryption_customer_key_test.go diff --git a/rules/cloud/policies/aws/ec2/enforce_http_token_imds.go b/checks/cloud/aws/ec2/enforce_http_token_imds.go similarity index 94% rename from rules/cloud/policies/aws/ec2/enforce_http_token_imds.go rename to checks/cloud/aws/ec2/enforce_http_token_imds.go index 78ac3448..fabfbf18 100755 --- a/rules/cloud/policies/aws/ec2/enforce_http_token_imds.go +++ b/checks/cloud/aws/ec2/enforce_http_token_imds.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckIMDSAccessRequiresToken = rules.Register( +var CheckIMDSAccessRequiresToken = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0028", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/ec2/enforce_http_token_imds.tf.go b/checks/cloud/aws/ec2/enforce_http_token_imds.tf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/enforce_http_token_imds.tf.go rename to checks/cloud/aws/ec2/enforce_http_token_imds.tf.go diff --git a/rules/cloud/policies/aws/ec2/enforce_http_token_imds_test.go b/checks/cloud/aws/ec2/enforce_http_token_imds_test.go similarity index 100% rename from rules/cloud/policies/aws/ec2/enforce_http_token_imds_test.go rename to checks/cloud/aws/ec2/enforce_http_token_imds_test.go diff --git a/rules/cloud/policies/aws/ec2/no_default_vpc.go b/checks/cloud/aws/ec2/no_default_vpc.go similarity index 93% rename from rules/cloud/policies/aws/ec2/no_default_vpc.go rename to checks/cloud/aws/ec2/no_default_vpc.go index da3bfb67..8b89e86b 100755 --- a/rules/cloud/policies/aws/ec2/no_default_vpc.go +++ b/checks/cloud/aws/ec2/no_default_vpc.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoDefaultVpc = rules.Register( +var CheckNoDefaultVpc = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0101", Aliases: []string{"aws-vpc-no-default-vpc"}, diff --git a/rules/cloud/policies/aws/ec2/no_default_vpc.tf.go b/checks/cloud/aws/ec2/no_default_vpc.tf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/no_default_vpc.tf.go rename to checks/cloud/aws/ec2/no_default_vpc.tf.go diff --git a/rules/cloud/policies/aws/ec2/no_default_vpc_test.go b/checks/cloud/aws/ec2/no_default_vpc_test.go similarity index 100% rename from rules/cloud/policies/aws/ec2/no_default_vpc_test.go rename to checks/cloud/aws/ec2/no_default_vpc_test.go diff --git a/rules/cloud/policies/aws/ec2/no_excessive_port_access.cf.go b/checks/cloud/aws/ec2/no_excessive_port_access.cf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/no_excessive_port_access.cf.go rename to checks/cloud/aws/ec2/no_excessive_port_access.cf.go diff --git a/rules/cloud/policies/aws/ec2/no_excessive_port_access.go b/checks/cloud/aws/ec2/no_excessive_port_access.go similarity index 94% rename from rules/cloud/policies/aws/ec2/no_excessive_port_access.go rename to checks/cloud/aws/ec2/no_excessive_port_access.go index d19cb004..ab336a8f 100755 --- a/rules/cloud/policies/aws/ec2/no_excessive_port_access.go +++ b/checks/cloud/aws/ec2/no_excessive_port_access.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoExcessivePortAccess = rules.Register( +var CheckNoExcessivePortAccess = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0102", Aliases: []string{"aws-vpc-no-excessive-port-access"}, diff --git a/rules/cloud/policies/aws/ec2/no_excessive_port_access.tf.go b/checks/cloud/aws/ec2/no_excessive_port_access.tf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/no_excessive_port_access.tf.go rename to checks/cloud/aws/ec2/no_excessive_port_access.tf.go diff --git a/rules/cloud/policies/aws/ec2/no_excessive_port_access_test.go b/checks/cloud/aws/ec2/no_excessive_port_access_test.go similarity index 100% rename from rules/cloud/policies/aws/ec2/no_excessive_port_access_test.go rename to checks/cloud/aws/ec2/no_excessive_port_access_test.go diff --git a/rules/cloud/policies/aws/ec2/no_public_egress_sgr.cf.go b/checks/cloud/aws/ec2/no_public_egress_sgr.cf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/no_public_egress_sgr.cf.go rename to checks/cloud/aws/ec2/no_public_egress_sgr.cf.go diff --git a/rules/cloud/policies/aws/ec2/no_public_egress_sgr.go b/checks/cloud/aws/ec2/no_public_egress_sgr.go similarity index 95% rename from rules/cloud/policies/aws/ec2/no_public_egress_sgr.go rename to checks/cloud/aws/ec2/no_public_egress_sgr.go index 0d66a15d..7819a415 100755 --- a/rules/cloud/policies/aws/ec2/no_public_egress_sgr.go +++ b/checks/cloud/aws/ec2/no_public_egress_sgr.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/trivy-policies/internal/cidr" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicEgressSgr = rules.Register( +var CheckNoPublicEgressSgr = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0104", Aliases: []string{"aws-vpc-no-public-egress-sgr"}, diff --git a/rules/cloud/policies/aws/ec2/no_public_egress_sgr.tf.go b/checks/cloud/aws/ec2/no_public_egress_sgr.tf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/no_public_egress_sgr.tf.go rename to checks/cloud/aws/ec2/no_public_egress_sgr.tf.go diff --git a/rules/cloud/policies/aws/ec2/no_public_egress_sgr_test.go b/checks/cloud/aws/ec2/no_public_egress_sgr_test.go similarity index 100% rename from rules/cloud/policies/aws/ec2/no_public_egress_sgr_test.go rename to checks/cloud/aws/ec2/no_public_egress_sgr_test.go diff --git a/rules/cloud/policies/aws/ec2/no_public_ingress_acl.cf.go b/checks/cloud/aws/ec2/no_public_ingress_acl.cf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/no_public_ingress_acl.cf.go rename to checks/cloud/aws/ec2/no_public_ingress_acl.cf.go diff --git a/rules/cloud/policies/aws/ec2/no_public_ingress_acl.go b/checks/cloud/aws/ec2/no_public_ingress_acl.go similarity index 95% rename from rules/cloud/policies/aws/ec2/no_public_ingress_acl.go rename to checks/cloud/aws/ec2/no_public_ingress_acl.go index f7ad0d71..970214a2 100755 --- a/rules/cloud/policies/aws/ec2/no_public_ingress_acl.go +++ b/checks/cloud/aws/ec2/no_public_ingress_acl.go @@ -7,10 +7,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/trivy-policies/internal/cidr" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicIngress = rules.Register( +var CheckNoPublicIngress = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0105", Aliases: []string{"aws-vpc-no-public-ingress-acl"}, diff --git a/rules/cloud/policies/aws/ec2/no_public_ingress_acl.tf.go b/checks/cloud/aws/ec2/no_public_ingress_acl.tf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/no_public_ingress_acl.tf.go rename to checks/cloud/aws/ec2/no_public_ingress_acl.tf.go diff --git a/rules/cloud/policies/aws/ec2/no_public_ingress_acl_test.go b/checks/cloud/aws/ec2/no_public_ingress_acl_test.go similarity index 100% rename from rules/cloud/policies/aws/ec2/no_public_ingress_acl_test.go rename to checks/cloud/aws/ec2/no_public_ingress_acl_test.go diff --git a/rules/cloud/policies/aws/ec2/no_public_ingress_sgr.cf.go b/checks/cloud/aws/ec2/no_public_ingress_sgr.cf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/no_public_ingress_sgr.cf.go rename to checks/cloud/aws/ec2/no_public_ingress_sgr.cf.go diff --git a/rules/cloud/policies/aws/ec2/no_public_ingress_sgr.go b/checks/cloud/aws/ec2/no_public_ingress_sgr.go similarity index 95% rename from rules/cloud/policies/aws/ec2/no_public_ingress_sgr.go rename to checks/cloud/aws/ec2/no_public_ingress_sgr.go index 3e540584..cab8e3c5 100755 --- a/rules/cloud/policies/aws/ec2/no_public_ingress_sgr.go +++ b/checks/cloud/aws/ec2/no_public_ingress_sgr.go @@ -7,10 +7,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/trivy-policies/internal/cidr" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicIngressSgr = rules.Register( +var CheckNoPublicIngressSgr = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0107", Aliases: []string{"aws-vpc-no-public-ingress-sgr"}, diff --git a/rules/cloud/policies/aws/ec2/no_public_ingress_sgr.tf.go b/checks/cloud/aws/ec2/no_public_ingress_sgr.tf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/no_public_ingress_sgr.tf.go rename to checks/cloud/aws/ec2/no_public_ingress_sgr.tf.go diff --git a/rules/cloud/policies/aws/ec2/no_public_ingress_sgr_test.go b/checks/cloud/aws/ec2/no_public_ingress_sgr_test.go similarity index 100% rename from rules/cloud/policies/aws/ec2/no_public_ingress_sgr_test.go rename to checks/cloud/aws/ec2/no_public_ingress_sgr_test.go diff --git a/rules/cloud/policies/aws/ec2/no_public_ip.cf.go b/checks/cloud/aws/ec2/no_public_ip.cf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/no_public_ip.cf.go rename to checks/cloud/aws/ec2/no_public_ip.cf.go diff --git a/rules/cloud/policies/aws/ec2/no_public_ip.go b/checks/cloud/aws/ec2/no_public_ip.go similarity index 95% rename from rules/cloud/policies/aws/ec2/no_public_ip.go rename to checks/cloud/aws/ec2/no_public_ip.go index c2358ca9..492ad9fe 100755 --- a/rules/cloud/policies/aws/ec2/no_public_ip.go +++ b/checks/cloud/aws/ec2/no_public_ip.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicIp = rules.Register( +var CheckNoPublicIp = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0009", Aliases: []string{"aws-autoscaling-no-public-ip"}, diff --git a/rules/cloud/policies/aws/ec2/no_public_ip.tf.go b/checks/cloud/aws/ec2/no_public_ip.tf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/no_public_ip.tf.go rename to checks/cloud/aws/ec2/no_public_ip.tf.go diff --git a/rules/cloud/policies/aws/ec2/no_public_ip_subnet.cf.go b/checks/cloud/aws/ec2/no_public_ip_subnet.cf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/no_public_ip_subnet.cf.go rename to checks/cloud/aws/ec2/no_public_ip_subnet.cf.go diff --git a/rules/cloud/policies/aws/ec2/no_public_ip_subnet.go b/checks/cloud/aws/ec2/no_public_ip_subnet.go similarity index 95% rename from rules/cloud/policies/aws/ec2/no_public_ip_subnet.go rename to checks/cloud/aws/ec2/no_public_ip_subnet.go index c87e346f..3e527723 100755 --- a/rules/cloud/policies/aws/ec2/no_public_ip_subnet.go +++ b/checks/cloud/aws/ec2/no_public_ip_subnet.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicIpSubnet = rules.Register( +var CheckNoPublicIpSubnet = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0164", Aliases: []string{"aws-subnet-no-public-ip"}, diff --git a/rules/cloud/policies/aws/ec2/no_public_ip_subnet.tf.go b/checks/cloud/aws/ec2/no_public_ip_subnet.tf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/no_public_ip_subnet.tf.go rename to checks/cloud/aws/ec2/no_public_ip_subnet.tf.go diff --git a/rules/cloud/policies/aws/ec2/no_public_ip_subnet_test.go b/checks/cloud/aws/ec2/no_public_ip_subnet_test.go similarity index 100% rename from rules/cloud/policies/aws/ec2/no_public_ip_subnet_test.go rename to checks/cloud/aws/ec2/no_public_ip_subnet_test.go diff --git a/rules/cloud/policies/aws/ec2/no_public_ip_test.go b/checks/cloud/aws/ec2/no_public_ip_test.go similarity index 100% rename from rules/cloud/policies/aws/ec2/no_public_ip_test.go rename to checks/cloud/aws/ec2/no_public_ip_test.go diff --git a/rules/cloud/policies/aws/ec2/no_secrets_in_user_data.cf.go b/checks/cloud/aws/ec2/no_secrets_in_user_data.cf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/no_secrets_in_user_data.cf.go rename to checks/cloud/aws/ec2/no_secrets_in_user_data.cf.go diff --git a/rules/cloud/policies/aws/ec2/no_secrets_in_user_data.go b/checks/cloud/aws/ec2/no_secrets_in_user_data.go similarity index 95% rename from rules/cloud/policies/aws/ec2/no_secrets_in_user_data.go rename to checks/cloud/aws/ec2/no_secrets_in_user_data.go index 65de5861..487c8751 100755 --- a/rules/cloud/policies/aws/ec2/no_secrets_in_user_data.go +++ b/checks/cloud/aws/ec2/no_secrets_in_user_data.go @@ -9,12 +9,12 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/defsec/pkg/providers" ) -var CheckNoSecretsInUserData = rules.Register( +var CheckNoSecretsInUserData = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0029", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/ec2/no_secrets_in_user_data.tf.go b/checks/cloud/aws/ec2/no_secrets_in_user_data.tf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/no_secrets_in_user_data.tf.go rename to checks/cloud/aws/ec2/no_secrets_in_user_data.tf.go diff --git a/rules/cloud/policies/aws/ec2/no_secrets_in_user_data_test.go b/checks/cloud/aws/ec2/no_secrets_in_user_data_test.go similarity index 100% rename from rules/cloud/policies/aws/ec2/no_secrets_in_user_data_test.go rename to checks/cloud/aws/ec2/no_secrets_in_user_data_test.go diff --git a/rules/cloud/policies/aws/ec2/no_sensitive_info.go b/checks/cloud/aws/ec2/no_sensitive_info.go similarity index 94% rename from rules/cloud/policies/aws/ec2/no_sensitive_info.go rename to checks/cloud/aws/ec2/no_sensitive_info.go index 77e3a395..2e57c11c 100755 --- a/rules/cloud/policies/aws/ec2/no_sensitive_info.go +++ b/checks/cloud/aws/ec2/no_sensitive_info.go @@ -9,14 +9,14 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/defsec/pkg/providers" "github.com/owenrumney/squealer/pkg/squealer" ) -var CheckNoSensitiveInfo = rules.Register( +var CheckNoSensitiveInfo = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0122", Aliases: []string{"aws-autoscaling-no-sensitive-info"}, diff --git a/rules/cloud/policies/aws/ec2/no_sensitive_info.tf.go b/checks/cloud/aws/ec2/no_sensitive_info.tf.go similarity index 100% rename from rules/cloud/policies/aws/ec2/no_sensitive_info.tf.go rename to checks/cloud/aws/ec2/no_sensitive_info.tf.go diff --git a/rules/cloud/policies/aws/ec2/no_sensitive_info_test.go b/checks/cloud/aws/ec2/no_sensitive_info_test.go similarity index 100% rename from rules/cloud/policies/aws/ec2/no_sensitive_info_test.go rename to checks/cloud/aws/ec2/no_sensitive_info_test.go diff --git a/rules/cloud/policies/aws/ec2/require_vpc_flow_logs_for_all_vpcs.go b/checks/cloud/aws/ec2/require_vpc_flow_logs_for_all_vpcs.go similarity index 94% rename from rules/cloud/policies/aws/ec2/require_vpc_flow_logs_for_all_vpcs.go rename to checks/cloud/aws/ec2/require_vpc_flow_logs_for_all_vpcs.go index 64918a08..c755f961 100755 --- a/rules/cloud/policies/aws/ec2/require_vpc_flow_logs_for_all_vpcs.go +++ b/checks/cloud/aws/ec2/require_vpc_flow_logs_for_all_vpcs.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckRequireVPCFlowLogs = rules.Register( +var CheckRequireVPCFlowLogs = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0178", Aliases: []string{"aws-autoscaling-enable-at-rest-encryption"}, diff --git a/rules/cloud/policies/aws/ec2/require_vpc_flow_logs_for_all_vpcs_test.go b/checks/cloud/aws/ec2/require_vpc_flow_logs_for_all_vpcs_test.go similarity index 100% rename from rules/cloud/policies/aws/ec2/require_vpc_flow_logs_for_all_vpcs_test.go rename to checks/cloud/aws/ec2/require_vpc_flow_logs_for_all_vpcs_test.go diff --git a/rules/cloud/policies/aws/ec2/restrict_all_in_default_sg.go b/checks/cloud/aws/ec2/restrict_all_in_default_sg.go similarity index 89% rename from rules/cloud/policies/aws/ec2/restrict_all_in_default_sg.go rename to checks/cloud/aws/ec2/restrict_all_in_default_sg.go index 145a9580..315ee543 100755 --- a/rules/cloud/policies/aws/ec2/restrict_all_in_default_sg.go +++ b/checks/cloud/aws/ec2/restrict_all_in_default_sg.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckRestrictAllInDefaultSG = rules.Register( +var CheckRestrictAllInDefaultSG = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0173", Provider: providers.AWSProvider, @@ -37,7 +37,7 @@ security groups which will in-turn reduce the exposure of those resources. if sg.IsDefault.IsTrue() { if len(sg.IngressRules) > 0 || len(sg.EgressRules) > 0 { results.Add( - "Default security group for VPC has ingress or egress rules.", + "Default security group for VPC has ingress or egress checks.", &vpc, ) } diff --git a/rules/cloud/policies/aws/ec2/restrict_all_in_default_sg_test.go b/checks/cloud/aws/ec2/restrict_all_in_default_sg_test.go similarity index 100% rename from rules/cloud/policies/aws/ec2/restrict_all_in_default_sg_test.go rename to checks/cloud/aws/ec2/restrict_all_in_default_sg_test.go diff --git a/rules/cloud/policies/aws/ecr/enable_image_scans.cf.go b/checks/cloud/aws/ecr/enable_image_scans.cf.go similarity index 100% rename from rules/cloud/policies/aws/ecr/enable_image_scans.cf.go rename to checks/cloud/aws/ecr/enable_image_scans.cf.go diff --git a/rules/cloud/policies/aws/ecr/enable_image_scans.go b/checks/cloud/aws/ecr/enable_image_scans.go similarity index 94% rename from rules/cloud/policies/aws/ecr/enable_image_scans.go rename to checks/cloud/aws/ecr/enable_image_scans.go index c00240f1..9987387c 100755 --- a/rules/cloud/policies/aws/ecr/enable_image_scans.go +++ b/checks/cloud/aws/ecr/enable_image_scans.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableImageScans = rules.Register( +var CheckEnableImageScans = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0030", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/ecr/enable_image_scans.tf.go b/checks/cloud/aws/ecr/enable_image_scans.tf.go similarity index 100% rename from rules/cloud/policies/aws/ecr/enable_image_scans.tf.go rename to checks/cloud/aws/ecr/enable_image_scans.tf.go diff --git a/rules/cloud/policies/aws/ecr/enable_image_scans_test.go b/checks/cloud/aws/ecr/enable_image_scans_test.go similarity index 100% rename from rules/cloud/policies/aws/ecr/enable_image_scans_test.go rename to checks/cloud/aws/ecr/enable_image_scans_test.go diff --git a/rules/cloud/policies/aws/ecr/enforce_immutable_repository.cf.go b/checks/cloud/aws/ecr/enforce_immutable_repository.cf.go similarity index 100% rename from rules/cloud/policies/aws/ecr/enforce_immutable_repository.cf.go rename to checks/cloud/aws/ecr/enforce_immutable_repository.cf.go diff --git a/rules/cloud/policies/aws/ecr/enforce_immutable_repository.go b/checks/cloud/aws/ecr/enforce_immutable_repository.go similarity index 94% rename from rules/cloud/policies/aws/ecr/enforce_immutable_repository.go rename to checks/cloud/aws/ecr/enforce_immutable_repository.go index fdd378c8..f041f47d 100755 --- a/rules/cloud/policies/aws/ecr/enforce_immutable_repository.go +++ b/checks/cloud/aws/ecr/enforce_immutable_repository.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnforceImmutableRepository = rules.Register( +var CheckEnforceImmutableRepository = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0031", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/ecr/enforce_immutable_repository.tf.go b/checks/cloud/aws/ecr/enforce_immutable_repository.tf.go similarity index 100% rename from rules/cloud/policies/aws/ecr/enforce_immutable_repository.tf.go rename to checks/cloud/aws/ecr/enforce_immutable_repository.tf.go diff --git a/rules/cloud/policies/aws/ecr/enforce_immutable_repository_test.go b/checks/cloud/aws/ecr/enforce_immutable_repository_test.go similarity index 100% rename from rules/cloud/policies/aws/ecr/enforce_immutable_repository_test.go rename to checks/cloud/aws/ecr/enforce_immutable_repository_test.go diff --git a/rules/cloud/policies/aws/ecr/no_public_access.cf.go b/checks/cloud/aws/ecr/no_public_access.cf.go similarity index 100% rename from rules/cloud/policies/aws/ecr/no_public_access.cf.go rename to checks/cloud/aws/ecr/no_public_access.cf.go diff --git a/rules/cloud/policies/aws/ecr/no_public_access.go b/checks/cloud/aws/ecr/no_public_access.go similarity index 96% rename from rules/cloud/policies/aws/ecr/no_public_access.go rename to checks/cloud/aws/ecr/no_public_access.go index 3a6ef8fa..897edf40 100755 --- a/rules/cloud/policies/aws/ecr/no_public_access.go +++ b/checks/cloud/aws/ecr/no_public_access.go @@ -9,12 +9,12 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/defsec/pkg/providers" ) -var CheckNoPublicAccess = rules.Register( +var CheckNoPublicAccess = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0032", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/ecr/no_public_access.tf.go b/checks/cloud/aws/ecr/no_public_access.tf.go similarity index 100% rename from rules/cloud/policies/aws/ecr/no_public_access.tf.go rename to checks/cloud/aws/ecr/no_public_access.tf.go diff --git a/rules/cloud/policies/aws/ecr/no_public_access_test.go b/checks/cloud/aws/ecr/no_public_access_test.go similarity index 100% rename from rules/cloud/policies/aws/ecr/no_public_access_test.go rename to checks/cloud/aws/ecr/no_public_access_test.go diff --git a/rules/cloud/policies/aws/ecr/repository_customer_key.cf.go b/checks/cloud/aws/ecr/repository_customer_key.cf.go similarity index 100% rename from rules/cloud/policies/aws/ecr/repository_customer_key.cf.go rename to checks/cloud/aws/ecr/repository_customer_key.cf.go diff --git a/rules/cloud/policies/aws/ecr/repository_customer_key.go b/checks/cloud/aws/ecr/repository_customer_key.go similarity index 95% rename from rules/cloud/policies/aws/ecr/repository_customer_key.go rename to checks/cloud/aws/ecr/repository_customer_key.go index a6203dbd..48b2239d 100755 --- a/rules/cloud/policies/aws/ecr/repository_customer_key.go +++ b/checks/cloud/aws/ecr/repository_customer_key.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckRepositoryCustomerKey = rules.Register( +var CheckRepositoryCustomerKey = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0033", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/ecr/repository_customer_key.tf.go b/checks/cloud/aws/ecr/repository_customer_key.tf.go similarity index 100% rename from rules/cloud/policies/aws/ecr/repository_customer_key.tf.go rename to checks/cloud/aws/ecr/repository_customer_key.tf.go diff --git a/rules/cloud/policies/aws/ecr/repository_customer_key_test.go b/checks/cloud/aws/ecr/repository_customer_key_test.go similarity index 100% rename from rules/cloud/policies/aws/ecr/repository_customer_key_test.go rename to checks/cloud/aws/ecr/repository_customer_key_test.go diff --git a/rules/cloud/policies/aws/ecs/enable_container_insight.cf.go b/checks/cloud/aws/ecs/enable_container_insight.cf.go similarity index 100% rename from rules/cloud/policies/aws/ecs/enable_container_insight.cf.go rename to checks/cloud/aws/ecs/enable_container_insight.cf.go diff --git a/rules/cloud/policies/aws/ecs/enable_container_insight.go b/checks/cloud/aws/ecs/enable_container_insight.go similarity index 94% rename from rules/cloud/policies/aws/ecs/enable_container_insight.go rename to checks/cloud/aws/ecs/enable_container_insight.go index d36000f5..786db031 100755 --- a/rules/cloud/policies/aws/ecs/enable_container_insight.go +++ b/checks/cloud/aws/ecs/enable_container_insight.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableContainerInsight = rules.Register( +var CheckEnableContainerInsight = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0034", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/ecs/enable_container_insight.tf.go b/checks/cloud/aws/ecs/enable_container_insight.tf.go similarity index 100% rename from rules/cloud/policies/aws/ecs/enable_container_insight.tf.go rename to checks/cloud/aws/ecs/enable_container_insight.tf.go diff --git a/rules/cloud/policies/aws/ecs/enable_container_insight_test.go b/checks/cloud/aws/ecs/enable_container_insight_test.go similarity index 100% rename from rules/cloud/policies/aws/ecs/enable_container_insight_test.go rename to checks/cloud/aws/ecs/enable_container_insight_test.go diff --git a/rules/cloud/policies/aws/ecs/enable_in_transit_encryption.cf.go b/checks/cloud/aws/ecs/enable_in_transit_encryption.cf.go similarity index 100% rename from rules/cloud/policies/aws/ecs/enable_in_transit_encryption.cf.go rename to checks/cloud/aws/ecs/enable_in_transit_encryption.cf.go diff --git a/rules/cloud/policies/aws/ecs/enable_in_transit_encryption.go b/checks/cloud/aws/ecs/enable_in_transit_encryption.go similarity index 95% rename from rules/cloud/policies/aws/ecs/enable_in_transit_encryption.go rename to checks/cloud/aws/ecs/enable_in_transit_encryption.go index 1e9f79a2..1282b2e1 100755 --- a/rules/cloud/policies/aws/ecs/enable_in_transit_encryption.go +++ b/checks/cloud/aws/ecs/enable_in_transit_encryption.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableInTransitEncryption = rules.Register( +var CheckEnableInTransitEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0035", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/ecs/enable_in_transit_encryption.tf.go b/checks/cloud/aws/ecs/enable_in_transit_encryption.tf.go similarity index 100% rename from rules/cloud/policies/aws/ecs/enable_in_transit_encryption.tf.go rename to checks/cloud/aws/ecs/enable_in_transit_encryption.tf.go diff --git a/rules/cloud/policies/aws/ecs/enable_in_transit_encryption_test.go b/checks/cloud/aws/ecs/enable_in_transit_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/ecs/enable_in_transit_encryption_test.go rename to checks/cloud/aws/ecs/enable_in_transit_encryption_test.go diff --git a/rules/cloud/policies/aws/ecs/no_plaintext_secrets.cf.go b/checks/cloud/aws/ecs/no_plaintext_secrets.cf.go similarity index 100% rename from rules/cloud/policies/aws/ecs/no_plaintext_secrets.cf.go rename to checks/cloud/aws/ecs/no_plaintext_secrets.cf.go diff --git a/rules/cloud/policies/aws/ecs/no_plaintext_secrets.go b/checks/cloud/aws/ecs/no_plaintext_secrets.go similarity index 96% rename from rules/cloud/policies/aws/ecs/no_plaintext_secrets.go rename to checks/cloud/aws/ecs/no_plaintext_secrets.go index 6891170b..e7740ff6 100755 --- a/rules/cloud/policies/aws/ecs/no_plaintext_secrets.go +++ b/checks/cloud/aws/ecs/no_plaintext_secrets.go @@ -10,14 +10,14 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/defsec/pkg/providers" "github.com/owenrumney/squealer/pkg/squealer" ) -var CheckNoPlaintextSecrets = rules.Register( +var CheckNoPlaintextSecrets = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0036", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/ecs/no_plaintext_secrets.tf.go b/checks/cloud/aws/ecs/no_plaintext_secrets.tf.go similarity index 100% rename from rules/cloud/policies/aws/ecs/no_plaintext_secrets.tf.go rename to checks/cloud/aws/ecs/no_plaintext_secrets.tf.go diff --git a/rules/cloud/policies/aws/ecs/no_plaintext_secrets_test.go b/checks/cloud/aws/ecs/no_plaintext_secrets_test.go similarity index 100% rename from rules/cloud/policies/aws/ecs/no_plaintext_secrets_test.go rename to checks/cloud/aws/ecs/no_plaintext_secrets_test.go diff --git a/rules/cloud/policies/aws/efs/enable_at_rest_encryption.cf.go b/checks/cloud/aws/efs/enable_at_rest_encryption.cf.go similarity index 100% rename from rules/cloud/policies/aws/efs/enable_at_rest_encryption.cf.go rename to checks/cloud/aws/efs/enable_at_rest_encryption.cf.go diff --git a/rules/cloud/policies/aws/efs/enable_at_rest_encryption.go b/checks/cloud/aws/efs/enable_at_rest_encryption.go similarity index 94% rename from rules/cloud/policies/aws/efs/enable_at_rest_encryption.go rename to checks/cloud/aws/efs/enable_at_rest_encryption.go index 12a7a038..4607054f 100755 --- a/rules/cloud/policies/aws/efs/enable_at_rest_encryption.go +++ b/checks/cloud/aws/efs/enable_at_rest_encryption.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableAtRestEncryption = rules.Register( +var CheckEnableAtRestEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0037", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/efs/enable_at_rest_encryption.tf.go b/checks/cloud/aws/efs/enable_at_rest_encryption.tf.go similarity index 100% rename from rules/cloud/policies/aws/efs/enable_at_rest_encryption.tf.go rename to checks/cloud/aws/efs/enable_at_rest_encryption.tf.go diff --git a/rules/cloud/policies/aws/efs/enable_at_rest_encryption_test.go b/checks/cloud/aws/efs/enable_at_rest_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/efs/enable_at_rest_encryption_test.go rename to checks/cloud/aws/efs/enable_at_rest_encryption_test.go diff --git a/rules/cloud/policies/aws/eks/enable_control_plane_logging.go b/checks/cloud/aws/eks/enable_control_plane_logging.go similarity index 96% rename from rules/cloud/policies/aws/eks/enable_control_plane_logging.go rename to checks/cloud/aws/eks/enable_control_plane_logging.go index cc880910..7beb83c9 100755 --- a/rules/cloud/policies/aws/eks/enable_control_plane_logging.go +++ b/checks/cloud/aws/eks/enable_control_plane_logging.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableControlPlaneLogging = rules.Register( +var CheckEnableControlPlaneLogging = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0038", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/eks/enable_control_plane_logging.tf.go b/checks/cloud/aws/eks/enable_control_plane_logging.tf.go similarity index 100% rename from rules/cloud/policies/aws/eks/enable_control_plane_logging.tf.go rename to checks/cloud/aws/eks/enable_control_plane_logging.tf.go diff --git a/rules/cloud/policies/aws/eks/enable_control_plane_logging_test.go b/checks/cloud/aws/eks/enable_control_plane_logging_test.go similarity index 100% rename from rules/cloud/policies/aws/eks/enable_control_plane_logging_test.go rename to checks/cloud/aws/eks/enable_control_plane_logging_test.go diff --git a/rules/cloud/policies/aws/eks/encrypt_secrets.cf.go b/checks/cloud/aws/eks/encrypt_secrets.cf.go similarity index 100% rename from rules/cloud/policies/aws/eks/encrypt_secrets.cf.go rename to checks/cloud/aws/eks/encrypt_secrets.cf.go diff --git a/rules/cloud/policies/aws/eks/encrypt_secrets.go b/checks/cloud/aws/eks/encrypt_secrets.go similarity index 95% rename from rules/cloud/policies/aws/eks/encrypt_secrets.go rename to checks/cloud/aws/eks/encrypt_secrets.go index f71ac00a..1be78b5f 100755 --- a/rules/cloud/policies/aws/eks/encrypt_secrets.go +++ b/checks/cloud/aws/eks/encrypt_secrets.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEncryptSecrets = rules.Register( +var CheckEncryptSecrets = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0039", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/eks/encrypt_secrets.tf.go b/checks/cloud/aws/eks/encrypt_secrets.tf.go similarity index 100% rename from rules/cloud/policies/aws/eks/encrypt_secrets.tf.go rename to checks/cloud/aws/eks/encrypt_secrets.tf.go diff --git a/rules/cloud/policies/aws/eks/encrypt_secrets_test.go b/checks/cloud/aws/eks/encrypt_secrets_test.go similarity index 100% rename from rules/cloud/policies/aws/eks/encrypt_secrets_test.go rename to checks/cloud/aws/eks/encrypt_secrets_test.go diff --git a/rules/cloud/policies/aws/eks/no_public_cluster_access.go b/checks/cloud/aws/eks/no_public_cluster_access.go similarity index 93% rename from rules/cloud/policies/aws/eks/no_public_cluster_access.go rename to checks/cloud/aws/eks/no_public_cluster_access.go index f80cc72f..13806f79 100755 --- a/rules/cloud/policies/aws/eks/no_public_cluster_access.go +++ b/checks/cloud/aws/eks/no_public_cluster_access.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicClusterAccess = rules.Register( +var CheckNoPublicClusterAccess = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0040", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/eks/no_public_cluster_access.tf.go b/checks/cloud/aws/eks/no_public_cluster_access.tf.go similarity index 100% rename from rules/cloud/policies/aws/eks/no_public_cluster_access.tf.go rename to checks/cloud/aws/eks/no_public_cluster_access.tf.go diff --git a/rules/cloud/policies/aws/eks/no_public_cluster_access_test.go b/checks/cloud/aws/eks/no_public_cluster_access_test.go similarity index 100% rename from rules/cloud/policies/aws/eks/no_public_cluster_access_test.go rename to checks/cloud/aws/eks/no_public_cluster_access_test.go diff --git a/rules/cloud/policies/aws/eks/no_public_cluster_access_to_cidr.go b/checks/cloud/aws/eks/no_public_cluster_access_to_cidr.go similarity index 94% rename from rules/cloud/policies/aws/eks/no_public_cluster_access_to_cidr.go rename to checks/cloud/aws/eks/no_public_cluster_access_to_cidr.go index 8cbbaada..84d737c9 100755 --- a/rules/cloud/policies/aws/eks/no_public_cluster_access_to_cidr.go +++ b/checks/cloud/aws/eks/no_public_cluster_access_to_cidr.go @@ -9,14 +9,14 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/trivy-policies/internal/cidr" "github.com/aquasecurity/defsec/pkg/providers" ) -var CheckNoPublicClusterAccessToCidr = rules.Register( +var CheckNoPublicClusterAccessToCidr = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0041", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/eks/no_public_cluster_access_to_cidr.tf.go b/checks/cloud/aws/eks/no_public_cluster_access_to_cidr.tf.go similarity index 100% rename from rules/cloud/policies/aws/eks/no_public_cluster_access_to_cidr.tf.go rename to checks/cloud/aws/eks/no_public_cluster_access_to_cidr.tf.go diff --git a/rules/cloud/policies/aws/eks/no_public_cluster_access_to_cidr_test.go b/checks/cloud/aws/eks/no_public_cluster_access_to_cidr_test.go similarity index 100% rename from rules/cloud/policies/aws/eks/no_public_cluster_access_to_cidr_test.go rename to checks/cloud/aws/eks/no_public_cluster_access_to_cidr_test.go diff --git a/rules/cloud/policies/aws/elasticache/add_description_for_security_group.cf.go b/checks/cloud/aws/elasticache/add_description_for_security_group.cf.go similarity index 100% rename from rules/cloud/policies/aws/elasticache/add_description_for_security_group.cf.go rename to checks/cloud/aws/elasticache/add_description_for_security_group.cf.go diff --git a/rules/cloud/policies/aws/elasticache/add_description_for_security_group.go b/checks/cloud/aws/elasticache/add_description_for_security_group.go similarity index 85% rename from rules/cloud/policies/aws/elasticache/add_description_for_security_group.go rename to checks/cloud/aws/elasticache/add_description_for_security_group.go index bf56558f..79f102dc 100755 --- a/rules/cloud/policies/aws/elasticache/add_description_for_security_group.go +++ b/checks/cloud/aws/elasticache/add_description_for_security_group.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckAddDescriptionForSecurityGroup = rules.Register( +var CheckAddDescriptionForSecurityGroup = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0049", Provider: providers.AWSProvider, @@ -16,8 +16,8 @@ var CheckAddDescriptionForSecurityGroup = rules.Register( ShortCode: "add-description-for-security-group", Summary: "Missing description for security group/security group rule.", Impact: "Descriptions provide context for the firewall rule reasons", - Resolution: "Add descriptions for all security groups and rules", - Explanation: `Security groups and security group rules should include a description for auditing purposes. + Resolution: "Add descriptions for all security groups and checks", + Explanation: `Security groups and security group checks should include a description for auditing purposes. Simplifies auditing, debugging, and managing security groups.`, Links: []string{ diff --git a/rules/cloud/policies/aws/elasticache/add_description_for_security_group.tf.go b/checks/cloud/aws/elasticache/add_description_for_security_group.tf.go similarity index 100% rename from rules/cloud/policies/aws/elasticache/add_description_for_security_group.tf.go rename to checks/cloud/aws/elasticache/add_description_for_security_group.tf.go diff --git a/rules/cloud/policies/aws/elasticache/add_description_for_security_group_test.go b/checks/cloud/aws/elasticache/add_description_for_security_group_test.go similarity index 100% rename from rules/cloud/policies/aws/elasticache/add_description_for_security_group_test.go rename to checks/cloud/aws/elasticache/add_description_for_security_group_test.go diff --git a/rules/cloud/policies/aws/elasticache/enable_at_rest_encryption.go b/checks/cloud/aws/elasticache/enable_at_rest_encryption.go similarity index 93% rename from rules/cloud/policies/aws/elasticache/enable_at_rest_encryption.go rename to checks/cloud/aws/elasticache/enable_at_rest_encryption.go index f9f35ed2..36fc837e 100755 --- a/rules/cloud/policies/aws/elasticache/enable_at_rest_encryption.go +++ b/checks/cloud/aws/elasticache/enable_at_rest_encryption.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableAtRestEncryption = rules.Register( +var CheckEnableAtRestEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0045", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/elasticache/enable_at_rest_encryption.tf.go b/checks/cloud/aws/elasticache/enable_at_rest_encryption.tf.go similarity index 100% rename from rules/cloud/policies/aws/elasticache/enable_at_rest_encryption.tf.go rename to checks/cloud/aws/elasticache/enable_at_rest_encryption.tf.go diff --git a/rules/cloud/policies/aws/elasticache/enable_at_rest_encryption_test.go b/checks/cloud/aws/elasticache/enable_at_rest_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/elasticache/enable_at_rest_encryption_test.go rename to checks/cloud/aws/elasticache/enable_at_rest_encryption_test.go diff --git a/rules/cloud/policies/aws/elasticache/enable_backup_retention.cf.go b/checks/cloud/aws/elasticache/enable_backup_retention.cf.go similarity index 100% rename from rules/cloud/policies/aws/elasticache/enable_backup_retention.cf.go rename to checks/cloud/aws/elasticache/enable_backup_retention.cf.go diff --git a/rules/cloud/policies/aws/elasticache/enable_backup_retention.go b/checks/cloud/aws/elasticache/enable_backup_retention.go similarity index 95% rename from rules/cloud/policies/aws/elasticache/enable_backup_retention.go rename to checks/cloud/aws/elasticache/enable_backup_retention.go index ac48a8ae..4ab4ed60 100755 --- a/rules/cloud/policies/aws/elasticache/enable_backup_retention.go +++ b/checks/cloud/aws/elasticache/enable_backup_retention.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableBackupRetention = rules.Register( +var CheckEnableBackupRetention = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0050", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/elasticache/enable_backup_retention.tf.go b/checks/cloud/aws/elasticache/enable_backup_retention.tf.go similarity index 100% rename from rules/cloud/policies/aws/elasticache/enable_backup_retention.tf.go rename to checks/cloud/aws/elasticache/enable_backup_retention.tf.go diff --git a/rules/cloud/policies/aws/elasticache/enable_backup_retention_test.go b/checks/cloud/aws/elasticache/enable_backup_retention_test.go similarity index 100% rename from rules/cloud/policies/aws/elasticache/enable_backup_retention_test.go rename to checks/cloud/aws/elasticache/enable_backup_retention_test.go diff --git a/rules/cloud/policies/aws/elasticache/enable_in_transit_encryption.cf.go b/checks/cloud/aws/elasticache/enable_in_transit_encryption.cf.go similarity index 100% rename from rules/cloud/policies/aws/elasticache/enable_in_transit_encryption.cf.go rename to checks/cloud/aws/elasticache/enable_in_transit_encryption.cf.go diff --git a/rules/cloud/policies/aws/elasticache/enable_in_transit_encryption.go b/checks/cloud/aws/elasticache/enable_in_transit_encryption.go similarity index 94% rename from rules/cloud/policies/aws/elasticache/enable_in_transit_encryption.go rename to checks/cloud/aws/elasticache/enable_in_transit_encryption.go index 26a0502a..86695019 100755 --- a/rules/cloud/policies/aws/elasticache/enable_in_transit_encryption.go +++ b/checks/cloud/aws/elasticache/enable_in_transit_encryption.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableInTransitEncryption = rules.Register( +var CheckEnableInTransitEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0051", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/elasticache/enable_in_transit_encryption.tf.go b/checks/cloud/aws/elasticache/enable_in_transit_encryption.tf.go similarity index 100% rename from rules/cloud/policies/aws/elasticache/enable_in_transit_encryption.tf.go rename to checks/cloud/aws/elasticache/enable_in_transit_encryption.tf.go diff --git a/rules/cloud/policies/aws/elasticache/enable_in_transit_encryption_test.go b/checks/cloud/aws/elasticache/enable_in_transit_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/elasticache/enable_in_transit_encryption_test.go rename to checks/cloud/aws/elasticache/enable_in_transit_encryption_test.go diff --git a/rules/cloud/policies/aws/elasticsearch/enable_domain_encryption.cf.go b/checks/cloud/aws/elasticsearch/enable_domain_encryption.cf.go similarity index 100% rename from rules/cloud/policies/aws/elasticsearch/enable_domain_encryption.cf.go rename to checks/cloud/aws/elasticsearch/enable_domain_encryption.cf.go diff --git a/rules/cloud/policies/aws/elasticsearch/enable_domain_encryption.go b/checks/cloud/aws/elasticsearch/enable_domain_encryption.go similarity index 94% rename from rules/cloud/policies/aws/elasticsearch/enable_domain_encryption.go rename to checks/cloud/aws/elasticsearch/enable_domain_encryption.go index ec0b9a4b..dbead8a6 100755 --- a/rules/cloud/policies/aws/elasticsearch/enable_domain_encryption.go +++ b/checks/cloud/aws/elasticsearch/enable_domain_encryption.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableDomainEncryption = rules.Register( +var CheckEnableDomainEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0048", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/elasticsearch/enable_domain_encryption.tf.go b/checks/cloud/aws/elasticsearch/enable_domain_encryption.tf.go similarity index 100% rename from rules/cloud/policies/aws/elasticsearch/enable_domain_encryption.tf.go rename to checks/cloud/aws/elasticsearch/enable_domain_encryption.tf.go diff --git a/rules/cloud/policies/aws/elasticsearch/enable_domain_encryption_test.go b/checks/cloud/aws/elasticsearch/enable_domain_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/elasticsearch/enable_domain_encryption_test.go rename to checks/cloud/aws/elasticsearch/enable_domain_encryption_test.go diff --git a/rules/cloud/policies/aws/elasticsearch/enable_domain_logging.cf.go b/checks/cloud/aws/elasticsearch/enable_domain_logging.cf.go similarity index 100% rename from rules/cloud/policies/aws/elasticsearch/enable_domain_logging.cf.go rename to checks/cloud/aws/elasticsearch/enable_domain_logging.cf.go diff --git a/rules/cloud/policies/aws/elasticsearch/enable_domain_logging.go b/checks/cloud/aws/elasticsearch/enable_domain_logging.go similarity index 95% rename from rules/cloud/policies/aws/elasticsearch/enable_domain_logging.go rename to checks/cloud/aws/elasticsearch/enable_domain_logging.go index 6d774574..a813f585 100755 --- a/rules/cloud/policies/aws/elasticsearch/enable_domain_logging.go +++ b/checks/cloud/aws/elasticsearch/enable_domain_logging.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableDomainLogging = rules.Register( +var CheckEnableDomainLogging = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0042", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/elasticsearch/enable_domain_logging.tf.go b/checks/cloud/aws/elasticsearch/enable_domain_logging.tf.go similarity index 100% rename from rules/cloud/policies/aws/elasticsearch/enable_domain_logging.tf.go rename to checks/cloud/aws/elasticsearch/enable_domain_logging.tf.go diff --git a/rules/cloud/policies/aws/elasticsearch/enable_domain_logging_test.go b/checks/cloud/aws/elasticsearch/enable_domain_logging_test.go similarity index 100% rename from rules/cloud/policies/aws/elasticsearch/enable_domain_logging_test.go rename to checks/cloud/aws/elasticsearch/enable_domain_logging_test.go diff --git a/rules/cloud/policies/aws/elasticsearch/enable_in_transit_encryption.cf.go b/checks/cloud/aws/elasticsearch/enable_in_transit_encryption.cf.go similarity index 100% rename from rules/cloud/policies/aws/elasticsearch/enable_in_transit_encryption.cf.go rename to checks/cloud/aws/elasticsearch/enable_in_transit_encryption.cf.go diff --git a/rules/cloud/policies/aws/elasticsearch/enable_in_transit_encryption.go b/checks/cloud/aws/elasticsearch/enable_in_transit_encryption.go similarity index 94% rename from rules/cloud/policies/aws/elasticsearch/enable_in_transit_encryption.go rename to checks/cloud/aws/elasticsearch/enable_in_transit_encryption.go index 0c73540b..e28e2dde 100755 --- a/rules/cloud/policies/aws/elasticsearch/enable_in_transit_encryption.go +++ b/checks/cloud/aws/elasticsearch/enable_in_transit_encryption.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableInTransitEncryption = rules.Register( +var CheckEnableInTransitEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0043", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/elasticsearch/enable_in_transit_encryption.tf.go b/checks/cloud/aws/elasticsearch/enable_in_transit_encryption.tf.go similarity index 100% rename from rules/cloud/policies/aws/elasticsearch/enable_in_transit_encryption.tf.go rename to checks/cloud/aws/elasticsearch/enable_in_transit_encryption.tf.go diff --git a/rules/cloud/policies/aws/elasticsearch/enable_in_transit_encryption_test.go b/checks/cloud/aws/elasticsearch/enable_in_transit_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/elasticsearch/enable_in_transit_encryption_test.go rename to checks/cloud/aws/elasticsearch/enable_in_transit_encryption_test.go diff --git a/rules/cloud/policies/aws/elasticsearch/enforce_https.cf.go b/checks/cloud/aws/elasticsearch/enforce_https.cf.go similarity index 100% rename from rules/cloud/policies/aws/elasticsearch/enforce_https.cf.go rename to checks/cloud/aws/elasticsearch/enforce_https.cf.go diff --git a/rules/cloud/policies/aws/elasticsearch/enforce_https.go b/checks/cloud/aws/elasticsearch/enforce_https.go similarity index 95% rename from rules/cloud/policies/aws/elasticsearch/enforce_https.go rename to checks/cloud/aws/elasticsearch/enforce_https.go index 6b131e32..afc47b21 100755 --- a/rules/cloud/policies/aws/elasticsearch/enforce_https.go +++ b/checks/cloud/aws/elasticsearch/enforce_https.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnforceHttps = rules.Register( +var CheckEnforceHttps = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0046", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/elasticsearch/enforce_https.tf.go b/checks/cloud/aws/elasticsearch/enforce_https.tf.go similarity index 100% rename from rules/cloud/policies/aws/elasticsearch/enforce_https.tf.go rename to checks/cloud/aws/elasticsearch/enforce_https.tf.go diff --git a/rules/cloud/policies/aws/elasticsearch/enforce_https_test.go b/checks/cloud/aws/elasticsearch/enforce_https_test.go similarity index 100% rename from rules/cloud/policies/aws/elasticsearch/enforce_https_test.go rename to checks/cloud/aws/elasticsearch/enforce_https_test.go diff --git a/rules/cloud/policies/aws/elasticsearch/use_secure_tls_policy.cf.go b/checks/cloud/aws/elasticsearch/use_secure_tls_policy.cf.go similarity index 100% rename from rules/cloud/policies/aws/elasticsearch/use_secure_tls_policy.cf.go rename to checks/cloud/aws/elasticsearch/use_secure_tls_policy.cf.go diff --git a/rules/cloud/policies/aws/elasticsearch/use_secure_tls_policy.go b/checks/cloud/aws/elasticsearch/use_secure_tls_policy.go similarity index 94% rename from rules/cloud/policies/aws/elasticsearch/use_secure_tls_policy.go rename to checks/cloud/aws/elasticsearch/use_secure_tls_policy.go index 2faefa33..0693e2b4 100755 --- a/rules/cloud/policies/aws/elasticsearch/use_secure_tls_policy.go +++ b/checks/cloud/aws/elasticsearch/use_secure_tls_policy.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckUseSecureTlsPolicy = rules.Register( +var CheckUseSecureTlsPolicy = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0126", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/elasticsearch/use_secure_tls_policy.tf.go b/checks/cloud/aws/elasticsearch/use_secure_tls_policy.tf.go similarity index 100% rename from rules/cloud/policies/aws/elasticsearch/use_secure_tls_policy.tf.go rename to checks/cloud/aws/elasticsearch/use_secure_tls_policy.tf.go diff --git a/rules/cloud/policies/aws/elasticsearch/use_secure_tls_policy_test.go b/checks/cloud/aws/elasticsearch/use_secure_tls_policy_test.go similarity index 100% rename from rules/cloud/policies/aws/elasticsearch/use_secure_tls_policy_test.go rename to checks/cloud/aws/elasticsearch/use_secure_tls_policy_test.go diff --git a/rules/cloud/policies/aws/elb/alb_not_public.go b/checks/cloud/aws/elb/alb_not_public.go similarity index 94% rename from rules/cloud/policies/aws/elb/alb_not_public.go rename to checks/cloud/aws/elb/alb_not_public.go index 13385ea7..b456ea97 100755 --- a/rules/cloud/policies/aws/elb/alb_not_public.go +++ b/checks/cloud/aws/elb/alb_not_public.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckAlbNotPublic = rules.Register( +var CheckAlbNotPublic = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0053", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/elb/alb_not_public.tf.go b/checks/cloud/aws/elb/alb_not_public.tf.go similarity index 100% rename from rules/cloud/policies/aws/elb/alb_not_public.tf.go rename to checks/cloud/aws/elb/alb_not_public.tf.go diff --git a/rules/cloud/policies/aws/elb/alb_not_public_test.go b/checks/cloud/aws/elb/alb_not_public_test.go similarity index 100% rename from rules/cloud/policies/aws/elb/alb_not_public_test.go rename to checks/cloud/aws/elb/alb_not_public_test.go diff --git a/rules/cloud/policies/aws/elb/drop_invalid_headers.go b/checks/cloud/aws/elb/drop_invalid_headers.go similarity index 94% rename from rules/cloud/policies/aws/elb/drop_invalid_headers.go rename to checks/cloud/aws/elb/drop_invalid_headers.go index eacbf548..b2175ad0 100755 --- a/rules/cloud/policies/aws/elb/drop_invalid_headers.go +++ b/checks/cloud/aws/elb/drop_invalid_headers.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckDropInvalidHeaders = rules.Register( +var CheckDropInvalidHeaders = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0052", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/elb/drop_invalid_headers.tf.go b/checks/cloud/aws/elb/drop_invalid_headers.tf.go similarity index 100% rename from rules/cloud/policies/aws/elb/drop_invalid_headers.tf.go rename to checks/cloud/aws/elb/drop_invalid_headers.tf.go diff --git a/rules/cloud/policies/aws/elb/drop_invalid_headers_test.go b/checks/cloud/aws/elb/drop_invalid_headers_test.go similarity index 100% rename from rules/cloud/policies/aws/elb/drop_invalid_headers_test.go rename to checks/cloud/aws/elb/drop_invalid_headers_test.go diff --git a/rules/cloud/policies/aws/elb/http_not_used.go b/checks/cloud/aws/elb/http_not_used.go similarity index 95% rename from rules/cloud/policies/aws/elb/http_not_used.go rename to checks/cloud/aws/elb/http_not_used.go index 47ba0753..7190a280 100755 --- a/rules/cloud/policies/aws/elb/http_not_used.go +++ b/checks/cloud/aws/elb/http_not_used.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckHttpNotUsed = rules.Register( +var CheckHttpNotUsed = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0054", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/elb/http_not_used.tf.go b/checks/cloud/aws/elb/http_not_used.tf.go similarity index 100% rename from rules/cloud/policies/aws/elb/http_not_used.tf.go rename to checks/cloud/aws/elb/http_not_used.tf.go diff --git a/rules/cloud/policies/aws/elb/http_not_used_test.go b/checks/cloud/aws/elb/http_not_used_test.go similarity index 100% rename from rules/cloud/policies/aws/elb/http_not_used_test.go rename to checks/cloud/aws/elb/http_not_used_test.go diff --git a/rules/cloud/policies/aws/elb/use_secure_tls_policy.go b/checks/cloud/aws/elb/use_secure_tls_policy.go similarity index 94% rename from rules/cloud/policies/aws/elb/use_secure_tls_policy.go rename to checks/cloud/aws/elb/use_secure_tls_policy.go index 5f438c9b..05c48688 100755 --- a/rules/cloud/policies/aws/elb/use_secure_tls_policy.go +++ b/checks/cloud/aws/elb/use_secure_tls_policy.go @@ -5,7 +5,7 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) var outdatedSSLPolicies = []string{ @@ -21,7 +21,7 @@ var outdatedSSLPolicies = []string{ "ELBSecurityPolicy-TLS13-1-2-Ext2-2021-06", } -var CheckUseSecureTlsPolicy = rules.Register( +var CheckUseSecureTlsPolicy = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0047", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/elb/use_secure_tls_policy.tf.go b/checks/cloud/aws/elb/use_secure_tls_policy.tf.go similarity index 100% rename from rules/cloud/policies/aws/elb/use_secure_tls_policy.tf.go rename to checks/cloud/aws/elb/use_secure_tls_policy.tf.go diff --git a/rules/cloud/policies/aws/elb/use_secure_tls_policy_test.go b/checks/cloud/aws/elb/use_secure_tls_policy_test.go similarity index 100% rename from rules/cloud/policies/aws/elb/use_secure_tls_policy_test.go rename to checks/cloud/aws/elb/use_secure_tls_policy_test.go diff --git a/rules/cloud/policies/aws/emr/enable_at_rest_encryption.go b/checks/cloud/aws/emr/enable_at_rest_encryption.go similarity index 95% rename from rules/cloud/policies/aws/emr/enable_at_rest_encryption.go rename to checks/cloud/aws/emr/enable_at_rest_encryption.go index 2100b33b..348e6bd1 100644 --- a/rules/cloud/policies/aws/emr/enable_at_rest_encryption.go +++ b/checks/cloud/aws/emr/enable_at_rest_encryption.go @@ -7,10 +7,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableAtRestEncryption = rules.Register( +var CheckEnableAtRestEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0137", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/emr/enable_at_rest_encryption.tf.go b/checks/cloud/aws/emr/enable_at_rest_encryption.tf.go similarity index 100% rename from rules/cloud/policies/aws/emr/enable_at_rest_encryption.tf.go rename to checks/cloud/aws/emr/enable_at_rest_encryption.tf.go diff --git a/rules/cloud/policies/aws/emr/enable_at_rest_encryption_test.go b/checks/cloud/aws/emr/enable_at_rest_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/emr/enable_at_rest_encryption_test.go rename to checks/cloud/aws/emr/enable_at_rest_encryption_test.go diff --git a/rules/cloud/policies/aws/emr/enable_in_transit_encryption.go b/checks/cloud/aws/emr/enable_in_transit_encryption.go similarity index 94% rename from rules/cloud/policies/aws/emr/enable_in_transit_encryption.go rename to checks/cloud/aws/emr/enable_in_transit_encryption.go index 8f711a66..1349c5cf 100644 --- a/rules/cloud/policies/aws/emr/enable_in_transit_encryption.go +++ b/checks/cloud/aws/emr/enable_in_transit_encryption.go @@ -7,10 +7,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableInTransitEncryption = rules.Register( +var CheckEnableInTransitEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0138", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/emr/enable_in_transit_encryption.tf.go b/checks/cloud/aws/emr/enable_in_transit_encryption.tf.go similarity index 100% rename from rules/cloud/policies/aws/emr/enable_in_transit_encryption.tf.go rename to checks/cloud/aws/emr/enable_in_transit_encryption.tf.go diff --git a/rules/cloud/policies/aws/emr/enable_in_transit_encryption_test.go b/checks/cloud/aws/emr/enable_in_transit_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/emr/enable_in_transit_encryption_test.go rename to checks/cloud/aws/emr/enable_in_transit_encryption_test.go diff --git a/rules/cloud/policies/aws/emr/enable_local_disk_encryption.go b/checks/cloud/aws/emr/enable_local_disk_encryption.go similarity index 94% rename from rules/cloud/policies/aws/emr/enable_local_disk_encryption.go rename to checks/cloud/aws/emr/enable_local_disk_encryption.go index 59ec394c..20f49b76 100644 --- a/rules/cloud/policies/aws/emr/enable_local_disk_encryption.go +++ b/checks/cloud/aws/emr/enable_local_disk_encryption.go @@ -7,10 +7,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableLocalDiskEncryption = rules.Register( +var CheckEnableLocalDiskEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0139", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/emr/enable_local_disk_encryption.tf.go b/checks/cloud/aws/emr/enable_local_disk_encryption.tf.go similarity index 100% rename from rules/cloud/policies/aws/emr/enable_local_disk_encryption.tf.go rename to checks/cloud/aws/emr/enable_local_disk_encryption.tf.go diff --git a/rules/cloud/policies/aws/emr/enable_local_disk_encryption_test.go b/checks/cloud/aws/emr/enable_local_disk_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/emr/enable_local_disk_encryption_test.go rename to checks/cloud/aws/emr/enable_local_disk_encryption_test.go diff --git a/rules/cloud/policies/aws/iam/disable_unused_credentials.go b/checks/cloud/aws/iam/disable_unused_credentials.go similarity index 94% rename from rules/cloud/policies/aws/iam/disable_unused_credentials.go rename to checks/cloud/aws/iam/disable_unused_credentials.go index 1f5bf0f1..bff33ad5 100644 --- a/rules/cloud/policies/aws/iam/disable_unused_credentials.go +++ b/checks/cloud/aws/iam/disable_unused_credentials.go @@ -12,12 +12,12 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/defsec/pkg/providers" ) -var CheckUnusedCredentialsDisabled = rules.Register( +var CheckUnusedCredentialsDisabled = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0144", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/iam/disable_unused_credentials_45.go b/checks/cloud/aws/iam/disable_unused_credentials_45.go similarity index 94% rename from rules/cloud/policies/aws/iam/disable_unused_credentials_45.go rename to checks/cloud/aws/iam/disable_unused_credentials_45.go index 96f2ed89..a49aa919 100644 --- a/rules/cloud/policies/aws/iam/disable_unused_credentials_45.go +++ b/checks/cloud/aws/iam/disable_unused_credentials_45.go @@ -12,12 +12,12 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/defsec/pkg/providers" ) -var CheckUnusedCredentialsDisabled45Days = rules.Register( +var CheckUnusedCredentialsDisabled45Days = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0166", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/iam/disable_unused_credentials_45_test.go b/checks/cloud/aws/iam/disable_unused_credentials_45_test.go similarity index 100% rename from rules/cloud/policies/aws/iam/disable_unused_credentials_45_test.go rename to checks/cloud/aws/iam/disable_unused_credentials_45_test.go diff --git a/rules/cloud/policies/aws/iam/disable_unused_credentials_test.go b/checks/cloud/aws/iam/disable_unused_credentials_test.go similarity index 100% rename from rules/cloud/policies/aws/iam/disable_unused_credentials_test.go rename to checks/cloud/aws/iam/disable_unused_credentials_test.go diff --git a/rules/cloud/policies/aws/iam/enforce_group_mfa.go b/checks/cloud/aws/iam/enforce_group_mfa.go similarity index 95% rename from rules/cloud/policies/aws/iam/enforce_group_mfa.go rename to checks/cloud/aws/iam/enforce_group_mfa.go index 1ab0945a..14ba7fa6 100644 --- a/rules/cloud/policies/aws/iam/enforce_group_mfa.go +++ b/checks/cloud/aws/iam/enforce_group_mfa.go @@ -9,12 +9,12 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/defsec/pkg/providers" ) -var CheckEnforceGroupMFA = rules.Register( +var CheckEnforceGroupMFA = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0123", Aliases: []string{ diff --git a/rules/cloud/policies/aws/iam/enforce_group_mfa.tf.go b/checks/cloud/aws/iam/enforce_group_mfa.tf.go similarity index 100% rename from rules/cloud/policies/aws/iam/enforce_group_mfa.tf.go rename to checks/cloud/aws/iam/enforce_group_mfa.tf.go diff --git a/rules/cloud/policies/aws/iam/enforce_group_mfa_test.go b/checks/cloud/aws/iam/enforce_group_mfa_test.go similarity index 100% rename from rules/cloud/policies/aws/iam/enforce_group_mfa_test.go rename to checks/cloud/aws/iam/enforce_group_mfa_test.go diff --git a/rules/cloud/policies/aws/iam/enforce_root_hardware_mfa.go b/checks/cloud/aws/iam/enforce_root_hardware_mfa.go similarity index 94% rename from rules/cloud/policies/aws/iam/enforce_root_hardware_mfa.go rename to checks/cloud/aws/iam/enforce_root_hardware_mfa.go index 16caef8c..8a9ec33b 100644 --- a/rules/cloud/policies/aws/iam/enforce_root_hardware_mfa.go +++ b/checks/cloud/aws/iam/enforce_root_hardware_mfa.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var checkRootHardwareMFAEnabled = rules.Register( +var checkRootHardwareMFAEnabled = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0165", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/iam/enforce_root_hardware_mfa_test.go b/checks/cloud/aws/iam/enforce_root_hardware_mfa_test.go similarity index 100% rename from rules/cloud/policies/aws/iam/enforce_root_hardware_mfa_test.go rename to checks/cloud/aws/iam/enforce_root_hardware_mfa_test.go diff --git a/rules/cloud/policies/aws/iam/enforce_root_mfa.go b/checks/cloud/aws/iam/enforce_root_mfa.go similarity index 95% rename from rules/cloud/policies/aws/iam/enforce_root_mfa.go rename to checks/cloud/aws/iam/enforce_root_mfa.go index 77be8725..f0c516ea 100644 --- a/rules/cloud/policies/aws/iam/enforce_root_mfa.go +++ b/checks/cloud/aws/iam/enforce_root_mfa.go @@ -9,12 +9,12 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/defsec/pkg/providers" ) -var checkRootMFAEnabled = rules.Register( +var checkRootMFAEnabled = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0142", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/iam/enforce_root_mfa_test.go b/checks/cloud/aws/iam/enforce_root_mfa_test.go similarity index 100% rename from rules/cloud/policies/aws/iam/enforce_root_mfa_test.go rename to checks/cloud/aws/iam/enforce_root_mfa_test.go diff --git a/rules/cloud/policies/aws/iam/enforce_user_mfa.go b/checks/cloud/aws/iam/enforce_user_mfa.go similarity index 92% rename from rules/cloud/policies/aws/iam/enforce_user_mfa.go rename to checks/cloud/aws/iam/enforce_user_mfa.go index f9679fbc..917a7695 100644 --- a/rules/cloud/policies/aws/iam/enforce_user_mfa.go +++ b/checks/cloud/aws/iam/enforce_user_mfa.go @@ -9,12 +9,12 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/defsec/pkg/providers" ) -var CheckEnforceUserMFA = rules.Register( +var CheckEnforceUserMFA = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0145", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/iam/enforce_user_mfa_test.go b/checks/cloud/aws/iam/enforce_user_mfa_test.go similarity index 100% rename from rules/cloud/policies/aws/iam/enforce_user_mfa_test.go rename to checks/cloud/aws/iam/enforce_user_mfa_test.go diff --git a/rules/cloud/policies/aws/iam/filter_iam_pass_role.rego b/checks/cloud/aws/iam/filter_iam_pass_role.rego similarity index 100% rename from rules/cloud/policies/aws/iam/filter_iam_pass_role.rego rename to checks/cloud/aws/iam/filter_iam_pass_role.rego diff --git a/rules/cloud/policies/aws/iam/filter_iam_pass_role_test.rego b/checks/cloud/aws/iam/filter_iam_pass_role_test.rego similarity index 100% rename from rules/cloud/policies/aws/iam/filter_iam_pass_role_test.rego rename to checks/cloud/aws/iam/filter_iam_pass_role_test.rego diff --git a/rules/cloud/policies/aws/iam/limit_root_account_usage.go b/checks/cloud/aws/iam/limit_root_account_usage.go similarity index 94% rename from rules/cloud/policies/aws/iam/limit_root_account_usage.go rename to checks/cloud/aws/iam/limit_root_account_usage.go index 2df35db4..5bb62a1c 100644 --- a/rules/cloud/policies/aws/iam/limit_root_account_usage.go +++ b/checks/cloud/aws/iam/limit_root_account_usage.go @@ -11,12 +11,12 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/defsec/pkg/providers" ) -var checkLimitRootAccountUsage = rules.Register( +var checkLimitRootAccountUsage = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0140", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/iam/limit_root_account_usage_test.go b/checks/cloud/aws/iam/limit_root_account_usage_test.go similarity index 100% rename from rules/cloud/policies/aws/iam/limit_root_account_usage_test.go rename to checks/cloud/aws/iam/limit_root_account_usage_test.go diff --git a/rules/cloud/policies/aws/iam/limit_user_access_keys.go b/checks/cloud/aws/iam/limit_user_access_keys.go similarity index 92% rename from rules/cloud/policies/aws/iam/limit_user_access_keys.go rename to checks/cloud/aws/iam/limit_user_access_keys.go index 904d6450..221bb344 100644 --- a/rules/cloud/policies/aws/iam/limit_user_access_keys.go +++ b/checks/cloud/aws/iam/limit_user_access_keys.go @@ -9,12 +9,12 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/defsec/pkg/providers" ) -var CheckLimitUserAccessKeys = rules.Register( +var CheckLimitUserAccessKeys = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0167", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/iam/limit_user_access_keys_test.go b/checks/cloud/aws/iam/limit_user_access_keys_test.go similarity index 100% rename from rules/cloud/policies/aws/iam/limit_user_access_keys_test.go rename to checks/cloud/aws/iam/limit_user_access_keys_test.go diff --git a/rules/cloud/policies/aws/iam/no_password_reuse.go b/checks/cloud/aws/iam/no_password_reuse.go similarity index 94% rename from rules/cloud/policies/aws/iam/no_password_reuse.go rename to checks/cloud/aws/iam/no_password_reuse.go index e1d00de8..4542248f 100755 --- a/rules/cloud/policies/aws/iam/no_password_reuse.go +++ b/checks/cloud/aws/iam/no_password_reuse.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPasswordReuse = rules.Register( +var CheckNoPasswordReuse = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0056", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/iam/no_password_reuse.tf.go b/checks/cloud/aws/iam/no_password_reuse.tf.go similarity index 100% rename from rules/cloud/policies/aws/iam/no_password_reuse.tf.go rename to checks/cloud/aws/iam/no_password_reuse.tf.go diff --git a/rules/cloud/policies/aws/iam/no_password_reuse_test.go b/checks/cloud/aws/iam/no_password_reuse_test.go similarity index 100% rename from rules/cloud/policies/aws/iam/no_password_reuse_test.go rename to checks/cloud/aws/iam/no_password_reuse_test.go diff --git a/rules/cloud/policies/aws/iam/no_policy_wildcards.cf.go b/checks/cloud/aws/iam/no_policy_wildcards.cf.go similarity index 100% rename from rules/cloud/policies/aws/iam/no_policy_wildcards.cf.go rename to checks/cloud/aws/iam/no_policy_wildcards.cf.go diff --git a/rules/cloud/policies/aws/iam/no_policy_wildcards.go b/checks/cloud/aws/iam/no_policy_wildcards.go similarity index 98% rename from rules/cloud/policies/aws/iam/no_policy_wildcards.go rename to checks/cloud/aws/iam/no_policy_wildcards.go index 42f19ece..b7096756 100755 --- a/rules/cloud/policies/aws/iam/no_policy_wildcards.go +++ b/checks/cloud/aws/iam/no_policy_wildcards.go @@ -14,7 +14,7 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/defsec/pkg/providers" @@ -26,7 +26,7 @@ var ( cloudwatchLogStreamResourceRegex = regexp.MustCompile(`^arn:aws:logs:.*:.+:log-group:.+:\*`) ) -var CheckNoPolicyWildcards = rules.Register( +var CheckNoPolicyWildcards = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0057", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/iam/no_policy_wildcards.tf.go b/checks/cloud/aws/iam/no_policy_wildcards.tf.go similarity index 100% rename from rules/cloud/policies/aws/iam/no_policy_wildcards.tf.go rename to checks/cloud/aws/iam/no_policy_wildcards.tf.go diff --git a/rules/cloud/policies/aws/iam/no_policy_wildcards_test.go b/checks/cloud/aws/iam/no_policy_wildcards_test.go similarity index 100% rename from rules/cloud/policies/aws/iam/no_policy_wildcards_test.go rename to checks/cloud/aws/iam/no_policy_wildcards_test.go diff --git a/rules/cloud/policies/aws/iam/no_root_access_keys.go b/checks/cloud/aws/iam/no_root_access_keys.go similarity index 95% rename from rules/cloud/policies/aws/iam/no_root_access_keys.go rename to checks/cloud/aws/iam/no_root_access_keys.go index 3078c18d..afadb039 100644 --- a/rules/cloud/policies/aws/iam/no_root_access_keys.go +++ b/checks/cloud/aws/iam/no_root_access_keys.go @@ -9,12 +9,12 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/defsec/pkg/providers" ) -var checkNoRootAccessKeys = rules.Register( +var checkNoRootAccessKeys = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0141", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/iam/no_root_access_keys.tf.go b/checks/cloud/aws/iam/no_root_access_keys.tf.go similarity index 100% rename from rules/cloud/policies/aws/iam/no_root_access_keys.tf.go rename to checks/cloud/aws/iam/no_root_access_keys.tf.go diff --git a/rules/cloud/policies/aws/iam/no_root_access_keys_test.go b/checks/cloud/aws/iam/no_root_access_keys_test.go similarity index 100% rename from rules/cloud/policies/aws/iam/no_root_access_keys_test.go rename to checks/cloud/aws/iam/no_root_access_keys_test.go diff --git a/rules/cloud/policies/aws/iam/no_user_attached_policies.go b/checks/cloud/aws/iam/no_user_attached_policies.go similarity index 94% rename from rules/cloud/policies/aws/iam/no_user_attached_policies.go rename to checks/cloud/aws/iam/no_user_attached_policies.go index 0b8653ee..4bf189a9 100644 --- a/rules/cloud/policies/aws/iam/no_user_attached_policies.go +++ b/checks/cloud/aws/iam/no_user_attached_policies.go @@ -9,12 +9,12 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/defsec/pkg/providers" ) -var checkNoUserAttachedPolicies = rules.Register( +var checkNoUserAttachedPolicies = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0143", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/iam/no_user_attached_policies.tf.go b/checks/cloud/aws/iam/no_user_attached_policies.tf.go similarity index 100% rename from rules/cloud/policies/aws/iam/no_user_attached_policies.tf.go rename to checks/cloud/aws/iam/no_user_attached_policies.tf.go diff --git a/rules/cloud/policies/aws/iam/no_user_attached_policies_test.go b/checks/cloud/aws/iam/no_user_attached_policies_test.go similarity index 100% rename from rules/cloud/policies/aws/iam/no_user_attached_policies_test.go rename to checks/cloud/aws/iam/no_user_attached_policies_test.go diff --git a/rules/cloud/policies/aws/iam/remove_expired_certificates.go b/checks/cloud/aws/iam/remove_expired_certificates.go similarity index 92% rename from rules/cloud/policies/aws/iam/remove_expired_certificates.go rename to checks/cloud/aws/iam/remove_expired_certificates.go index 16211576..2344622f 100644 --- a/rules/cloud/policies/aws/iam/remove_expired_certificates.go +++ b/checks/cloud/aws/iam/remove_expired_certificates.go @@ -11,12 +11,12 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/defsec/pkg/providers" ) -var CheckRemoveExpiredCertificates = rules.Register( +var CheckRemoveExpiredCertificates = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0168", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/iam/remove_expired_certificates_test.go b/checks/cloud/aws/iam/remove_expired_certificates_test.go similarity index 100% rename from rules/cloud/policies/aws/iam/remove_expired_certificates_test.go rename to checks/cloud/aws/iam/remove_expired_certificates_test.go diff --git a/rules/cloud/policies/aws/iam/require_lowercase_in_passwords.go b/checks/cloud/aws/iam/require_lowercase_in_passwords.go similarity index 94% rename from rules/cloud/policies/aws/iam/require_lowercase_in_passwords.go rename to checks/cloud/aws/iam/require_lowercase_in_passwords.go index f4012f59..6e22102a 100755 --- a/rules/cloud/policies/aws/iam/require_lowercase_in_passwords.go +++ b/checks/cloud/aws/iam/require_lowercase_in_passwords.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckRequireLowercaseInPasswords = rules.Register( +var CheckRequireLowercaseInPasswords = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0058", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/iam/require_lowercase_in_passwords.tf.go b/checks/cloud/aws/iam/require_lowercase_in_passwords.tf.go similarity index 100% rename from rules/cloud/policies/aws/iam/require_lowercase_in_passwords.tf.go rename to checks/cloud/aws/iam/require_lowercase_in_passwords.tf.go diff --git a/rules/cloud/policies/aws/iam/require_lowercase_in_passwords_test.go b/checks/cloud/aws/iam/require_lowercase_in_passwords_test.go similarity index 100% rename from rules/cloud/policies/aws/iam/require_lowercase_in_passwords_test.go rename to checks/cloud/aws/iam/require_lowercase_in_passwords_test.go diff --git a/rules/cloud/policies/aws/iam/require_numbers_in_passwords.go b/checks/cloud/aws/iam/require_numbers_in_passwords.go similarity index 94% rename from rules/cloud/policies/aws/iam/require_numbers_in_passwords.go rename to checks/cloud/aws/iam/require_numbers_in_passwords.go index 3d9c346b..24259d51 100755 --- a/rules/cloud/policies/aws/iam/require_numbers_in_passwords.go +++ b/checks/cloud/aws/iam/require_numbers_in_passwords.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckRequireNumbersInPasswords = rules.Register( +var CheckRequireNumbersInPasswords = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0059", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/iam/require_numbers_in_passwords.tf.go b/checks/cloud/aws/iam/require_numbers_in_passwords.tf.go similarity index 100% rename from rules/cloud/policies/aws/iam/require_numbers_in_passwords.tf.go rename to checks/cloud/aws/iam/require_numbers_in_passwords.tf.go diff --git a/rules/cloud/policies/aws/iam/require_numbers_in_passwords_test.go b/checks/cloud/aws/iam/require_numbers_in_passwords_test.go similarity index 100% rename from rules/cloud/policies/aws/iam/require_numbers_in_passwords_test.go rename to checks/cloud/aws/iam/require_numbers_in_passwords_test.go diff --git a/rules/cloud/policies/aws/iam/require_support_role.go b/checks/cloud/aws/iam/require_support_role.go similarity index 93% rename from rules/cloud/policies/aws/iam/require_support_role.go rename to checks/cloud/aws/iam/require_support_role.go index bd34704a..f5e348a9 100644 --- a/rules/cloud/policies/aws/iam/require_support_role.go +++ b/checks/cloud/aws/iam/require_support_role.go @@ -10,12 +10,12 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/defsec/pkg/providers" ) -var CheckRequireSupportRole = rules.Register( +var CheckRequireSupportRole = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0169", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/iam/require_support_role_test.go b/checks/cloud/aws/iam/require_support_role_test.go similarity index 100% rename from rules/cloud/policies/aws/iam/require_support_role_test.go rename to checks/cloud/aws/iam/require_support_role_test.go diff --git a/rules/cloud/policies/aws/iam/require_symbols_in_passwords.go b/checks/cloud/aws/iam/require_symbols_in_passwords.go similarity index 94% rename from rules/cloud/policies/aws/iam/require_symbols_in_passwords.go rename to checks/cloud/aws/iam/require_symbols_in_passwords.go index ee875b39..3156dab2 100755 --- a/rules/cloud/policies/aws/iam/require_symbols_in_passwords.go +++ b/checks/cloud/aws/iam/require_symbols_in_passwords.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckRequireSymbolsInPasswords = rules.Register( +var CheckRequireSymbolsInPasswords = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0060", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/iam/require_symbols_in_passwords.tf.go b/checks/cloud/aws/iam/require_symbols_in_passwords.tf.go similarity index 100% rename from rules/cloud/policies/aws/iam/require_symbols_in_passwords.tf.go rename to checks/cloud/aws/iam/require_symbols_in_passwords.tf.go diff --git a/rules/cloud/policies/aws/iam/require_symbols_in_passwords_test.go b/checks/cloud/aws/iam/require_symbols_in_passwords_test.go similarity index 100% rename from rules/cloud/policies/aws/iam/require_symbols_in_passwords_test.go rename to checks/cloud/aws/iam/require_symbols_in_passwords_test.go diff --git a/rules/cloud/policies/aws/iam/require_uppercase_in_passwords.go b/checks/cloud/aws/iam/require_uppercase_in_passwords.go similarity index 94% rename from rules/cloud/policies/aws/iam/require_uppercase_in_passwords.go rename to checks/cloud/aws/iam/require_uppercase_in_passwords.go index 6d0797ae..e3e72211 100755 --- a/rules/cloud/policies/aws/iam/require_uppercase_in_passwords.go +++ b/checks/cloud/aws/iam/require_uppercase_in_passwords.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckRequireUppercaseInPasswords = rules.Register( +var CheckRequireUppercaseInPasswords = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0061", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/iam/require_uppercase_in_passwords.tf.go b/checks/cloud/aws/iam/require_uppercase_in_passwords.tf.go similarity index 100% rename from rules/cloud/policies/aws/iam/require_uppercase_in_passwords.tf.go rename to checks/cloud/aws/iam/require_uppercase_in_passwords.tf.go diff --git a/rules/cloud/policies/aws/iam/require_uppercase_in_passwords_test.go b/checks/cloud/aws/iam/require_uppercase_in_passwords_test.go similarity index 100% rename from rules/cloud/policies/aws/iam/require_uppercase_in_passwords_test.go rename to checks/cloud/aws/iam/require_uppercase_in_passwords_test.go diff --git a/rules/cloud/policies/aws/iam/rotate_access_keys.go b/checks/cloud/aws/iam/rotate_access_keys.go similarity index 94% rename from rules/cloud/policies/aws/iam/rotate_access_keys.go rename to checks/cloud/aws/iam/rotate_access_keys.go index bacb450c..d855f5d7 100644 --- a/rules/cloud/policies/aws/iam/rotate_access_keys.go +++ b/checks/cloud/aws/iam/rotate_access_keys.go @@ -12,12 +12,12 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/defsec/pkg/providers" ) -var CheckAccessKeysRotated = rules.Register( +var CheckAccessKeysRotated = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0146", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/iam/rotate_access_keys_test.go b/checks/cloud/aws/iam/rotate_access_keys_test.go similarity index 100% rename from rules/cloud/policies/aws/iam/rotate_access_keys_test.go rename to checks/cloud/aws/iam/rotate_access_keys_test.go diff --git a/rules/cloud/policies/aws/iam/set_max_password_age.go b/checks/cloud/aws/iam/set_max_password_age.go similarity index 94% rename from rules/cloud/policies/aws/iam/set_max_password_age.go rename to checks/cloud/aws/iam/set_max_password_age.go index 9a76be4d..ecdb3aab 100755 --- a/rules/cloud/policies/aws/iam/set_max_password_age.go +++ b/checks/cloud/aws/iam/set_max_password_age.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckSetMaxPasswordAge = rules.Register( +var CheckSetMaxPasswordAge = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0062", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/iam/set_max_password_age.tf.go b/checks/cloud/aws/iam/set_max_password_age.tf.go similarity index 100% rename from rules/cloud/policies/aws/iam/set_max_password_age.tf.go rename to checks/cloud/aws/iam/set_max_password_age.tf.go diff --git a/rules/cloud/policies/aws/iam/set_max_password_age_test.go b/checks/cloud/aws/iam/set_max_password_age_test.go similarity index 100% rename from rules/cloud/policies/aws/iam/set_max_password_age_test.go rename to checks/cloud/aws/iam/set_max_password_age_test.go diff --git a/rules/cloud/policies/aws/iam/set_minimum_password_length.go b/checks/cloud/aws/iam/set_minimum_password_length.go similarity index 94% rename from rules/cloud/policies/aws/iam/set_minimum_password_length.go rename to checks/cloud/aws/iam/set_minimum_password_length.go index 8725ded2..b95e5425 100755 --- a/rules/cloud/policies/aws/iam/set_minimum_password_length.go +++ b/checks/cloud/aws/iam/set_minimum_password_length.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckSetMinimumPasswordLength = rules.Register( +var CheckSetMinimumPasswordLength = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0063", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/iam/set_minimum_password_length.tf.go b/checks/cloud/aws/iam/set_minimum_password_length.tf.go similarity index 100% rename from rules/cloud/policies/aws/iam/set_minimum_password_length.tf.go rename to checks/cloud/aws/iam/set_minimum_password_length.tf.go diff --git a/rules/cloud/policies/aws/iam/set_minimum_password_length_test.go b/checks/cloud/aws/iam/set_minimum_password_length_test.go similarity index 100% rename from rules/cloud/policies/aws/iam/set_minimum_password_length_test.go rename to checks/cloud/aws/iam/set_minimum_password_length_test.go diff --git a/rules/cloud/policies/aws/kinesis/enable_in_transit_encryption.cf.go b/checks/cloud/aws/kinesis/enable_in_transit_encryption.cf.go similarity index 100% rename from rules/cloud/policies/aws/kinesis/enable_in_transit_encryption.cf.go rename to checks/cloud/aws/kinesis/enable_in_transit_encryption.cf.go diff --git a/rules/cloud/policies/aws/kinesis/enable_in_transit_encryption.go b/checks/cloud/aws/kinesis/enable_in_transit_encryption.go similarity index 95% rename from rules/cloud/policies/aws/kinesis/enable_in_transit_encryption.go rename to checks/cloud/aws/kinesis/enable_in_transit_encryption.go index aef501cb..a9c359ba 100755 --- a/rules/cloud/policies/aws/kinesis/enable_in_transit_encryption.go +++ b/checks/cloud/aws/kinesis/enable_in_transit_encryption.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableInTransitEncryption = rules.Register( +var CheckEnableInTransitEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0064", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/kinesis/enable_in_transit_encryption.tf.go b/checks/cloud/aws/kinesis/enable_in_transit_encryption.tf.go similarity index 100% rename from rules/cloud/policies/aws/kinesis/enable_in_transit_encryption.tf.go rename to checks/cloud/aws/kinesis/enable_in_transit_encryption.tf.go diff --git a/rules/cloud/policies/aws/kinesis/enable_in_transit_encryption_test.go b/checks/cloud/aws/kinesis/enable_in_transit_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/kinesis/enable_in_transit_encryption_test.go rename to checks/cloud/aws/kinesis/enable_in_transit_encryption_test.go diff --git a/rules/cloud/policies/aws/kms/auto_rotate_keys.go b/checks/cloud/aws/kms/auto_rotate_keys.go similarity index 93% rename from rules/cloud/policies/aws/kms/auto_rotate_keys.go rename to checks/cloud/aws/kms/auto_rotate_keys.go index 38a6b597..ffd5720f 100755 --- a/rules/cloud/policies/aws/kms/auto_rotate_keys.go +++ b/checks/cloud/aws/kms/auto_rotate_keys.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckAutoRotateKeys = rules.Register( +var CheckAutoRotateKeys = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0065", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/kms/auto_rotate_keys.tf.go b/checks/cloud/aws/kms/auto_rotate_keys.tf.go similarity index 100% rename from rules/cloud/policies/aws/kms/auto_rotate_keys.tf.go rename to checks/cloud/aws/kms/auto_rotate_keys.tf.go diff --git a/rules/cloud/policies/aws/kms/auto_rotate_keys_test.go b/checks/cloud/aws/kms/auto_rotate_keys_test.go similarity index 100% rename from rules/cloud/policies/aws/kms/auto_rotate_keys_test.go rename to checks/cloud/aws/kms/auto_rotate_keys_test.go diff --git a/rules/cloud/policies/aws/lambda/enable_tracing.cf.go b/checks/cloud/aws/lambda/enable_tracing.cf.go similarity index 100% rename from rules/cloud/policies/aws/lambda/enable_tracing.cf.go rename to checks/cloud/aws/lambda/enable_tracing.cf.go diff --git a/rules/cloud/policies/aws/lambda/enable_tracing.go b/checks/cloud/aws/lambda/enable_tracing.go similarity index 95% rename from rules/cloud/policies/aws/lambda/enable_tracing.go rename to checks/cloud/aws/lambda/enable_tracing.go index 0c441fbe..7268fd0d 100755 --- a/rules/cloud/policies/aws/lambda/enable_tracing.go +++ b/checks/cloud/aws/lambda/enable_tracing.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableTracing = rules.Register( +var CheckEnableTracing = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0066", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/lambda/enable_tracing.tf.go b/checks/cloud/aws/lambda/enable_tracing.tf.go similarity index 100% rename from rules/cloud/policies/aws/lambda/enable_tracing.tf.go rename to checks/cloud/aws/lambda/enable_tracing.tf.go diff --git a/rules/cloud/policies/aws/lambda/enable_tracing_test.go b/checks/cloud/aws/lambda/enable_tracing_test.go similarity index 100% rename from rules/cloud/policies/aws/lambda/enable_tracing_test.go rename to checks/cloud/aws/lambda/enable_tracing_test.go diff --git a/rules/cloud/policies/aws/lambda/restrict_source_arn.cf.go b/checks/cloud/aws/lambda/restrict_source_arn.cf.go similarity index 100% rename from rules/cloud/policies/aws/lambda/restrict_source_arn.cf.go rename to checks/cloud/aws/lambda/restrict_source_arn.cf.go diff --git a/rules/cloud/policies/aws/lambda/restrict_source_arn.go b/checks/cloud/aws/lambda/restrict_source_arn.go similarity index 95% rename from rules/cloud/policies/aws/lambda/restrict_source_arn.go rename to checks/cloud/aws/lambda/restrict_source_arn.go index 8264cca9..469f8c0f 100755 --- a/rules/cloud/policies/aws/lambda/restrict_source_arn.go +++ b/checks/cloud/aws/lambda/restrict_source_arn.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckRestrictSourceArn = rules.Register( +var CheckRestrictSourceArn = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0067", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/lambda/restrict_source_arn.tf.go b/checks/cloud/aws/lambda/restrict_source_arn.tf.go similarity index 100% rename from rules/cloud/policies/aws/lambda/restrict_source_arn.tf.go rename to checks/cloud/aws/lambda/restrict_source_arn.tf.go diff --git a/rules/cloud/policies/aws/lambda/restrict_source_arn_test.go b/checks/cloud/aws/lambda/restrict_source_arn_test.go similarity index 100% rename from rules/cloud/policies/aws/lambda/restrict_source_arn_test.go rename to checks/cloud/aws/lambda/restrict_source_arn_test.go diff --git a/rules/cloud/policies/aws/mq/enable_audit_logging.cf.go b/checks/cloud/aws/mq/enable_audit_logging.cf.go similarity index 100% rename from rules/cloud/policies/aws/mq/enable_audit_logging.cf.go rename to checks/cloud/aws/mq/enable_audit_logging.cf.go diff --git a/rules/cloud/policies/aws/mq/enable_audit_logging.go b/checks/cloud/aws/mq/enable_audit_logging.go similarity index 94% rename from rules/cloud/policies/aws/mq/enable_audit_logging.go rename to checks/cloud/aws/mq/enable_audit_logging.go index f1dd95dc..bda2929d 100755 --- a/rules/cloud/policies/aws/mq/enable_audit_logging.go +++ b/checks/cloud/aws/mq/enable_audit_logging.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableAuditLogging = rules.Register( +var CheckEnableAuditLogging = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0070", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/mq/enable_audit_logging.tf.go b/checks/cloud/aws/mq/enable_audit_logging.tf.go similarity index 100% rename from rules/cloud/policies/aws/mq/enable_audit_logging.tf.go rename to checks/cloud/aws/mq/enable_audit_logging.tf.go diff --git a/rules/cloud/policies/aws/mq/enable_audit_logging_test.go b/checks/cloud/aws/mq/enable_audit_logging_test.go similarity index 100% rename from rules/cloud/policies/aws/mq/enable_audit_logging_test.go rename to checks/cloud/aws/mq/enable_audit_logging_test.go diff --git a/rules/cloud/policies/aws/mq/enable_general_logging.cf.go b/checks/cloud/aws/mq/enable_general_logging.cf.go similarity index 100% rename from rules/cloud/policies/aws/mq/enable_general_logging.cf.go rename to checks/cloud/aws/mq/enable_general_logging.cf.go diff --git a/rules/cloud/policies/aws/mq/enable_general_logging.go b/checks/cloud/aws/mq/enable_general_logging.go similarity index 94% rename from rules/cloud/policies/aws/mq/enable_general_logging.go rename to checks/cloud/aws/mq/enable_general_logging.go index 87b96e53..ee046484 100755 --- a/rules/cloud/policies/aws/mq/enable_general_logging.go +++ b/checks/cloud/aws/mq/enable_general_logging.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableGeneralLogging = rules.Register( +var CheckEnableGeneralLogging = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0071", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/mq/enable_general_logging.tf.go b/checks/cloud/aws/mq/enable_general_logging.tf.go similarity index 100% rename from rules/cloud/policies/aws/mq/enable_general_logging.tf.go rename to checks/cloud/aws/mq/enable_general_logging.tf.go diff --git a/rules/cloud/policies/aws/mq/enable_general_logging_test.go b/checks/cloud/aws/mq/enable_general_logging_test.go similarity index 100% rename from rules/cloud/policies/aws/mq/enable_general_logging_test.go rename to checks/cloud/aws/mq/enable_general_logging_test.go diff --git a/rules/cloud/policies/aws/mq/no_public_access.cf.go b/checks/cloud/aws/mq/no_public_access.cf.go similarity index 100% rename from rules/cloud/policies/aws/mq/no_public_access.cf.go rename to checks/cloud/aws/mq/no_public_access.cf.go diff --git a/rules/cloud/policies/aws/mq/no_public_access.go b/checks/cloud/aws/mq/no_public_access.go similarity index 94% rename from rules/cloud/policies/aws/mq/no_public_access.go rename to checks/cloud/aws/mq/no_public_access.go index f2c45af2..93e3f6e6 100755 --- a/rules/cloud/policies/aws/mq/no_public_access.go +++ b/checks/cloud/aws/mq/no_public_access.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicAccess = rules.Register( +var CheckNoPublicAccess = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0072", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/mq/no_public_access.tf.go b/checks/cloud/aws/mq/no_public_access.tf.go similarity index 100% rename from rules/cloud/policies/aws/mq/no_public_access.tf.go rename to checks/cloud/aws/mq/no_public_access.tf.go diff --git a/rules/cloud/policies/aws/mq/no_public_access_test.go b/checks/cloud/aws/mq/no_public_access_test.go similarity index 100% rename from rules/cloud/policies/aws/mq/no_public_access_test.go rename to checks/cloud/aws/mq/no_public_access_test.go diff --git a/rules/cloud/policies/aws/msk/enable_at_rest_encryption.cf.go b/checks/cloud/aws/msk/enable_at_rest_encryption.cf.go similarity index 100% rename from rules/cloud/policies/aws/msk/enable_at_rest_encryption.cf.go rename to checks/cloud/aws/msk/enable_at_rest_encryption.cf.go diff --git a/rules/cloud/policies/aws/msk/enable_at_rest_encryption.go b/checks/cloud/aws/msk/enable_at_rest_encryption.go similarity index 94% rename from rules/cloud/policies/aws/msk/enable_at_rest_encryption.go rename to checks/cloud/aws/msk/enable_at_rest_encryption.go index 2e100b22..fbe6aa25 100644 --- a/rules/cloud/policies/aws/msk/enable_at_rest_encryption.go +++ b/checks/cloud/aws/msk/enable_at_rest_encryption.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableAtRestEncryption = rules.Register( +var CheckEnableAtRestEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0179", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/msk/enable_at_rest_encryption.tf.go b/checks/cloud/aws/msk/enable_at_rest_encryption.tf.go similarity index 100% rename from rules/cloud/policies/aws/msk/enable_at_rest_encryption.tf.go rename to checks/cloud/aws/msk/enable_at_rest_encryption.tf.go diff --git a/rules/cloud/policies/aws/msk/enable_at_rest_encryption_test.go b/checks/cloud/aws/msk/enable_at_rest_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/msk/enable_at_rest_encryption_test.go rename to checks/cloud/aws/msk/enable_at_rest_encryption_test.go diff --git a/rules/cloud/policies/aws/msk/enable_in_transit_encryption.cf.go b/checks/cloud/aws/msk/enable_in_transit_encryption.cf.go similarity index 100% rename from rules/cloud/policies/aws/msk/enable_in_transit_encryption.cf.go rename to checks/cloud/aws/msk/enable_in_transit_encryption.cf.go diff --git a/rules/cloud/policies/aws/msk/enable_in_transit_encryption.go b/checks/cloud/aws/msk/enable_in_transit_encryption.go similarity index 95% rename from rules/cloud/policies/aws/msk/enable_in_transit_encryption.go rename to checks/cloud/aws/msk/enable_in_transit_encryption.go index 3931940b..ee4445f1 100755 --- a/rules/cloud/policies/aws/msk/enable_in_transit_encryption.go +++ b/checks/cloud/aws/msk/enable_in_transit_encryption.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableInTransitEncryption = rules.Register( +var CheckEnableInTransitEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0073", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/msk/enable_in_transit_encryption.tf.go b/checks/cloud/aws/msk/enable_in_transit_encryption.tf.go similarity index 100% rename from rules/cloud/policies/aws/msk/enable_in_transit_encryption.tf.go rename to checks/cloud/aws/msk/enable_in_transit_encryption.tf.go diff --git a/rules/cloud/policies/aws/msk/enable_in_transit_encryption_test.go b/checks/cloud/aws/msk/enable_in_transit_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/msk/enable_in_transit_encryption_test.go rename to checks/cloud/aws/msk/enable_in_transit_encryption_test.go diff --git a/rules/cloud/policies/aws/msk/enable_logging.cf.go b/checks/cloud/aws/msk/enable_logging.cf.go similarity index 100% rename from rules/cloud/policies/aws/msk/enable_logging.cf.go rename to checks/cloud/aws/msk/enable_logging.cf.go diff --git a/rules/cloud/policies/aws/msk/enable_logging.go b/checks/cloud/aws/msk/enable_logging.go similarity index 95% rename from rules/cloud/policies/aws/msk/enable_logging.go rename to checks/cloud/aws/msk/enable_logging.go index eafea77d..a0b42bd0 100755 --- a/rules/cloud/policies/aws/msk/enable_logging.go +++ b/checks/cloud/aws/msk/enable_logging.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableLogging = rules.Register( +var CheckEnableLogging = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0074", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/msk/enable_logging.tf.go b/checks/cloud/aws/msk/enable_logging.tf.go similarity index 100% rename from rules/cloud/policies/aws/msk/enable_logging.tf.go rename to checks/cloud/aws/msk/enable_logging.tf.go diff --git a/rules/cloud/policies/aws/msk/enable_logging_test.go b/checks/cloud/aws/msk/enable_logging_test.go similarity index 100% rename from rules/cloud/policies/aws/msk/enable_logging_test.go rename to checks/cloud/aws/msk/enable_logging_test.go diff --git a/rules/cloud/policies/aws/neptune/enable_log_export.cf.go b/checks/cloud/aws/neptune/enable_log_export.cf.go similarity index 100% rename from rules/cloud/policies/aws/neptune/enable_log_export.cf.go rename to checks/cloud/aws/neptune/enable_log_export.cf.go diff --git a/rules/cloud/policies/aws/neptune/enable_log_export.go b/checks/cloud/aws/neptune/enable_log_export.go similarity index 94% rename from rules/cloud/policies/aws/neptune/enable_log_export.go rename to checks/cloud/aws/neptune/enable_log_export.go index fad2bec8..0514c23f 100755 --- a/rules/cloud/policies/aws/neptune/enable_log_export.go +++ b/checks/cloud/aws/neptune/enable_log_export.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableLogExport = rules.Register( +var CheckEnableLogExport = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0075", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/neptune/enable_log_export.tf.go b/checks/cloud/aws/neptune/enable_log_export.tf.go similarity index 100% rename from rules/cloud/policies/aws/neptune/enable_log_export.tf.go rename to checks/cloud/aws/neptune/enable_log_export.tf.go diff --git a/rules/cloud/policies/aws/neptune/enable_log_export_test.go b/checks/cloud/aws/neptune/enable_log_export_test.go similarity index 100% rename from rules/cloud/policies/aws/neptune/enable_log_export_test.go rename to checks/cloud/aws/neptune/enable_log_export_test.go diff --git a/rules/cloud/policies/aws/neptune/enable_storage_encryption.cf.go b/checks/cloud/aws/neptune/enable_storage_encryption.cf.go similarity index 100% rename from rules/cloud/policies/aws/neptune/enable_storage_encryption.cf.go rename to checks/cloud/aws/neptune/enable_storage_encryption.cf.go diff --git a/rules/cloud/policies/aws/neptune/enable_storage_encryption.go b/checks/cloud/aws/neptune/enable_storage_encryption.go similarity index 94% rename from rules/cloud/policies/aws/neptune/enable_storage_encryption.go rename to checks/cloud/aws/neptune/enable_storage_encryption.go index 7f0c1101..95a73531 100755 --- a/rules/cloud/policies/aws/neptune/enable_storage_encryption.go +++ b/checks/cloud/aws/neptune/enable_storage_encryption.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableStorageEncryption = rules.Register( +var CheckEnableStorageEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0076", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/neptune/enable_storage_encryption.tf.go b/checks/cloud/aws/neptune/enable_storage_encryption.tf.go similarity index 100% rename from rules/cloud/policies/aws/neptune/enable_storage_encryption.tf.go rename to checks/cloud/aws/neptune/enable_storage_encryption.tf.go diff --git a/rules/cloud/policies/aws/neptune/enable_storage_encryption_test.go b/checks/cloud/aws/neptune/enable_storage_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/neptune/enable_storage_encryption_test.go rename to checks/cloud/aws/neptune/enable_storage_encryption_test.go diff --git a/rules/cloud/policies/aws/neptune/encryption_customer_key.cf.go b/checks/cloud/aws/neptune/encryption_customer_key.cf.go similarity index 100% rename from rules/cloud/policies/aws/neptune/encryption_customer_key.cf.go rename to checks/cloud/aws/neptune/encryption_customer_key.cf.go diff --git a/rules/cloud/policies/aws/neptune/encryption_customer_key.go b/checks/cloud/aws/neptune/encryption_customer_key.go similarity index 94% rename from rules/cloud/policies/aws/neptune/encryption_customer_key.go rename to checks/cloud/aws/neptune/encryption_customer_key.go index e60ada91..16eea788 100755 --- a/rules/cloud/policies/aws/neptune/encryption_customer_key.go +++ b/checks/cloud/aws/neptune/encryption_customer_key.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEncryptionCustomerKey = rules.Register( +var CheckEncryptionCustomerKey = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0128", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/neptune/encryption_customer_key.tf.go b/checks/cloud/aws/neptune/encryption_customer_key.tf.go similarity index 100% rename from rules/cloud/policies/aws/neptune/encryption_customer_key.tf.go rename to checks/cloud/aws/neptune/encryption_customer_key.tf.go diff --git a/rules/cloud/policies/aws/neptune/encryption_customer_key_test.go b/checks/cloud/aws/neptune/encryption_customer_key_test.go similarity index 100% rename from rules/cloud/policies/aws/neptune/encryption_customer_key_test.go rename to checks/cloud/aws/neptune/encryption_customer_key_test.go diff --git a/rules/cloud/policies/aws/rds/disable_public_access.cf.go b/checks/cloud/aws/rds/disable_public_access.cf.go similarity index 100% rename from rules/cloud/policies/aws/rds/disable_public_access.cf.go rename to checks/cloud/aws/rds/disable_public_access.cf.go diff --git a/rules/cloud/policies/aws/rds/disable_public_access.rego b/checks/cloud/aws/rds/disable_public_access.rego similarity index 100% rename from rules/cloud/policies/aws/rds/disable_public_access.rego rename to checks/cloud/aws/rds/disable_public_access.rego diff --git a/rules/cloud/policies/aws/rds/disable_public_access.tf.go b/checks/cloud/aws/rds/disable_public_access.tf.go similarity index 100% rename from rules/cloud/policies/aws/rds/disable_public_access.tf.go rename to checks/cloud/aws/rds/disable_public_access.tf.go diff --git a/rules/cloud/policies/aws/rds/disable_public_access_test.rego b/checks/cloud/aws/rds/disable_public_access_test.rego similarity index 100% rename from rules/cloud/policies/aws/rds/disable_public_access_test.rego rename to checks/cloud/aws/rds/disable_public_access_test.rego diff --git a/rules/cloud/policies/aws/rds/enable_cluster_deletion_protection.rego b/checks/cloud/aws/rds/enable_cluster_deletion_protection.rego similarity index 100% rename from rules/cloud/policies/aws/rds/enable_cluster_deletion_protection.rego rename to checks/cloud/aws/rds/enable_cluster_deletion_protection.rego diff --git a/rules/cloud/policies/aws/rds/enable_cluster_deletion_protection_test.rego b/checks/cloud/aws/rds/enable_cluster_deletion_protection_test.rego similarity index 100% rename from rules/cloud/policies/aws/rds/enable_cluster_deletion_protection_test.rego rename to checks/cloud/aws/rds/enable_cluster_deletion_protection_test.rego diff --git a/rules/cloud/policies/aws/rds/enable_deletion_protection.rego b/checks/cloud/aws/rds/enable_deletion_protection.rego similarity index 100% rename from rules/cloud/policies/aws/rds/enable_deletion_protection.rego rename to checks/cloud/aws/rds/enable_deletion_protection.rego diff --git a/rules/cloud/policies/aws/rds/enable_deletion_protection_test.rego b/checks/cloud/aws/rds/enable_deletion_protection_test.rego similarity index 100% rename from rules/cloud/policies/aws/rds/enable_deletion_protection_test.rego rename to checks/cloud/aws/rds/enable_deletion_protection_test.rego diff --git a/rules/cloud/policies/aws/rds/enable_iam_auth.rego b/checks/cloud/aws/rds/enable_iam_auth.rego similarity index 100% rename from rules/cloud/policies/aws/rds/enable_iam_auth.rego rename to checks/cloud/aws/rds/enable_iam_auth.rego diff --git a/rules/cloud/policies/aws/rds/enable_iam_auth_test.rego b/checks/cloud/aws/rds/enable_iam_auth_test.rego similarity index 100% rename from rules/cloud/policies/aws/rds/enable_iam_auth_test.rego rename to checks/cloud/aws/rds/enable_iam_auth_test.rego diff --git a/rules/cloud/policies/aws/rds/enable_performance_insights.cf.go b/checks/cloud/aws/rds/enable_performance_insights.cf.go similarity index 100% rename from rules/cloud/policies/aws/rds/enable_performance_insights.cf.go rename to checks/cloud/aws/rds/enable_performance_insights.cf.go diff --git a/rules/cloud/policies/aws/rds/enable_performance_insights.go b/checks/cloud/aws/rds/enable_performance_insights.go similarity index 95% rename from rules/cloud/policies/aws/rds/enable_performance_insights.go rename to checks/cloud/aws/rds/enable_performance_insights.go index 1a2eb4fa..5529ebe9 100755 --- a/rules/cloud/policies/aws/rds/enable_performance_insights.go +++ b/checks/cloud/aws/rds/enable_performance_insights.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnablePerformanceInsights = rules.Register( +var CheckEnablePerformanceInsights = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0133", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/rds/enable_performance_insights.tf.go b/checks/cloud/aws/rds/enable_performance_insights.tf.go similarity index 100% rename from rules/cloud/policies/aws/rds/enable_performance_insights.tf.go rename to checks/cloud/aws/rds/enable_performance_insights.tf.go diff --git a/rules/cloud/policies/aws/rds/enable_performance_insights_test.go b/checks/cloud/aws/rds/enable_performance_insights_test.go similarity index 100% rename from rules/cloud/policies/aws/rds/enable_performance_insights_test.go rename to checks/cloud/aws/rds/enable_performance_insights_test.go diff --git a/rules/cloud/policies/aws/rds/encrypt_cluster_storage_data.cf.go b/checks/cloud/aws/rds/encrypt_cluster_storage_data.cf.go similarity index 100% rename from rules/cloud/policies/aws/rds/encrypt_cluster_storage_data.cf.go rename to checks/cloud/aws/rds/encrypt_cluster_storage_data.cf.go diff --git a/rules/cloud/policies/aws/rds/encrypt_cluster_storage_data.go b/checks/cloud/aws/rds/encrypt_cluster_storage_data.go similarity index 95% rename from rules/cloud/policies/aws/rds/encrypt_cluster_storage_data.go rename to checks/cloud/aws/rds/encrypt_cluster_storage_data.go index c29e6e0c..6c6112ed 100755 --- a/rules/cloud/policies/aws/rds/encrypt_cluster_storage_data.go +++ b/checks/cloud/aws/rds/encrypt_cluster_storage_data.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEncryptClusterStorageData = rules.Register( +var CheckEncryptClusterStorageData = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0079", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/rds/encrypt_cluster_storage_data.tf.go b/checks/cloud/aws/rds/encrypt_cluster_storage_data.tf.go similarity index 100% rename from rules/cloud/policies/aws/rds/encrypt_cluster_storage_data.tf.go rename to checks/cloud/aws/rds/encrypt_cluster_storage_data.tf.go diff --git a/rules/cloud/policies/aws/rds/encrypt_cluster_storage_data_test.go b/checks/cloud/aws/rds/encrypt_cluster_storage_data_test.go similarity index 100% rename from rules/cloud/policies/aws/rds/encrypt_cluster_storage_data_test.go rename to checks/cloud/aws/rds/encrypt_cluster_storage_data_test.go diff --git a/rules/cloud/policies/aws/rds/encrypt_instance_storage_data.cf.go b/checks/cloud/aws/rds/encrypt_instance_storage_data.cf.go similarity index 100% rename from rules/cloud/policies/aws/rds/encrypt_instance_storage_data.cf.go rename to checks/cloud/aws/rds/encrypt_instance_storage_data.cf.go diff --git a/rules/cloud/policies/aws/rds/encrypt_instance_storage_data.go b/checks/cloud/aws/rds/encrypt_instance_storage_data.go similarity index 94% rename from rules/cloud/policies/aws/rds/encrypt_instance_storage_data.go rename to checks/cloud/aws/rds/encrypt_instance_storage_data.go index f802296e..d799ba52 100755 --- a/rules/cloud/policies/aws/rds/encrypt_instance_storage_data.go +++ b/checks/cloud/aws/rds/encrypt_instance_storage_data.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEncryptInstanceStorageData = rules.Register( +var CheckEncryptInstanceStorageData = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0080", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/rds/encrypt_instance_storage_data.tf.go b/checks/cloud/aws/rds/encrypt_instance_storage_data.tf.go similarity index 100% rename from rules/cloud/policies/aws/rds/encrypt_instance_storage_data.tf.go rename to checks/cloud/aws/rds/encrypt_instance_storage_data.tf.go diff --git a/rules/cloud/policies/aws/rds/encrypt_instance_storage_data_test.go b/checks/cloud/aws/rds/encrypt_instance_storage_data_test.go similarity index 100% rename from rules/cloud/policies/aws/rds/encrypt_instance_storage_data_test.go rename to checks/cloud/aws/rds/encrypt_instance_storage_data_test.go diff --git a/rules/cloud/policies/aws/rds/no_classic_resources.cf.go b/checks/cloud/aws/rds/no_classic_resources.cf.go similarity index 100% rename from rules/cloud/policies/aws/rds/no_classic_resources.cf.go rename to checks/cloud/aws/rds/no_classic_resources.cf.go diff --git a/rules/cloud/policies/aws/rds/no_classic_resources.go b/checks/cloud/aws/rds/no_classic_resources.go similarity index 94% rename from rules/cloud/policies/aws/rds/no_classic_resources.go rename to checks/cloud/aws/rds/no_classic_resources.go index c1ad72bc..1aced15e 100755 --- a/rules/cloud/policies/aws/rds/no_classic_resources.go +++ b/checks/cloud/aws/rds/no_classic_resources.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoClassicResources = rules.Register( +var CheckNoClassicResources = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0081", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/rds/no_classic_resources.tf.go b/checks/cloud/aws/rds/no_classic_resources.tf.go similarity index 100% rename from rules/cloud/policies/aws/rds/no_classic_resources.tf.go rename to checks/cloud/aws/rds/no_classic_resources.tf.go diff --git a/rules/cloud/policies/aws/rds/no_classic_resources_test.go b/checks/cloud/aws/rds/no_classic_resources_test.go similarity index 100% rename from rules/cloud/policies/aws/rds/no_classic_resources_test.go rename to checks/cloud/aws/rds/no_classic_resources_test.go diff --git a/rules/cloud/policies/aws/rds/performance_insights_encryption_customer_key.cf.go b/checks/cloud/aws/rds/performance_insights_encryption_customer_key.cf.go similarity index 100% rename from rules/cloud/policies/aws/rds/performance_insights_encryption_customer_key.cf.go rename to checks/cloud/aws/rds/performance_insights_encryption_customer_key.cf.go diff --git a/rules/cloud/policies/aws/rds/performance_insights_encryption_customer_key.go b/checks/cloud/aws/rds/performance_insights_encryption_customer_key.go similarity index 95% rename from rules/cloud/policies/aws/rds/performance_insights_encryption_customer_key.go rename to checks/cloud/aws/rds/performance_insights_encryption_customer_key.go index be24e035..61fdb45d 100755 --- a/rules/cloud/policies/aws/rds/performance_insights_encryption_customer_key.go +++ b/checks/cloud/aws/rds/performance_insights_encryption_customer_key.go @@ -9,10 +9,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckPerformanceInsightsEncryptionCustomerKey = rules.Register( +var CheckPerformanceInsightsEncryptionCustomerKey = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0078", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/rds/performance_insights_encryption_customer_key.tf.go b/checks/cloud/aws/rds/performance_insights_encryption_customer_key.tf.go similarity index 100% rename from rules/cloud/policies/aws/rds/performance_insights_encryption_customer_key.tf.go rename to checks/cloud/aws/rds/performance_insights_encryption_customer_key.tf.go diff --git a/rules/cloud/policies/aws/rds/performance_insights_encryption_customer_key_test.go b/checks/cloud/aws/rds/performance_insights_encryption_customer_key_test.go similarity index 100% rename from rules/cloud/policies/aws/rds/performance_insights_encryption_customer_key_test.go rename to checks/cloud/aws/rds/performance_insights_encryption_customer_key_test.go diff --git a/rules/cloud/policies/aws/rds/specify_backup_retention.cf.go b/checks/cloud/aws/rds/specify_backup_retention.cf.go similarity index 100% rename from rules/cloud/policies/aws/rds/specify_backup_retention.cf.go rename to checks/cloud/aws/rds/specify_backup_retention.cf.go diff --git a/rules/cloud/policies/aws/rds/specify_backup_retention.go b/checks/cloud/aws/rds/specify_backup_retention.go similarity index 96% rename from rules/cloud/policies/aws/rds/specify_backup_retention.go rename to checks/cloud/aws/rds/specify_backup_retention.go index 953da161..0733b8bf 100755 --- a/rules/cloud/policies/aws/rds/specify_backup_retention.go +++ b/checks/cloud/aws/rds/specify_backup_retention.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckBackupRetentionSpecified = rules.Register( +var CheckBackupRetentionSpecified = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0077", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/rds/specify_backup_retention.tf.go b/checks/cloud/aws/rds/specify_backup_retention.tf.go similarity index 100% rename from rules/cloud/policies/aws/rds/specify_backup_retention.tf.go rename to checks/cloud/aws/rds/specify_backup_retention.tf.go diff --git a/rules/cloud/policies/aws/rds/specify_backup_retention_test.go b/checks/cloud/aws/rds/specify_backup_retention_test.go similarity index 100% rename from rules/cloud/policies/aws/rds/specify_backup_retention_test.go rename to checks/cloud/aws/rds/specify_backup_retention_test.go diff --git a/rules/cloud/policies/aws/redshift/add_description_to_security_group.cf.go b/checks/cloud/aws/redshift/add_description_to_security_group.cf.go similarity index 100% rename from rules/cloud/policies/aws/redshift/add_description_to_security_group.cf.go rename to checks/cloud/aws/redshift/add_description_to_security_group.cf.go diff --git a/rules/cloud/policies/aws/redshift/add_description_to_security_group.go b/checks/cloud/aws/redshift/add_description_to_security_group.go similarity index 82% rename from rules/cloud/policies/aws/redshift/add_description_to_security_group.go rename to checks/cloud/aws/redshift/add_description_to_security_group.go index 8b6c1905..12b1524a 100755 --- a/rules/cloud/policies/aws/redshift/add_description_to_security_group.go +++ b/checks/cloud/aws/redshift/add_description_to_security_group.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckAddDescriptionToSecurityGroup = rules.Register( +var CheckAddDescriptionToSecurityGroup = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0083", Provider: providers.AWSProvider, @@ -16,8 +16,8 @@ var CheckAddDescriptionToSecurityGroup = rules.Register( ShortCode: "add-description-to-security-group", Summary: "Missing description for security group/security group rule.", Impact: "Descriptions provide context for the firewall rule reasons", - Resolution: "Add descriptions for all security groups and rules", - Explanation: `Security groups and security group rules should include a description for auditing purposes. + Resolution: "Add descriptions for all security groups and checks", + Explanation: `Security groups and security group checks should include a description for auditing purposes. Simplifies auditing, debugging, and managing security groups.`, Links: []string{ diff --git a/rules/cloud/policies/aws/redshift/add_description_to_security_group_test.go b/checks/cloud/aws/redshift/add_description_to_security_group_test.go similarity index 100% rename from rules/cloud/policies/aws/redshift/add_description_to_security_group_test.go rename to checks/cloud/aws/redshift/add_description_to_security_group_test.go diff --git a/rules/cloud/policies/aws/redshift/encryption_customer_key.cf.go b/checks/cloud/aws/redshift/encryption_customer_key.cf.go similarity index 100% rename from rules/cloud/policies/aws/redshift/encryption_customer_key.cf.go rename to checks/cloud/aws/redshift/encryption_customer_key.cf.go diff --git a/rules/cloud/policies/aws/redshift/encryption_customer_key.go b/checks/cloud/aws/redshift/encryption_customer_key.go similarity index 95% rename from rules/cloud/policies/aws/redshift/encryption_customer_key.go rename to checks/cloud/aws/redshift/encryption_customer_key.go index 42efe722..a1e1be57 100755 --- a/rules/cloud/policies/aws/redshift/encryption_customer_key.go +++ b/checks/cloud/aws/redshift/encryption_customer_key.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEncryptionCustomerKey = rules.Register( +var CheckEncryptionCustomerKey = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0084", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/redshift/encryption_customer_key.tf.go b/checks/cloud/aws/redshift/encryption_customer_key.tf.go similarity index 100% rename from rules/cloud/policies/aws/redshift/encryption_customer_key.tf.go rename to checks/cloud/aws/redshift/encryption_customer_key.tf.go diff --git a/rules/cloud/policies/aws/redshift/encryption_customer_key_test.go b/checks/cloud/aws/redshift/encryption_customer_key_test.go similarity index 100% rename from rules/cloud/policies/aws/redshift/encryption_customer_key_test.go rename to checks/cloud/aws/redshift/encryption_customer_key_test.go diff --git a/rules/cloud/policies/aws/redshift/no_classic_resources.cf.go b/checks/cloud/aws/redshift/no_classic_resources.cf.go similarity index 100% rename from rules/cloud/policies/aws/redshift/no_classic_resources.cf.go rename to checks/cloud/aws/redshift/no_classic_resources.cf.go diff --git a/rules/cloud/policies/aws/redshift/no_classic_resources.go b/checks/cloud/aws/redshift/no_classic_resources.go similarity index 93% rename from rules/cloud/policies/aws/redshift/no_classic_resources.go rename to checks/cloud/aws/redshift/no_classic_resources.go index 822b2753..0548cb65 100755 --- a/rules/cloud/policies/aws/redshift/no_classic_resources.go +++ b/checks/cloud/aws/redshift/no_classic_resources.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoClassicResources = rules.Register( +var CheckNoClassicResources = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0085", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/redshift/no_classic_resources_test.go b/checks/cloud/aws/redshift/no_classic_resources_test.go similarity index 100% rename from rules/cloud/policies/aws/redshift/no_classic_resources_test.go rename to checks/cloud/aws/redshift/no_classic_resources_test.go diff --git a/rules/cloud/policies/aws/redshift/use_vpc.cf.go b/checks/cloud/aws/redshift/use_vpc.cf.go similarity index 100% rename from rules/cloud/policies/aws/redshift/use_vpc.cf.go rename to checks/cloud/aws/redshift/use_vpc.cf.go diff --git a/rules/cloud/policies/aws/redshift/use_vpc.go b/checks/cloud/aws/redshift/use_vpc.go similarity index 95% rename from rules/cloud/policies/aws/redshift/use_vpc.go rename to checks/cloud/aws/redshift/use_vpc.go index 442780d3..e71dc46d 100755 --- a/rules/cloud/policies/aws/redshift/use_vpc.go +++ b/checks/cloud/aws/redshift/use_vpc.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckUsesVPC = rules.Register( +var CheckUsesVPC = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0127", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/redshift/use_vpc.tf.go b/checks/cloud/aws/redshift/use_vpc.tf.go similarity index 100% rename from rules/cloud/policies/aws/redshift/use_vpc.tf.go rename to checks/cloud/aws/redshift/use_vpc.tf.go diff --git a/rules/cloud/policies/aws/redshift/use_vpc_test.go b/checks/cloud/aws/redshift/use_vpc_test.go similarity index 100% rename from rules/cloud/policies/aws/redshift/use_vpc_test.go rename to checks/cloud/aws/redshift/use_vpc_test.go diff --git a/rules/cloud/policies/aws/s3/block_public_acls.cf.go b/checks/cloud/aws/s3/block_public_acls.cf.go similarity index 100% rename from rules/cloud/policies/aws/s3/block_public_acls.cf.go rename to checks/cloud/aws/s3/block_public_acls.cf.go diff --git a/rules/cloud/policies/aws/s3/block_public_acls.go b/checks/cloud/aws/s3/block_public_acls.go similarity index 95% rename from rules/cloud/policies/aws/s3/block_public_acls.go rename to checks/cloud/aws/s3/block_public_acls.go index 913720b9..0f3b0cbe 100755 --- a/rules/cloud/policies/aws/s3/block_public_acls.go +++ b/checks/cloud/aws/s3/block_public_acls.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckPublicACLsAreBlocked = rules.Register( +var CheckPublicACLsAreBlocked = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0086", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/s3/block_public_acls.tf.go b/checks/cloud/aws/s3/block_public_acls.tf.go similarity index 100% rename from rules/cloud/policies/aws/s3/block_public_acls.tf.go rename to checks/cloud/aws/s3/block_public_acls.tf.go diff --git a/rules/cloud/policies/aws/s3/block_public_acls_test.go b/checks/cloud/aws/s3/block_public_acls_test.go similarity index 100% rename from rules/cloud/policies/aws/s3/block_public_acls_test.go rename to checks/cloud/aws/s3/block_public_acls_test.go diff --git a/rules/cloud/policies/aws/s3/block_public_policy.cf.go b/checks/cloud/aws/s3/block_public_policy.cf.go similarity index 100% rename from rules/cloud/policies/aws/s3/block_public_policy.cf.go rename to checks/cloud/aws/s3/block_public_policy.cf.go diff --git a/rules/cloud/policies/aws/s3/block_public_policy.go b/checks/cloud/aws/s3/block_public_policy.go similarity index 94% rename from rules/cloud/policies/aws/s3/block_public_policy.go rename to checks/cloud/aws/s3/block_public_policy.go index 99521e27..9b1bf2dc 100755 --- a/rules/cloud/policies/aws/s3/block_public_policy.go +++ b/checks/cloud/aws/s3/block_public_policy.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckPublicPoliciesAreBlocked = rules.Register( +var CheckPublicPoliciesAreBlocked = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0087", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/s3/block_public_policy.tf.go b/checks/cloud/aws/s3/block_public_policy.tf.go similarity index 100% rename from rules/cloud/policies/aws/s3/block_public_policy.tf.go rename to checks/cloud/aws/s3/block_public_policy.tf.go diff --git a/rules/cloud/policies/aws/s3/block_public_policy_test.go b/checks/cloud/aws/s3/block_public_policy_test.go similarity index 100% rename from rules/cloud/policies/aws/s3/block_public_policy_test.go rename to checks/cloud/aws/s3/block_public_policy_test.go diff --git a/rules/cloud/policies/aws/s3/dns_compliant_name.rego b/checks/cloud/aws/s3/dns_compliant_name.rego similarity index 100% rename from rules/cloud/policies/aws/s3/dns_compliant_name.rego rename to checks/cloud/aws/s3/dns_compliant_name.rego diff --git a/rules/cloud/policies/aws/s3/dns_compliant_name_test.rego b/checks/cloud/aws/s3/dns_compliant_name_test.rego similarity index 100% rename from rules/cloud/policies/aws/s3/dns_compliant_name_test.rego rename to checks/cloud/aws/s3/dns_compliant_name_test.rego diff --git a/rules/cloud/policies/aws/s3/enable_bucket_encryption.cf.go b/checks/cloud/aws/s3/enable_bucket_encryption.cf.go similarity index 100% rename from rules/cloud/policies/aws/s3/enable_bucket_encryption.cf.go rename to checks/cloud/aws/s3/enable_bucket_encryption.cf.go diff --git a/rules/cloud/policies/aws/s3/enable_bucket_encryption.go b/checks/cloud/aws/s3/enable_bucket_encryption.go similarity index 94% rename from rules/cloud/policies/aws/s3/enable_bucket_encryption.go rename to checks/cloud/aws/s3/enable_bucket_encryption.go index de7f2c7c..47f2a374 100755 --- a/rules/cloud/policies/aws/s3/enable_bucket_encryption.go +++ b/checks/cloud/aws/s3/enable_bucket_encryption.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEncryptionIsEnabled = rules.Register( +var CheckEncryptionIsEnabled = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0088", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/s3/enable_bucket_encryption.tf.go b/checks/cloud/aws/s3/enable_bucket_encryption.tf.go similarity index 100% rename from rules/cloud/policies/aws/s3/enable_bucket_encryption.tf.go rename to checks/cloud/aws/s3/enable_bucket_encryption.tf.go diff --git a/rules/cloud/policies/aws/s3/enable_bucket_encryption_test.go b/checks/cloud/aws/s3/enable_bucket_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/s3/enable_bucket_encryption_test.go rename to checks/cloud/aws/s3/enable_bucket_encryption_test.go diff --git a/rules/cloud/policies/aws/s3/enable_bucket_logging.cf.go b/checks/cloud/aws/s3/enable_bucket_logging.cf.go similarity index 100% rename from rules/cloud/policies/aws/s3/enable_bucket_logging.cf.go rename to checks/cloud/aws/s3/enable_bucket_logging.cf.go diff --git a/rules/cloud/policies/aws/s3/enable_bucket_logging.tf.go b/checks/cloud/aws/s3/enable_bucket_logging.tf.go similarity index 100% rename from rules/cloud/policies/aws/s3/enable_bucket_logging.tf.go rename to checks/cloud/aws/s3/enable_bucket_logging.tf.go diff --git a/rules/cloud/policies/aws/s3/enable_logging.rego b/checks/cloud/aws/s3/enable_logging.rego similarity index 100% rename from rules/cloud/policies/aws/s3/enable_logging.rego rename to checks/cloud/aws/s3/enable_logging.rego diff --git a/rules/cloud/policies/aws/s3/enable_logging_test.rego b/checks/cloud/aws/s3/enable_logging_test.rego similarity index 100% rename from rules/cloud/policies/aws/s3/enable_logging_test.rego rename to checks/cloud/aws/s3/enable_logging_test.rego diff --git a/rules/cloud/policies/aws/s3/enable_object_read_logging.go b/checks/cloud/aws/s3/enable_object_read_logging.go similarity index 96% rename from rules/cloud/policies/aws/s3/enable_object_read_logging.go rename to checks/cloud/aws/s3/enable_object_read_logging.go index 956d41d3..6e1c50c4 100755 --- a/rules/cloud/policies/aws/s3/enable_object_read_logging.go +++ b/checks/cloud/aws/s3/enable_object_read_logging.go @@ -8,10 +8,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableObjectReadLogging = rules.Register( +var CheckEnableObjectReadLogging = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0172", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/s3/enable_object_read_logging.tf.go b/checks/cloud/aws/s3/enable_object_read_logging.tf.go similarity index 100% rename from rules/cloud/policies/aws/s3/enable_object_read_logging.tf.go rename to checks/cloud/aws/s3/enable_object_read_logging.tf.go diff --git a/rules/cloud/policies/aws/s3/enable_object_read_logging_test.go b/checks/cloud/aws/s3/enable_object_read_logging_test.go similarity index 100% rename from rules/cloud/policies/aws/s3/enable_object_read_logging_test.go rename to checks/cloud/aws/s3/enable_object_read_logging_test.go diff --git a/rules/cloud/policies/aws/s3/enable_object_write_logging.go b/checks/cloud/aws/s3/enable_object_write_logging.go similarity index 96% rename from rules/cloud/policies/aws/s3/enable_object_write_logging.go rename to checks/cloud/aws/s3/enable_object_write_logging.go index 2803dc8f..1ac37ff5 100755 --- a/rules/cloud/policies/aws/s3/enable_object_write_logging.go +++ b/checks/cloud/aws/s3/enable_object_write_logging.go @@ -8,10 +8,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableObjectWriteLogging = rules.Register( +var CheckEnableObjectWriteLogging = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0171", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/s3/enable_object_write_logging.tf.go b/checks/cloud/aws/s3/enable_object_write_logging.tf.go similarity index 100% rename from rules/cloud/policies/aws/s3/enable_object_write_logging.tf.go rename to checks/cloud/aws/s3/enable_object_write_logging.tf.go diff --git a/rules/cloud/policies/aws/s3/enable_object_write_logging_test.go b/checks/cloud/aws/s3/enable_object_write_logging_test.go similarity index 100% rename from rules/cloud/policies/aws/s3/enable_object_write_logging_test.go rename to checks/cloud/aws/s3/enable_object_write_logging_test.go diff --git a/rules/cloud/policies/aws/s3/enable_versioning.cf.go b/checks/cloud/aws/s3/enable_versioning.cf.go similarity index 100% rename from rules/cloud/policies/aws/s3/enable_versioning.cf.go rename to checks/cloud/aws/s3/enable_versioning.cf.go diff --git a/rules/cloud/policies/aws/s3/enable_versioning.go b/checks/cloud/aws/s3/enable_versioning.go similarity index 95% rename from rules/cloud/policies/aws/s3/enable_versioning.go rename to checks/cloud/aws/s3/enable_versioning.go index c2c40313..efbaf808 100755 --- a/rules/cloud/policies/aws/s3/enable_versioning.go +++ b/checks/cloud/aws/s3/enable_versioning.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckVersioningIsEnabled = rules.Register( +var CheckVersioningIsEnabled = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0090", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/s3/enable_versioning.tf.go b/checks/cloud/aws/s3/enable_versioning.tf.go similarity index 100% rename from rules/cloud/policies/aws/s3/enable_versioning.tf.go rename to checks/cloud/aws/s3/enable_versioning.tf.go diff --git a/rules/cloud/policies/aws/s3/enable_versioning_test.go b/checks/cloud/aws/s3/enable_versioning_test.go similarity index 100% rename from rules/cloud/policies/aws/s3/enable_versioning_test.go rename to checks/cloud/aws/s3/enable_versioning_test.go diff --git a/rules/cloud/policies/aws/s3/encryption_customer_key.cf.go b/checks/cloud/aws/s3/encryption_customer_key.cf.go similarity index 100% rename from rules/cloud/policies/aws/s3/encryption_customer_key.cf.go rename to checks/cloud/aws/s3/encryption_customer_key.cf.go diff --git a/rules/cloud/policies/aws/s3/encryption_customer_key.go b/checks/cloud/aws/s3/encryption_customer_key.go similarity index 95% rename from rules/cloud/policies/aws/s3/encryption_customer_key.go rename to checks/cloud/aws/s3/encryption_customer_key.go index c3a3584a..9769d2bb 100755 --- a/rules/cloud/policies/aws/s3/encryption_customer_key.go +++ b/checks/cloud/aws/s3/encryption_customer_key.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/defsec/pkg/types" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEncryptionCustomerKey = rules.Register( +var CheckEncryptionCustomerKey = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0132", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/s3/encryption_customer_key.tf.go b/checks/cloud/aws/s3/encryption_customer_key.tf.go similarity index 100% rename from rules/cloud/policies/aws/s3/encryption_customer_key.tf.go rename to checks/cloud/aws/s3/encryption_customer_key.tf.go diff --git a/rules/cloud/policies/aws/s3/encryption_customer_key_test.go b/checks/cloud/aws/s3/encryption_customer_key_test.go similarity index 100% rename from rules/cloud/policies/aws/s3/encryption_customer_key_test.go rename to checks/cloud/aws/s3/encryption_customer_key_test.go diff --git a/rules/cloud/policies/aws/s3/ignore_public_acls.cf.go b/checks/cloud/aws/s3/ignore_public_acls.cf.go similarity index 100% rename from rules/cloud/policies/aws/s3/ignore_public_acls.cf.go rename to checks/cloud/aws/s3/ignore_public_acls.cf.go diff --git a/rules/cloud/policies/aws/s3/ignore_public_acls.go b/checks/cloud/aws/s3/ignore_public_acls.go similarity index 95% rename from rules/cloud/policies/aws/s3/ignore_public_acls.go rename to checks/cloud/aws/s3/ignore_public_acls.go index 3d94a38d..13b49f3d 100755 --- a/rules/cloud/policies/aws/s3/ignore_public_acls.go +++ b/checks/cloud/aws/s3/ignore_public_acls.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckPublicACLsAreIgnored = rules.Register( +var CheckPublicACLsAreIgnored = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0091", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/s3/ignore_public_acls.tf.go b/checks/cloud/aws/s3/ignore_public_acls.tf.go similarity index 100% rename from rules/cloud/policies/aws/s3/ignore_public_acls.tf.go rename to checks/cloud/aws/s3/ignore_public_acls.tf.go diff --git a/rules/cloud/policies/aws/s3/ignore_public_acls_test.go b/checks/cloud/aws/s3/ignore_public_acls_test.go similarity index 100% rename from rules/cloud/policies/aws/s3/ignore_public_acls_test.go rename to checks/cloud/aws/s3/ignore_public_acls_test.go diff --git a/rules/cloud/policies/aws/s3/no_public_access_with_acl.cf.go b/checks/cloud/aws/s3/no_public_access_with_acl.cf.go similarity index 100% rename from rules/cloud/policies/aws/s3/no_public_access_with_acl.cf.go rename to checks/cloud/aws/s3/no_public_access_with_acl.cf.go diff --git a/rules/cloud/policies/aws/s3/no_public_access_with_acl.go b/checks/cloud/aws/s3/no_public_access_with_acl.go similarity index 95% rename from rules/cloud/policies/aws/s3/no_public_access_with_acl.go rename to checks/cloud/aws/s3/no_public_access_with_acl.go index 706decdf..4b165455 100755 --- a/rules/cloud/policies/aws/s3/no_public_access_with_acl.go +++ b/checks/cloud/aws/s3/no_public_access_with_acl.go @@ -9,12 +9,12 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/defsec/pkg/providers" ) -var CheckForPublicACL = rules.Register( +var CheckForPublicACL = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0092", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/s3/no_public_access_with_acl.tf.go b/checks/cloud/aws/s3/no_public_access_with_acl.tf.go similarity index 100% rename from rules/cloud/policies/aws/s3/no_public_access_with_acl.tf.go rename to checks/cloud/aws/s3/no_public_access_with_acl.tf.go diff --git a/rules/cloud/policies/aws/s3/no_public_access_with_acl_test.go b/checks/cloud/aws/s3/no_public_access_with_acl_test.go similarity index 100% rename from rules/cloud/policies/aws/s3/no_public_access_with_acl_test.go rename to checks/cloud/aws/s3/no_public_access_with_acl_test.go diff --git a/rules/cloud/policies/aws/s3/no_public_buckets.cf.go b/checks/cloud/aws/s3/no_public_buckets.cf.go similarity index 100% rename from rules/cloud/policies/aws/s3/no_public_buckets.cf.go rename to checks/cloud/aws/s3/no_public_buckets.cf.go diff --git a/rules/cloud/policies/aws/s3/no_public_buckets.go b/checks/cloud/aws/s3/no_public_buckets.go similarity index 94% rename from rules/cloud/policies/aws/s3/no_public_buckets.go rename to checks/cloud/aws/s3/no_public_buckets.go index 84b97516..e0467850 100755 --- a/rules/cloud/policies/aws/s3/no_public_buckets.go +++ b/checks/cloud/aws/s3/no_public_buckets.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckPublicBucketsAreRestricted = rules.Register( +var CheckPublicBucketsAreRestricted = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0093", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/s3/no_public_buckets.tf.go b/checks/cloud/aws/s3/no_public_buckets.tf.go similarity index 100% rename from rules/cloud/policies/aws/s3/no_public_buckets.tf.go rename to checks/cloud/aws/s3/no_public_buckets.tf.go diff --git a/rules/cloud/policies/aws/s3/no_public_buckets_test.go b/checks/cloud/aws/s3/no_public_buckets_test.go similarity index 100% rename from rules/cloud/policies/aws/s3/no_public_buckets_test.go rename to checks/cloud/aws/s3/no_public_buckets_test.go diff --git a/rules/cloud/policies/aws/s3/require_mfa_delete.go b/checks/cloud/aws/s3/require_mfa_delete.go similarity index 94% rename from rules/cloud/policies/aws/s3/require_mfa_delete.go rename to checks/cloud/aws/s3/require_mfa_delete.go index df00ac3c..6fa3b95f 100755 --- a/rules/cloud/policies/aws/s3/require_mfa_delete.go +++ b/checks/cloud/aws/s3/require_mfa_delete.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckRequireMFADelete = rules.Register( +var CheckRequireMFADelete = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0170", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/s3/require_mfa_delete.tf.go b/checks/cloud/aws/s3/require_mfa_delete.tf.go similarity index 100% rename from rules/cloud/policies/aws/s3/require_mfa_delete.tf.go rename to checks/cloud/aws/s3/require_mfa_delete.tf.go diff --git a/rules/cloud/policies/aws/s3/require_mfa_delete_test.go b/checks/cloud/aws/s3/require_mfa_delete_test.go similarity index 100% rename from rules/cloud/policies/aws/s3/require_mfa_delete_test.go rename to checks/cloud/aws/s3/require_mfa_delete_test.go diff --git a/rules/cloud/policies/aws/s3/specify_public_access_block.cf.go b/checks/cloud/aws/s3/specify_public_access_block.cf.go similarity index 100% rename from rules/cloud/policies/aws/s3/specify_public_access_block.cf.go rename to checks/cloud/aws/s3/specify_public_access_block.cf.go diff --git a/rules/cloud/policies/aws/s3/specify_public_access_block.go b/checks/cloud/aws/s3/specify_public_access_block.go similarity index 95% rename from rules/cloud/policies/aws/s3/specify_public_access_block.go rename to checks/cloud/aws/s3/specify_public_access_block.go index 54aa3b26..e3324c2a 100755 --- a/rules/cloud/policies/aws/s3/specify_public_access_block.go +++ b/checks/cloud/aws/s3/specify_public_access_block.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckBucketsHavePublicAccessBlocks = rules.Register( +var CheckBucketsHavePublicAccessBlocks = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0094", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/s3/specify_public_access_block.tf.go b/checks/cloud/aws/s3/specify_public_access_block.tf.go similarity index 100% rename from rules/cloud/policies/aws/s3/specify_public_access_block.tf.go rename to checks/cloud/aws/s3/specify_public_access_block.tf.go diff --git a/rules/cloud/policies/aws/s3/specify_public_access_block_test.go b/checks/cloud/aws/s3/specify_public_access_block_test.go similarity index 100% rename from rules/cloud/policies/aws/s3/specify_public_access_block_test.go rename to checks/cloud/aws/s3/specify_public_access_block_test.go diff --git a/rules/cloud/policies/aws/sam/api_use_secure_tls_policy.cf.go b/checks/cloud/aws/sam/api_use_secure_tls_policy.cf.go similarity index 100% rename from rules/cloud/policies/aws/sam/api_use_secure_tls_policy.cf.go rename to checks/cloud/aws/sam/api_use_secure_tls_policy.cf.go diff --git a/rules/cloud/policies/aws/sam/api_use_secure_tls_policy.go b/checks/cloud/aws/sam/api_use_secure_tls_policy.go similarity index 93% rename from rules/cloud/policies/aws/sam/api_use_secure_tls_policy.go rename to checks/cloud/aws/sam/api_use_secure_tls_policy.go index 62bf8d2f..3269557b 100755 --- a/rules/cloud/policies/aws/sam/api_use_secure_tls_policy.go +++ b/checks/cloud/aws/sam/api_use_secure_tls_policy.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckApiUseSecureTlsPolicy = rules.Register( +var CheckApiUseSecureTlsPolicy = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0112", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/sam/api_use_secure_tls_policy_test.go b/checks/cloud/aws/sam/api_use_secure_tls_policy_test.go similarity index 100% rename from rules/cloud/policies/aws/sam/api_use_secure_tls_policy_test.go rename to checks/cloud/aws/sam/api_use_secure_tls_policy_test.go diff --git a/rules/cloud/policies/aws/sam/enable_api_access_logging.cf.go b/checks/cloud/aws/sam/enable_api_access_logging.cf.go similarity index 100% rename from rules/cloud/policies/aws/sam/enable_api_access_logging.cf.go rename to checks/cloud/aws/sam/enable_api_access_logging.cf.go diff --git a/rules/cloud/policies/aws/sam/enable_api_access_logging.go b/checks/cloud/aws/sam/enable_api_access_logging.go similarity index 94% rename from rules/cloud/policies/aws/sam/enable_api_access_logging.go rename to checks/cloud/aws/sam/enable_api_access_logging.go index 4726aaac..b33c0b0a 100755 --- a/rules/cloud/policies/aws/sam/enable_api_access_logging.go +++ b/checks/cloud/aws/sam/enable_api_access_logging.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableApiAccessLogging = rules.Register( +var CheckEnableApiAccessLogging = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0113", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/sam/enable_api_access_logging_test.go b/checks/cloud/aws/sam/enable_api_access_logging_test.go similarity index 100% rename from rules/cloud/policies/aws/sam/enable_api_access_logging_test.go rename to checks/cloud/aws/sam/enable_api_access_logging_test.go diff --git a/rules/cloud/policies/aws/sam/enable_api_cache_encryption.cf.go b/checks/cloud/aws/sam/enable_api_cache_encryption.cf.go similarity index 100% rename from rules/cloud/policies/aws/sam/enable_api_cache_encryption.cf.go rename to checks/cloud/aws/sam/enable_api_cache_encryption.cf.go diff --git a/rules/cloud/policies/aws/sam/enable_api_cache_encryption.go b/checks/cloud/aws/sam/enable_api_cache_encryption.go similarity index 93% rename from rules/cloud/policies/aws/sam/enable_api_cache_encryption.go rename to checks/cloud/aws/sam/enable_api_cache_encryption.go index 3c29caf5..3112f467 100755 --- a/rules/cloud/policies/aws/sam/enable_api_cache_encryption.go +++ b/checks/cloud/aws/sam/enable_api_cache_encryption.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableApiCacheEncryption = rules.Register( +var CheckEnableApiCacheEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0110", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/sam/enable_api_cache_encryption_test.go b/checks/cloud/aws/sam/enable_api_cache_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/sam/enable_api_cache_encryption_test.go rename to checks/cloud/aws/sam/enable_api_cache_encryption_test.go diff --git a/rules/cloud/policies/aws/sam/enable_api_tracing.cf.go b/checks/cloud/aws/sam/enable_api_tracing.cf.go similarity index 100% rename from rules/cloud/policies/aws/sam/enable_api_tracing.cf.go rename to checks/cloud/aws/sam/enable_api_tracing.cf.go diff --git a/rules/cloud/policies/aws/sam/enable_api_tracing.go b/checks/cloud/aws/sam/enable_api_tracing.go similarity index 93% rename from rules/cloud/policies/aws/sam/enable_api_tracing.go rename to checks/cloud/aws/sam/enable_api_tracing.go index 3b1bec37..d0a69cc8 100755 --- a/rules/cloud/policies/aws/sam/enable_api_tracing.go +++ b/checks/cloud/aws/sam/enable_api_tracing.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableApiTracing = rules.Register( +var CheckEnableApiTracing = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0111", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/sam/enable_api_tracing_test.go b/checks/cloud/aws/sam/enable_api_tracing_test.go similarity index 100% rename from rules/cloud/policies/aws/sam/enable_api_tracing_test.go rename to checks/cloud/aws/sam/enable_api_tracing_test.go diff --git a/rules/cloud/policies/aws/sam/enable_function_tracing.cf.go b/checks/cloud/aws/sam/enable_function_tracing.cf.go similarity index 100% rename from rules/cloud/policies/aws/sam/enable_function_tracing.cf.go rename to checks/cloud/aws/sam/enable_function_tracing.cf.go diff --git a/rules/cloud/policies/aws/sam/enable_function_tracing.go b/checks/cloud/aws/sam/enable_function_tracing.go similarity index 93% rename from rules/cloud/policies/aws/sam/enable_function_tracing.go rename to checks/cloud/aws/sam/enable_function_tracing.go index 496da316..65d22393 100755 --- a/rules/cloud/policies/aws/sam/enable_function_tracing.go +++ b/checks/cloud/aws/sam/enable_function_tracing.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableFunctionTracing = rules.Register( +var CheckEnableFunctionTracing = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0125", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/sam/enable_function_tracing_test.go b/checks/cloud/aws/sam/enable_function_tracing_test.go similarity index 100% rename from rules/cloud/policies/aws/sam/enable_function_tracing_test.go rename to checks/cloud/aws/sam/enable_function_tracing_test.go diff --git a/rules/cloud/policies/aws/sam/enable_http_api_access_logging.cf.go b/checks/cloud/aws/sam/enable_http_api_access_logging.cf.go similarity index 100% rename from rules/cloud/policies/aws/sam/enable_http_api_access_logging.cf.go rename to checks/cloud/aws/sam/enable_http_api_access_logging.cf.go diff --git a/rules/cloud/policies/aws/sam/enable_http_api_access_logging.go b/checks/cloud/aws/sam/enable_http_api_access_logging.go similarity index 94% rename from rules/cloud/policies/aws/sam/enable_http_api_access_logging.go rename to checks/cloud/aws/sam/enable_http_api_access_logging.go index c12729e6..ee216045 100755 --- a/rules/cloud/policies/aws/sam/enable_http_api_access_logging.go +++ b/checks/cloud/aws/sam/enable_http_api_access_logging.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableHttpApiAccessLogging = rules.Register( +var CheckEnableHttpApiAccessLogging = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0116", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/sam/enable_http_api_access_logging_test.go b/checks/cloud/aws/sam/enable_http_api_access_logging_test.go similarity index 100% rename from rules/cloud/policies/aws/sam/enable_http_api_access_logging_test.go rename to checks/cloud/aws/sam/enable_http_api_access_logging_test.go diff --git a/rules/cloud/policies/aws/sam/enable_state_machine_logging.go b/checks/cloud/aws/sam/enable_state_machine_logging.go similarity index 92% rename from rules/cloud/policies/aws/sam/enable_state_machine_logging.go rename to checks/cloud/aws/sam/enable_state_machine_logging.go index 2ea22038..d333d49b 100644 --- a/rules/cloud/policies/aws/sam/enable_state_machine_logging.go +++ b/checks/cloud/aws/sam/enable_state_machine_logging.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableStateMachineLogging = rules.Register( +var CheckEnableStateMachineLogging = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0119", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/sam/enable_state_machine_logging_test.go b/checks/cloud/aws/sam/enable_state_machine_logging_test.go similarity index 100% rename from rules/cloud/policies/aws/sam/enable_state_machine_logging_test.go rename to checks/cloud/aws/sam/enable_state_machine_logging_test.go diff --git a/rules/cloud/policies/aws/sam/enable_state_machine_tracing.cf.go b/checks/cloud/aws/sam/enable_state_machine_tracing.cf.go similarity index 100% rename from rules/cloud/policies/aws/sam/enable_state_machine_tracing.cf.go rename to checks/cloud/aws/sam/enable_state_machine_tracing.cf.go diff --git a/rules/cloud/policies/aws/sam/enable_state_machine_tracing.go b/checks/cloud/aws/sam/enable_state_machine_tracing.go similarity index 93% rename from rules/cloud/policies/aws/sam/enable_state_machine_tracing.go rename to checks/cloud/aws/sam/enable_state_machine_tracing.go index 274b4411..a7acd971 100755 --- a/rules/cloud/policies/aws/sam/enable_state_machine_tracing.go +++ b/checks/cloud/aws/sam/enable_state_machine_tracing.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableStateMachineTracing = rules.Register( +var CheckEnableStateMachineTracing = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0117", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/sam/enable_state_machine_tracing_test.go b/checks/cloud/aws/sam/enable_state_machine_tracing_test.go similarity index 100% rename from rules/cloud/policies/aws/sam/enable_state_machine_tracing_test.go rename to checks/cloud/aws/sam/enable_state_machine_tracing_test.go diff --git a/rules/cloud/policies/aws/sam/enable_table_encryption.cf.go b/checks/cloud/aws/sam/enable_table_encryption.cf.go similarity index 100% rename from rules/cloud/policies/aws/sam/enable_table_encryption.cf.go rename to checks/cloud/aws/sam/enable_table_encryption.cf.go diff --git a/rules/cloud/policies/aws/sam/enable_table_encryption.go b/checks/cloud/aws/sam/enable_table_encryption.go similarity index 93% rename from rules/cloud/policies/aws/sam/enable_table_encryption.go rename to checks/cloud/aws/sam/enable_table_encryption.go index 190ac83e..dcf06f99 100755 --- a/rules/cloud/policies/aws/sam/enable_table_encryption.go +++ b/checks/cloud/aws/sam/enable_table_encryption.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableTableEncryption = rules.Register( +var CheckEnableTableEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0121", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/sam/enable_table_encryption_test.go b/checks/cloud/aws/sam/enable_table_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/sam/enable_table_encryption_test.go rename to checks/cloud/aws/sam/enable_table_encryption_test.go diff --git a/rules/cloud/policies/aws/sam/no_function_policy_wildcards.cf.go b/checks/cloud/aws/sam/no_function_policy_wildcards.cf.go similarity index 100% rename from rules/cloud/policies/aws/sam/no_function_policy_wildcards.cf.go rename to checks/cloud/aws/sam/no_function_policy_wildcards.cf.go diff --git a/rules/cloud/policies/aws/sam/no_function_policy_wildcards.go b/checks/cloud/aws/sam/no_function_policy_wildcards.go similarity index 97% rename from rules/cloud/policies/aws/sam/no_function_policy_wildcards.go rename to checks/cloud/aws/sam/no_function_policy_wildcards.go index 80584e7e..9c6afe27 100755 --- a/rules/cloud/policies/aws/sam/no_function_policy_wildcards.go +++ b/checks/cloud/aws/sam/no_function_policy_wildcards.go @@ -10,14 +10,14 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/defsec/pkg/providers" "github.com/liamg/iamgo" ) -var CheckNoFunctionPolicyWildcards = rules.Register( +var CheckNoFunctionPolicyWildcards = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0114", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/sam/no_function_policy_wildcards_test.go b/checks/cloud/aws/sam/no_function_policy_wildcards_test.go similarity index 100% rename from rules/cloud/policies/aws/sam/no_function_policy_wildcards_test.go rename to checks/cloud/aws/sam/no_function_policy_wildcards_test.go diff --git a/rules/cloud/policies/aws/sam/no_state_machine_policy_wildcards.cf.go b/checks/cloud/aws/sam/no_state_machine_policy_wildcards.cf.go similarity index 100% rename from rules/cloud/policies/aws/sam/no_state_machine_policy_wildcards.cf.go rename to checks/cloud/aws/sam/no_state_machine_policy_wildcards.cf.go diff --git a/rules/cloud/policies/aws/sam/no_state_machine_policy_wildcards.go b/checks/cloud/aws/sam/no_state_machine_policy_wildcards.go similarity index 94% rename from rules/cloud/policies/aws/sam/no_state_machine_policy_wildcards.go rename to checks/cloud/aws/sam/no_state_machine_policy_wildcards.go index e25d5cb7..5022ff46 100755 --- a/rules/cloud/policies/aws/sam/no_state_machine_policy_wildcards.go +++ b/checks/cloud/aws/sam/no_state_machine_policy_wildcards.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoStateMachinePolicyWildcards = rules.Register( +var CheckNoStateMachinePolicyWildcards = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0120", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/sam/no_state_machine_policy_wildcards_test.go b/checks/cloud/aws/sam/no_state_machine_policy_wildcards_test.go similarity index 100% rename from rules/cloud/policies/aws/sam/no_state_machine_policy_wildcards_test.go rename to checks/cloud/aws/sam/no_state_machine_policy_wildcards_test.go diff --git a/rules/cloud/policies/aws/sns/enable_topic_encryption.cf.go b/checks/cloud/aws/sns/enable_topic_encryption.cf.go similarity index 100% rename from rules/cloud/policies/aws/sns/enable_topic_encryption.cf.go rename to checks/cloud/aws/sns/enable_topic_encryption.cf.go diff --git a/rules/cloud/policies/aws/sns/enable_topic_encryption.go b/checks/cloud/aws/sns/enable_topic_encryption.go similarity index 94% rename from rules/cloud/policies/aws/sns/enable_topic_encryption.go rename to checks/cloud/aws/sns/enable_topic_encryption.go index 95c058e1..add5fd2e 100755 --- a/rules/cloud/policies/aws/sns/enable_topic_encryption.go +++ b/checks/cloud/aws/sns/enable_topic_encryption.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableTopicEncryption = rules.Register( +var CheckEnableTopicEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0095", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/sns/enable_topic_encryption.tf.go b/checks/cloud/aws/sns/enable_topic_encryption.tf.go similarity index 100% rename from rules/cloud/policies/aws/sns/enable_topic_encryption.tf.go rename to checks/cloud/aws/sns/enable_topic_encryption.tf.go diff --git a/rules/cloud/policies/aws/sns/enable_topic_encryption_test.go b/checks/cloud/aws/sns/enable_topic_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/sns/enable_topic_encryption_test.go rename to checks/cloud/aws/sns/enable_topic_encryption_test.go diff --git a/rules/cloud/policies/aws/sns/topic_encryption_with_cmk.cf.go b/checks/cloud/aws/sns/topic_encryption_with_cmk.cf.go similarity index 100% rename from rules/cloud/policies/aws/sns/topic_encryption_with_cmk.cf.go rename to checks/cloud/aws/sns/topic_encryption_with_cmk.cf.go diff --git a/rules/cloud/policies/aws/sns/topic_encryption_with_cmk.go b/checks/cloud/aws/sns/topic_encryption_with_cmk.go similarity index 94% rename from rules/cloud/policies/aws/sns/topic_encryption_with_cmk.go rename to checks/cloud/aws/sns/topic_encryption_with_cmk.go index 577646e4..8e85dcd3 100755 --- a/rules/cloud/policies/aws/sns/topic_encryption_with_cmk.go +++ b/checks/cloud/aws/sns/topic_encryption_with_cmk.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckTopicEncryptionUsesCMK = rules.Register( +var CheckTopicEncryptionUsesCMK = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0136", ShortCode: "topic-encryption-use-cmk", diff --git a/rules/cloud/policies/aws/sns/topic_encryption_with_cmk.tf.go b/checks/cloud/aws/sns/topic_encryption_with_cmk.tf.go similarity index 100% rename from rules/cloud/policies/aws/sns/topic_encryption_with_cmk.tf.go rename to checks/cloud/aws/sns/topic_encryption_with_cmk.tf.go diff --git a/rules/cloud/policies/aws/sns/topic_encryption_with_cmk_test.go b/checks/cloud/aws/sns/topic_encryption_with_cmk_test.go similarity index 100% rename from rules/cloud/policies/aws/sns/topic_encryption_with_cmk_test.go rename to checks/cloud/aws/sns/topic_encryption_with_cmk_test.go diff --git a/rules/cloud/policies/aws/sqs/enable_queue_encryption.cf.go b/checks/cloud/aws/sqs/enable_queue_encryption.cf.go similarity index 100% rename from rules/cloud/policies/aws/sqs/enable_queue_encryption.cf.go rename to checks/cloud/aws/sqs/enable_queue_encryption.cf.go diff --git a/rules/cloud/policies/aws/sqs/enable_queue_encryption.go b/checks/cloud/aws/sqs/enable_queue_encryption.go similarity index 94% rename from rules/cloud/policies/aws/sqs/enable_queue_encryption.go rename to checks/cloud/aws/sqs/enable_queue_encryption.go index ecaeb57c..cc3e2968 100755 --- a/rules/cloud/policies/aws/sqs/enable_queue_encryption.go +++ b/checks/cloud/aws/sqs/enable_queue_encryption.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableQueueEncryption = rules.Register( +var CheckEnableQueueEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0096", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/sqs/enable_queue_encryption.tf.go b/checks/cloud/aws/sqs/enable_queue_encryption.tf.go similarity index 100% rename from rules/cloud/policies/aws/sqs/enable_queue_encryption.tf.go rename to checks/cloud/aws/sqs/enable_queue_encryption.tf.go diff --git a/rules/cloud/policies/aws/sqs/enable_queue_encryption_test.go b/checks/cloud/aws/sqs/enable_queue_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/sqs/enable_queue_encryption_test.go rename to checks/cloud/aws/sqs/enable_queue_encryption_test.go diff --git a/rules/cloud/policies/aws/sqs/no_wildcards_in_policy_documents.cf.go b/checks/cloud/aws/sqs/no_wildcards_in_policy_documents.cf.go similarity index 100% rename from rules/cloud/policies/aws/sqs/no_wildcards_in_policy_documents.cf.go rename to checks/cloud/aws/sqs/no_wildcards_in_policy_documents.cf.go diff --git a/rules/cloud/policies/aws/sqs/no_wildcards_in_policy_documents.go b/checks/cloud/aws/sqs/no_wildcards_in_policy_documents.go similarity index 95% rename from rules/cloud/policies/aws/sqs/no_wildcards_in_policy_documents.go rename to checks/cloud/aws/sqs/no_wildcards_in_policy_documents.go index 2d1e3a02..7b3a4d5a 100755 --- a/rules/cloud/policies/aws/sqs/no_wildcards_in_policy_documents.go +++ b/checks/cloud/aws/sqs/no_wildcards_in_policy_documents.go @@ -9,14 +9,14 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/defsec/pkg/providers" "github.com/liamg/iamgo" ) -var CheckNoWildcardsInPolicyDocuments = rules.Register( +var CheckNoWildcardsInPolicyDocuments = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0097", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/sqs/no_wildcards_in_policy_documents.tf.go b/checks/cloud/aws/sqs/no_wildcards_in_policy_documents.tf.go similarity index 100% rename from rules/cloud/policies/aws/sqs/no_wildcards_in_policy_documents.tf.go rename to checks/cloud/aws/sqs/no_wildcards_in_policy_documents.tf.go diff --git a/rules/cloud/policies/aws/sqs/no_wildcards_in_policy_documents_test.go b/checks/cloud/aws/sqs/no_wildcards_in_policy_documents_test.go similarity index 100% rename from rules/cloud/policies/aws/sqs/no_wildcards_in_policy_documents_test.go rename to checks/cloud/aws/sqs/no_wildcards_in_policy_documents_test.go diff --git a/rules/cloud/policies/aws/sqs/queue_encryption_with_cmk.cf.go b/checks/cloud/aws/sqs/queue_encryption_with_cmk.cf.go similarity index 100% rename from rules/cloud/policies/aws/sqs/queue_encryption_with_cmk.cf.go rename to checks/cloud/aws/sqs/queue_encryption_with_cmk.cf.go diff --git a/rules/cloud/policies/aws/sqs/queue_encryption_with_cmk.go b/checks/cloud/aws/sqs/queue_encryption_with_cmk.go similarity index 95% rename from rules/cloud/policies/aws/sqs/queue_encryption_with_cmk.go rename to checks/cloud/aws/sqs/queue_encryption_with_cmk.go index bb476e4a..89146891 100755 --- a/rules/cloud/policies/aws/sqs/queue_encryption_with_cmk.go +++ b/checks/cloud/aws/sqs/queue_encryption_with_cmk.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckQueueEncryptionUsesCMK = rules.Register( +var CheckQueueEncryptionUsesCMK = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0135", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/sqs/queue_encryption_with_cmk.tf.go b/checks/cloud/aws/sqs/queue_encryption_with_cmk.tf.go similarity index 100% rename from rules/cloud/policies/aws/sqs/queue_encryption_with_cmk.tf.go rename to checks/cloud/aws/sqs/queue_encryption_with_cmk.tf.go diff --git a/rules/cloud/policies/aws/sqs/queue_encryption_with_cmk_test.go b/checks/cloud/aws/sqs/queue_encryption_with_cmk_test.go similarity index 100% rename from rules/cloud/policies/aws/sqs/queue_encryption_with_cmk_test.go rename to checks/cloud/aws/sqs/queue_encryption_with_cmk_test.go diff --git a/rules/cloud/policies/aws/ssm/avoid_leaks_via_http.go b/checks/cloud/aws/ssm/avoid_leaks_via_http.go similarity index 94% rename from rules/cloud/policies/aws/ssm/avoid_leaks_via_http.go rename to checks/cloud/aws/ssm/avoid_leaks_via_http.go index bcf3d160..7aca191d 100644 --- a/rules/cloud/policies/aws/ssm/avoid_leaks_via_http.go +++ b/checks/cloud/aws/ssm/avoid_leaks_via_http.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/terraform" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var AvoidLeaksViaHTTP = rules.Register( +var AvoidLeaksViaHTTP = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0134", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/ssm/avoid_leaks_via_http.tf.go b/checks/cloud/aws/ssm/avoid_leaks_via_http.tf.go similarity index 100% rename from rules/cloud/policies/aws/ssm/avoid_leaks_via_http.tf.go rename to checks/cloud/aws/ssm/avoid_leaks_via_http.tf.go diff --git a/rules/cloud/policies/aws/ssm/secret_use_customer_key.cf.go b/checks/cloud/aws/ssm/secret_use_customer_key.cf.go similarity index 100% rename from rules/cloud/policies/aws/ssm/secret_use_customer_key.cf.go rename to checks/cloud/aws/ssm/secret_use_customer_key.cf.go diff --git a/rules/cloud/policies/aws/ssm/secret_use_customer_key.go b/checks/cloud/aws/ssm/secret_use_customer_key.go similarity index 95% rename from rules/cloud/policies/aws/ssm/secret_use_customer_key.go rename to checks/cloud/aws/ssm/secret_use_customer_key.go index 223054ba..d233c43d 100755 --- a/rules/cloud/policies/aws/ssm/secret_use_customer_key.go +++ b/checks/cloud/aws/ssm/secret_use_customer_key.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckSecretUseCustomerKey = rules.Register( +var CheckSecretUseCustomerKey = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0098", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/ssm/secret_use_customer_key.tf.go b/checks/cloud/aws/ssm/secret_use_customer_key.tf.go similarity index 100% rename from rules/cloud/policies/aws/ssm/secret_use_customer_key.tf.go rename to checks/cloud/aws/ssm/secret_use_customer_key.tf.go diff --git a/rules/cloud/policies/aws/ssm/secret_use_customer_key_test.go b/checks/cloud/aws/ssm/secret_use_customer_key_test.go similarity index 100% rename from rules/cloud/policies/aws/ssm/secret_use_customer_key_test.go rename to checks/cloud/aws/ssm/secret_use_customer_key_test.go diff --git a/rules/cloud/policies/aws/workspaces/enable_disk_encryption.cf.go b/checks/cloud/aws/workspaces/enable_disk_encryption.cf.go similarity index 100% rename from rules/cloud/policies/aws/workspaces/enable_disk_encryption.cf.go rename to checks/cloud/aws/workspaces/enable_disk_encryption.cf.go diff --git a/rules/cloud/policies/aws/workspaces/enable_disk_encryption.go b/checks/cloud/aws/workspaces/enable_disk_encryption.go similarity index 95% rename from rules/cloud/policies/aws/workspaces/enable_disk_encryption.go rename to checks/cloud/aws/workspaces/enable_disk_encryption.go index 86d4fc24..c6630360 100755 --- a/rules/cloud/policies/aws/workspaces/enable_disk_encryption.go +++ b/checks/cloud/aws/workspaces/enable_disk_encryption.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableDiskEncryption = rules.Register( +var CheckEnableDiskEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AWS-0109", Provider: providers.AWSProvider, diff --git a/rules/cloud/policies/aws/workspaces/enable_disk_encryption.tf.go b/checks/cloud/aws/workspaces/enable_disk_encryption.tf.go similarity index 100% rename from rules/cloud/policies/aws/workspaces/enable_disk_encryption.tf.go rename to checks/cloud/aws/workspaces/enable_disk_encryption.tf.go diff --git a/rules/cloud/policies/aws/workspaces/enable_disk_encryption_test.go b/checks/cloud/aws/workspaces/enable_disk_encryption_test.go similarity index 100% rename from rules/cloud/policies/aws/workspaces/enable_disk_encryption_test.go rename to checks/cloud/aws/workspaces/enable_disk_encryption_test.go diff --git a/rules/cloud/policies/azure/appservice/account_identity_registered.go b/checks/cloud/azure/appservice/account_identity_registered.go similarity index 93% rename from rules/cloud/policies/azure/appservice/account_identity_registered.go rename to checks/cloud/azure/appservice/account_identity_registered.go index 70503dbf..977e9d93 100755 --- a/rules/cloud/policies/azure/appservice/account_identity_registered.go +++ b/checks/cloud/azure/appservice/account_identity_registered.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckAccountIdentityRegistered = rules.Register( +var CheckAccountIdentityRegistered = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0002", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/appservice/account_identity_registered.tf.go b/checks/cloud/azure/appservice/account_identity_registered.tf.go similarity index 100% rename from rules/cloud/policies/azure/appservice/account_identity_registered.tf.go rename to checks/cloud/azure/appservice/account_identity_registered.tf.go diff --git a/rules/cloud/policies/azure/appservice/account_identity_registered_test.go b/checks/cloud/azure/appservice/account_identity_registered_test.go similarity index 100% rename from rules/cloud/policies/azure/appservice/account_identity_registered_test.go rename to checks/cloud/azure/appservice/account_identity_registered_test.go diff --git a/rules/cloud/policies/azure/appservice/authentication_enabled.go b/checks/cloud/azure/appservice/authentication_enabled.go similarity index 93% rename from rules/cloud/policies/azure/appservice/authentication_enabled.go rename to checks/cloud/azure/appservice/authentication_enabled.go index 60b1467a..2f5d5ebe 100755 --- a/rules/cloud/policies/azure/appservice/authentication_enabled.go +++ b/checks/cloud/azure/appservice/authentication_enabled.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckAuthenticationEnabled = rules.Register( +var CheckAuthenticationEnabled = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0003", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/appservice/authentication_enabled.tf.go b/checks/cloud/azure/appservice/authentication_enabled.tf.go similarity index 100% rename from rules/cloud/policies/azure/appservice/authentication_enabled.tf.go rename to checks/cloud/azure/appservice/authentication_enabled.tf.go diff --git a/rules/cloud/policies/azure/appservice/authentication_enabled_test.go b/checks/cloud/azure/appservice/authentication_enabled_test.go similarity index 100% rename from rules/cloud/policies/azure/appservice/authentication_enabled_test.go rename to checks/cloud/azure/appservice/authentication_enabled_test.go diff --git a/rules/cloud/policies/azure/appservice/enable_http2.go b/checks/cloud/azure/appservice/enable_http2.go similarity index 93% rename from rules/cloud/policies/azure/appservice/enable_http2.go rename to checks/cloud/azure/appservice/enable_http2.go index d8abacd3..dff98f3f 100755 --- a/rules/cloud/policies/azure/appservice/enable_http2.go +++ b/checks/cloud/azure/appservice/enable_http2.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableHttp2 = rules.Register( +var CheckEnableHttp2 = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0005", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/appservice/enable_http2.tf.go b/checks/cloud/azure/appservice/enable_http2.tf.go similarity index 100% rename from rules/cloud/policies/azure/appservice/enable_http2.tf.go rename to checks/cloud/azure/appservice/enable_http2.tf.go diff --git a/rules/cloud/policies/azure/appservice/enable_http2_test.go b/checks/cloud/azure/appservice/enable_http2_test.go similarity index 100% rename from rules/cloud/policies/azure/appservice/enable_http2_test.go rename to checks/cloud/azure/appservice/enable_http2_test.go diff --git a/rules/cloud/policies/azure/appservice/enforce_https.go b/checks/cloud/azure/appservice/enforce_https.go similarity index 94% rename from rules/cloud/policies/azure/appservice/enforce_https.go rename to checks/cloud/azure/appservice/enforce_https.go index 09f46b4b..59cc14bc 100755 --- a/rules/cloud/policies/azure/appservice/enforce_https.go +++ b/checks/cloud/azure/appservice/enforce_https.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnforceHttps = rules.Register( +var CheckEnforceHttps = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0004", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/appservice/enforce_https.tf.go b/checks/cloud/azure/appservice/enforce_https.tf.go similarity index 100% rename from rules/cloud/policies/azure/appservice/enforce_https.tf.go rename to checks/cloud/azure/appservice/enforce_https.tf.go diff --git a/rules/cloud/policies/azure/appservice/enforce_https_test.go b/checks/cloud/azure/appservice/enforce_https_test.go similarity index 100% rename from rules/cloud/policies/azure/appservice/enforce_https_test.go rename to checks/cloud/azure/appservice/enforce_https_test.go diff --git a/rules/cloud/policies/azure/appservice/require_client_cert.go b/checks/cloud/azure/appservice/require_client_cert.go similarity index 93% rename from rules/cloud/policies/azure/appservice/require_client_cert.go rename to checks/cloud/azure/appservice/require_client_cert.go index 93bca5fb..8470df76 100755 --- a/rules/cloud/policies/azure/appservice/require_client_cert.go +++ b/checks/cloud/azure/appservice/require_client_cert.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckRequireClientCert = rules.Register( +var CheckRequireClientCert = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0001", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/appservice/require_client_cert.tf.go b/checks/cloud/azure/appservice/require_client_cert.tf.go similarity index 100% rename from rules/cloud/policies/azure/appservice/require_client_cert.tf.go rename to checks/cloud/azure/appservice/require_client_cert.tf.go diff --git a/rules/cloud/policies/azure/appservice/require_client_cert_test.go b/checks/cloud/azure/appservice/require_client_cert_test.go similarity index 100% rename from rules/cloud/policies/azure/appservice/require_client_cert_test.go rename to checks/cloud/azure/appservice/require_client_cert_test.go diff --git a/rules/cloud/policies/azure/appservice/use_secure_tls_policy.go b/checks/cloud/azure/appservice/use_secure_tls_policy.go similarity index 93% rename from rules/cloud/policies/azure/appservice/use_secure_tls_policy.go rename to checks/cloud/azure/appservice/use_secure_tls_policy.go index d028e101..0f5f540a 100755 --- a/rules/cloud/policies/azure/appservice/use_secure_tls_policy.go +++ b/checks/cloud/azure/appservice/use_secure_tls_policy.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckUseSecureTlsPolicy = rules.Register( +var CheckUseSecureTlsPolicy = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0006", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/appservice/use_secure_tls_policy.tf.go b/checks/cloud/azure/appservice/use_secure_tls_policy.tf.go similarity index 100% rename from rules/cloud/policies/azure/appservice/use_secure_tls_policy.tf.go rename to checks/cloud/azure/appservice/use_secure_tls_policy.tf.go diff --git a/rules/cloud/policies/azure/appservice/use_secure_tls_policy_test.go b/checks/cloud/azure/appservice/use_secure_tls_policy_test.go similarity index 100% rename from rules/cloud/policies/azure/appservice/use_secure_tls_policy_test.go rename to checks/cloud/azure/appservice/use_secure_tls_policy_test.go diff --git a/rules/cloud/policies/azure/authorization/limit_role_actions.go b/checks/cloud/azure/authorization/limit_role_actions.go similarity index 94% rename from rules/cloud/policies/azure/authorization/limit_role_actions.go rename to checks/cloud/azure/authorization/limit_role_actions.go index 9a7fe457..508c9515 100755 --- a/rules/cloud/policies/azure/authorization/limit_role_actions.go +++ b/checks/cloud/azure/authorization/limit_role_actions.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckLimitRoleActions = rules.Register( +var CheckLimitRoleActions = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0030", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/authorization/limit_role_actions.tf.go b/checks/cloud/azure/authorization/limit_role_actions.tf.go similarity index 100% rename from rules/cloud/policies/azure/authorization/limit_role_actions.tf.go rename to checks/cloud/azure/authorization/limit_role_actions.tf.go diff --git a/rules/cloud/policies/azure/authorization/limit_role_actions_test.go b/checks/cloud/azure/authorization/limit_role_actions_test.go similarity index 100% rename from rules/cloud/policies/azure/authorization/limit_role_actions_test.go rename to checks/cloud/azure/authorization/limit_role_actions_test.go diff --git a/rules/cloud/policies/azure/compute/disable_password_authentication.go b/checks/cloud/azure/compute/disable_password_authentication.go similarity index 93% rename from rules/cloud/policies/azure/compute/disable_password_authentication.go rename to checks/cloud/azure/compute/disable_password_authentication.go index d2392c3b..e28fe9cf 100755 --- a/rules/cloud/policies/azure/compute/disable_password_authentication.go +++ b/checks/cloud/azure/compute/disable_password_authentication.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckDisablePasswordAuthentication = rules.Register( +var CheckDisablePasswordAuthentication = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0039", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/compute/disable_password_authentication.tf.go b/checks/cloud/azure/compute/disable_password_authentication.tf.go similarity index 100% rename from rules/cloud/policies/azure/compute/disable_password_authentication.tf.go rename to checks/cloud/azure/compute/disable_password_authentication.tf.go diff --git a/rules/cloud/policies/azure/compute/disable_password_authentication_test.go b/checks/cloud/azure/compute/disable_password_authentication_test.go similarity index 100% rename from rules/cloud/policies/azure/compute/disable_password_authentication_test.go rename to checks/cloud/azure/compute/disable_password_authentication_test.go diff --git a/rules/cloud/policies/azure/compute/enable_disk_encryption.go b/checks/cloud/azure/compute/enable_disk_encryption.go similarity index 93% rename from rules/cloud/policies/azure/compute/enable_disk_encryption.go rename to checks/cloud/azure/compute/enable_disk_encryption.go index ab2720b4..4906d267 100755 --- a/rules/cloud/policies/azure/compute/enable_disk_encryption.go +++ b/checks/cloud/azure/compute/enable_disk_encryption.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableDiskEncryption = rules.Register( +var CheckEnableDiskEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0038", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/compute/enable_disk_encryption.tf.go b/checks/cloud/azure/compute/enable_disk_encryption.tf.go similarity index 100% rename from rules/cloud/policies/azure/compute/enable_disk_encryption.tf.go rename to checks/cloud/azure/compute/enable_disk_encryption.tf.go diff --git a/rules/cloud/policies/azure/compute/enable_disk_encryption_test.go b/checks/cloud/azure/compute/enable_disk_encryption_test.go similarity index 100% rename from rules/cloud/policies/azure/compute/enable_disk_encryption_test.go rename to checks/cloud/azure/compute/enable_disk_encryption_test.go diff --git a/rules/cloud/policies/azure/compute/no_secrets_in_custom_data.go b/checks/cloud/azure/compute/no_secrets_in_custom_data.go similarity index 95% rename from rules/cloud/policies/azure/compute/no_secrets_in_custom_data.go rename to checks/cloud/azure/compute/no_secrets_in_custom_data.go index 0d6d2087..092a5167 100755 --- a/rules/cloud/policies/azure/compute/no_secrets_in_custom_data.go +++ b/checks/cloud/azure/compute/no_secrets_in_custom_data.go @@ -5,13 +5,13 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/owenrumney/squealer/pkg/squealer" ) var scanner = squealer.NewStringScanner() -var CheckNoSecretsInCustomData = rules.Register( +var CheckNoSecretsInCustomData = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0037", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/compute/no_secrets_in_custom_data.tf.go b/checks/cloud/azure/compute/no_secrets_in_custom_data.tf.go similarity index 100% rename from rules/cloud/policies/azure/compute/no_secrets_in_custom_data.tf.go rename to checks/cloud/azure/compute/no_secrets_in_custom_data.tf.go diff --git a/rules/cloud/policies/azure/compute/no_secrets_in_custom_data_test.go b/checks/cloud/azure/compute/no_secrets_in_custom_data_test.go similarity index 100% rename from rules/cloud/policies/azure/compute/no_secrets_in_custom_data_test.go rename to checks/cloud/azure/compute/no_secrets_in_custom_data_test.go diff --git a/rules/cloud/policies/azure/container/configured_network_policy.go b/checks/cloud/azure/container/configured_network_policy.go similarity index 93% rename from rules/cloud/policies/azure/container/configured_network_policy.go rename to checks/cloud/azure/container/configured_network_policy.go index 9469f4a8..5f0a789a 100755 --- a/rules/cloud/policies/azure/container/configured_network_policy.go +++ b/checks/cloud/azure/container/configured_network_policy.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckConfiguredNetworkPolicy = rules.Register( +var CheckConfiguredNetworkPolicy = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0043", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/container/configured_network_policy.tf.go b/checks/cloud/azure/container/configured_network_policy.tf.go similarity index 100% rename from rules/cloud/policies/azure/container/configured_network_policy.tf.go rename to checks/cloud/azure/container/configured_network_policy.tf.go diff --git a/rules/cloud/policies/azure/container/configured_network_policy_test.go b/checks/cloud/azure/container/configured_network_policy_test.go similarity index 100% rename from rules/cloud/policies/azure/container/configured_network_policy_test.go rename to checks/cloud/azure/container/configured_network_policy_test.go diff --git a/rules/cloud/policies/azure/container/limit_authorized_ips.go b/checks/cloud/azure/container/limit_authorized_ips.go similarity index 94% rename from rules/cloud/policies/azure/container/limit_authorized_ips.go rename to checks/cloud/azure/container/limit_authorized_ips.go index 198e1931..a7773852 100755 --- a/rules/cloud/policies/azure/container/limit_authorized_ips.go +++ b/checks/cloud/azure/container/limit_authorized_ips.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckLimitAuthorizedIps = rules.Register( +var CheckLimitAuthorizedIps = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0041", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/container/limit_authorized_ips.tf.go b/checks/cloud/azure/container/limit_authorized_ips.tf.go similarity index 100% rename from rules/cloud/policies/azure/container/limit_authorized_ips.tf.go rename to checks/cloud/azure/container/limit_authorized_ips.tf.go diff --git a/rules/cloud/policies/azure/container/limit_authorized_ips_test.go b/checks/cloud/azure/container/limit_authorized_ips_test.go similarity index 100% rename from rules/cloud/policies/azure/container/limit_authorized_ips_test.go rename to checks/cloud/azure/container/limit_authorized_ips_test.go diff --git a/rules/cloud/policies/azure/container/logging.go b/checks/cloud/azure/container/logging.go similarity index 94% rename from rules/cloud/policies/azure/container/logging.go rename to checks/cloud/azure/container/logging.go index 2e389f50..6bf40073 100755 --- a/rules/cloud/policies/azure/container/logging.go +++ b/checks/cloud/azure/container/logging.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckLogging = rules.Register( +var CheckLogging = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0040", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/container/logging.tf.go b/checks/cloud/azure/container/logging.tf.go similarity index 100% rename from rules/cloud/policies/azure/container/logging.tf.go rename to checks/cloud/azure/container/logging.tf.go diff --git a/rules/cloud/policies/azure/container/logging_test.go b/checks/cloud/azure/container/logging_test.go similarity index 100% rename from rules/cloud/policies/azure/container/logging_test.go rename to checks/cloud/azure/container/logging_test.go diff --git a/rules/cloud/policies/azure/container/use_rbac_permissions.go b/checks/cloud/azure/container/use_rbac_permissions.go similarity index 93% rename from rules/cloud/policies/azure/container/use_rbac_permissions.go rename to checks/cloud/azure/container/use_rbac_permissions.go index 394c21f2..399569f1 100755 --- a/rules/cloud/policies/azure/container/use_rbac_permissions.go +++ b/checks/cloud/azure/container/use_rbac_permissions.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckUseRbacPermissions = rules.Register( +var CheckUseRbacPermissions = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0042", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/container/use_rbac_permissions.tf.go b/checks/cloud/azure/container/use_rbac_permissions.tf.go similarity index 100% rename from rules/cloud/policies/azure/container/use_rbac_permissions.tf.go rename to checks/cloud/azure/container/use_rbac_permissions.tf.go diff --git a/rules/cloud/policies/azure/container/use_rbac_permissions_test.go b/checks/cloud/azure/container/use_rbac_permissions_test.go similarity index 100% rename from rules/cloud/policies/azure/container/use_rbac_permissions_test.go rename to checks/cloud/azure/container/use_rbac_permissions_test.go diff --git a/rules/cloud/policies/azure/database/all_threat_alerts_enabled.go b/checks/cloud/azure/database/all_threat_alerts_enabled.go similarity index 93% rename from rules/cloud/policies/azure/database/all_threat_alerts_enabled.go rename to checks/cloud/azure/database/all_threat_alerts_enabled.go index 366a34a3..47939ad4 100755 --- a/rules/cloud/policies/azure/database/all_threat_alerts_enabled.go +++ b/checks/cloud/azure/database/all_threat_alerts_enabled.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckAllThreatAlertsEnabled = rules.Register( +var CheckAllThreatAlertsEnabled = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0028", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/database/all_threat_alerts_enabled.tf.go b/checks/cloud/azure/database/all_threat_alerts_enabled.tf.go similarity index 100% rename from rules/cloud/policies/azure/database/all_threat_alerts_enabled.tf.go rename to checks/cloud/azure/database/all_threat_alerts_enabled.tf.go diff --git a/rules/cloud/policies/azure/database/all_threat_alerts_enabled_test.go b/checks/cloud/azure/database/all_threat_alerts_enabled_test.go similarity index 100% rename from rules/cloud/policies/azure/database/all_threat_alerts_enabled_test.go rename to checks/cloud/azure/database/all_threat_alerts_enabled_test.go diff --git a/rules/cloud/policies/azure/database/enable_audit.go b/checks/cloud/azure/database/enable_audit.go similarity index 94% rename from rules/cloud/policies/azure/database/enable_audit.go rename to checks/cloud/azure/database/enable_audit.go index f6c052e7..736fe402 100755 --- a/rules/cloud/policies/azure/database/enable_audit.go +++ b/checks/cloud/azure/database/enable_audit.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableAudit = rules.Register( +var CheckEnableAudit = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0027", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/database/enable_audit.tf.go b/checks/cloud/azure/database/enable_audit.tf.go similarity index 100% rename from rules/cloud/policies/azure/database/enable_audit.tf.go rename to checks/cloud/azure/database/enable_audit.tf.go diff --git a/rules/cloud/policies/azure/database/enable_audit_test.go b/checks/cloud/azure/database/enable_audit_test.go similarity index 100% rename from rules/cloud/policies/azure/database/enable_audit_test.go rename to checks/cloud/azure/database/enable_audit_test.go diff --git a/rules/cloud/policies/azure/database/enable_ssl_enforcement.go b/checks/cloud/azure/database/enable_ssl_enforcement.go similarity index 95% rename from rules/cloud/policies/azure/database/enable_ssl_enforcement.go rename to checks/cloud/azure/database/enable_ssl_enforcement.go index 3228cdf2..3e7d73b0 100755 --- a/rules/cloud/policies/azure/database/enable_ssl_enforcement.go +++ b/checks/cloud/azure/database/enable_ssl_enforcement.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableSslEnforcement = rules.Register( +var CheckEnableSslEnforcement = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0020", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/database/enable_ssl_enforcement.tf.go b/checks/cloud/azure/database/enable_ssl_enforcement.tf.go similarity index 100% rename from rules/cloud/policies/azure/database/enable_ssl_enforcement.tf.go rename to checks/cloud/azure/database/enable_ssl_enforcement.tf.go diff --git a/rules/cloud/policies/azure/database/enable_ssl_enforcement_test.go b/checks/cloud/azure/database/enable_ssl_enforcement_test.go similarity index 100% rename from rules/cloud/policies/azure/database/enable_ssl_enforcement_test.go rename to checks/cloud/azure/database/enable_ssl_enforcement_test.go diff --git a/rules/cloud/policies/azure/database/no_public_access.go b/checks/cloud/azure/database/no_public_access.go similarity index 96% rename from rules/cloud/policies/azure/database/no_public_access.go rename to checks/cloud/azure/database/no_public_access.go index 8d94806a..6096d5d5 100755 --- a/rules/cloud/policies/azure/database/no_public_access.go +++ b/checks/cloud/azure/database/no_public_access.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicAccess = rules.Register( +var CheckNoPublicAccess = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0022", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/database/no_public_access.tf.go b/checks/cloud/azure/database/no_public_access.tf.go similarity index 100% rename from rules/cloud/policies/azure/database/no_public_access.tf.go rename to checks/cloud/azure/database/no_public_access.tf.go diff --git a/rules/cloud/policies/azure/database/no_public_access_test.go b/checks/cloud/azure/database/no_public_access_test.go similarity index 100% rename from rules/cloud/policies/azure/database/no_public_access_test.go rename to checks/cloud/azure/database/no_public_access_test.go diff --git a/rules/cloud/policies/azure/database/no_public_firewall_access.go b/checks/cloud/azure/database/no_public_firewall_access.go similarity index 97% rename from rules/cloud/policies/azure/database/no_public_firewall_access.go rename to checks/cloud/azure/database/no_public_firewall_access.go index 6de26652..0d01ac1e 100755 --- a/rules/cloud/policies/azure/database/no_public_firewall_access.go +++ b/checks/cloud/azure/database/no_public_firewall_access.go @@ -7,10 +7,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/trivy-policies/internal/cidr" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicFirewallAccess = rules.Register( +var CheckNoPublicFirewallAccess = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0029", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/database/no_public_firewall_access.tf.go b/checks/cloud/azure/database/no_public_firewall_access.tf.go similarity index 100% rename from rules/cloud/policies/azure/database/no_public_firewall_access.tf.go rename to checks/cloud/azure/database/no_public_firewall_access.tf.go diff --git a/rules/cloud/policies/azure/database/no_public_firewall_access_test.go b/checks/cloud/azure/database/no_public_firewall_access_test.go similarity index 100% rename from rules/cloud/policies/azure/database/no_public_firewall_access_test.go rename to checks/cloud/azure/database/no_public_firewall_access_test.go diff --git a/rules/cloud/policies/azure/database/postgres_configuration_connection_throttling.go b/checks/cloud/azure/database/postgres_configuration_connection_throttling.go similarity index 93% rename from rules/cloud/policies/azure/database/postgres_configuration_connection_throttling.go rename to checks/cloud/azure/database/postgres_configuration_connection_throttling.go index cab17c81..bb110979 100755 --- a/rules/cloud/policies/azure/database/postgres_configuration_connection_throttling.go +++ b/checks/cloud/azure/database/postgres_configuration_connection_throttling.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckPostgresConfigurationLogConnectionThrottling = rules.Register( +var CheckPostgresConfigurationLogConnectionThrottling = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0021", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/database/postgres_configuration_connection_throttling.tf.go b/checks/cloud/azure/database/postgres_configuration_connection_throttling.tf.go similarity index 100% rename from rules/cloud/policies/azure/database/postgres_configuration_connection_throttling.tf.go rename to checks/cloud/azure/database/postgres_configuration_connection_throttling.tf.go diff --git a/rules/cloud/policies/azure/database/postgres_configuration_connection_throttling_test.go b/checks/cloud/azure/database/postgres_configuration_connection_throttling_test.go similarity index 100% rename from rules/cloud/policies/azure/database/postgres_configuration_connection_throttling_test.go rename to checks/cloud/azure/database/postgres_configuration_connection_throttling_test.go diff --git a/rules/cloud/policies/azure/database/postgres_configuration_log_checkpoints.go b/checks/cloud/azure/database/postgres_configuration_log_checkpoints.go similarity index 93% rename from rules/cloud/policies/azure/database/postgres_configuration_log_checkpoints.go rename to checks/cloud/azure/database/postgres_configuration_log_checkpoints.go index 3b590f97..b49ad690 100755 --- a/rules/cloud/policies/azure/database/postgres_configuration_log_checkpoints.go +++ b/checks/cloud/azure/database/postgres_configuration_log_checkpoints.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckPostgresConfigurationLogCheckpoints = rules.Register( +var CheckPostgresConfigurationLogCheckpoints = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0024", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/database/postgres_configuration_log_checkpoints.tf.go b/checks/cloud/azure/database/postgres_configuration_log_checkpoints.tf.go similarity index 100% rename from rules/cloud/policies/azure/database/postgres_configuration_log_checkpoints.tf.go rename to checks/cloud/azure/database/postgres_configuration_log_checkpoints.tf.go diff --git a/rules/cloud/policies/azure/database/postgres_configuration_log_checkpoints_test.go b/checks/cloud/azure/database/postgres_configuration_log_checkpoints_test.go similarity index 100% rename from rules/cloud/policies/azure/database/postgres_configuration_log_checkpoints_test.go rename to checks/cloud/azure/database/postgres_configuration_log_checkpoints_test.go diff --git a/rules/cloud/policies/azure/database/postgres_configuration_log_connections.go b/checks/cloud/azure/database/postgres_configuration_log_connections.go similarity index 93% rename from rules/cloud/policies/azure/database/postgres_configuration_log_connections.go rename to checks/cloud/azure/database/postgres_configuration_log_connections.go index 5553c3d2..2aeaf7db 100755 --- a/rules/cloud/policies/azure/database/postgres_configuration_log_connections.go +++ b/checks/cloud/azure/database/postgres_configuration_log_connections.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckPostgresConfigurationLogConnections = rules.Register( +var CheckPostgresConfigurationLogConnections = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0019", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/database/postgres_configuration_log_connections.tf.go b/checks/cloud/azure/database/postgres_configuration_log_connections.tf.go similarity index 100% rename from rules/cloud/policies/azure/database/postgres_configuration_log_connections.tf.go rename to checks/cloud/azure/database/postgres_configuration_log_connections.tf.go diff --git a/rules/cloud/policies/azure/database/postgres_configuration_log_connections_test.go b/checks/cloud/azure/database/postgres_configuration_log_connections_test.go similarity index 100% rename from rules/cloud/policies/azure/database/postgres_configuration_log_connections_test.go rename to checks/cloud/azure/database/postgres_configuration_log_connections_test.go diff --git a/rules/cloud/policies/azure/database/retention_period_set.go b/checks/cloud/azure/database/retention_period_set.go similarity index 94% rename from rules/cloud/policies/azure/database/retention_period_set.go rename to checks/cloud/azure/database/retention_period_set.go index 27ee22ea..eb18b075 100755 --- a/rules/cloud/policies/azure/database/retention_period_set.go +++ b/checks/cloud/azure/database/retention_period_set.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckRetentionPeriodSet = rules.Register( +var CheckRetentionPeriodSet = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0025", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/database/retention_period_set.tf.go b/checks/cloud/azure/database/retention_period_set.tf.go similarity index 100% rename from rules/cloud/policies/azure/database/retention_period_set.tf.go rename to checks/cloud/azure/database/retention_period_set.tf.go diff --git a/rules/cloud/policies/azure/database/retention_period_set_test.go b/checks/cloud/azure/database/retention_period_set_test.go similarity index 100% rename from rules/cloud/policies/azure/database/retention_period_set_test.go rename to checks/cloud/azure/database/retention_period_set_test.go diff --git a/rules/cloud/policies/azure/database/secure_tls_policy.go b/checks/cloud/azure/database/secure_tls_policy.go similarity index 95% rename from rules/cloud/policies/azure/database/secure_tls_policy.go rename to checks/cloud/azure/database/secure_tls_policy.go index c4315b11..7a56b3bb 100755 --- a/rules/cloud/policies/azure/database/secure_tls_policy.go +++ b/checks/cloud/azure/database/secure_tls_policy.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckSecureTlsPolicy = rules.Register( +var CheckSecureTlsPolicy = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0026", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/database/secure_tls_policy.tf.go b/checks/cloud/azure/database/secure_tls_policy.tf.go similarity index 100% rename from rules/cloud/policies/azure/database/secure_tls_policy.tf.go rename to checks/cloud/azure/database/secure_tls_policy.tf.go diff --git a/rules/cloud/policies/azure/database/secure_tls_policy_test.go b/checks/cloud/azure/database/secure_tls_policy_test.go similarity index 100% rename from rules/cloud/policies/azure/database/secure_tls_policy_test.go rename to checks/cloud/azure/database/secure_tls_policy_test.go diff --git a/rules/cloud/policies/azure/database/threat_alert_email_set.go b/checks/cloud/azure/database/threat_alert_email_set.go similarity index 93% rename from rules/cloud/policies/azure/database/threat_alert_email_set.go rename to checks/cloud/azure/database/threat_alert_email_set.go index 96f47d12..0fddf68d 100755 --- a/rules/cloud/policies/azure/database/threat_alert_email_set.go +++ b/checks/cloud/azure/database/threat_alert_email_set.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckThreatAlertEmailSet = rules.Register( +var CheckThreatAlertEmailSet = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0018", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/database/threat_alert_email_set.tf.go b/checks/cloud/azure/database/threat_alert_email_set.tf.go similarity index 100% rename from rules/cloud/policies/azure/database/threat_alert_email_set.tf.go rename to checks/cloud/azure/database/threat_alert_email_set.tf.go diff --git a/rules/cloud/policies/azure/database/threat_alert_email_set_test.go b/checks/cloud/azure/database/threat_alert_email_set_test.go similarity index 100% rename from rules/cloud/policies/azure/database/threat_alert_email_set_test.go rename to checks/cloud/azure/database/threat_alert_email_set_test.go diff --git a/rules/cloud/policies/azure/database/threat_alert_email_to_owner.go b/checks/cloud/azure/database/threat_alert_email_to_owner.go similarity index 93% rename from rules/cloud/policies/azure/database/threat_alert_email_to_owner.go rename to checks/cloud/azure/database/threat_alert_email_to_owner.go index 5cb9f4bb..58f63fb3 100755 --- a/rules/cloud/policies/azure/database/threat_alert_email_to_owner.go +++ b/checks/cloud/azure/database/threat_alert_email_to_owner.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckThreatAlertEmailToOwner = rules.Register( +var CheckThreatAlertEmailToOwner = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0023", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/database/threat_alert_email_to_owner.tf.go b/checks/cloud/azure/database/threat_alert_email_to_owner.tf.go similarity index 100% rename from rules/cloud/policies/azure/database/threat_alert_email_to_owner.tf.go rename to checks/cloud/azure/database/threat_alert_email_to_owner.tf.go diff --git a/rules/cloud/policies/azure/database/threat_alert_email_to_owner_test.go b/checks/cloud/azure/database/threat_alert_email_to_owner_test.go similarity index 100% rename from rules/cloud/policies/azure/database/threat_alert_email_to_owner_test.go rename to checks/cloud/azure/database/threat_alert_email_to_owner_test.go diff --git a/rules/cloud/policies/azure/datafactory/no_public_access.go b/checks/cloud/azure/datafactory/no_public_access.go similarity index 94% rename from rules/cloud/policies/azure/datafactory/no_public_access.go rename to checks/cloud/azure/datafactory/no_public_access.go index 2fdb7c71..c7a99998 100755 --- a/rules/cloud/policies/azure/datafactory/no_public_access.go +++ b/checks/cloud/azure/datafactory/no_public_access.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicAccess = rules.Register( +var CheckNoPublicAccess = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0035", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/datafactory/no_public_access.tf.go b/checks/cloud/azure/datafactory/no_public_access.tf.go similarity index 100% rename from rules/cloud/policies/azure/datafactory/no_public_access.tf.go rename to checks/cloud/azure/datafactory/no_public_access.tf.go diff --git a/rules/cloud/policies/azure/datafactory/no_public_access_test.go b/checks/cloud/azure/datafactory/no_public_access_test.go similarity index 100% rename from rules/cloud/policies/azure/datafactory/no_public_access_test.go rename to checks/cloud/azure/datafactory/no_public_access_test.go diff --git a/rules/cloud/policies/azure/datalake/enable_at_rest_encryption.go b/checks/cloud/azure/datalake/enable_at_rest_encryption.go similarity index 93% rename from rules/cloud/policies/azure/datalake/enable_at_rest_encryption.go rename to checks/cloud/azure/datalake/enable_at_rest_encryption.go index 90c30f37..3a987de8 100755 --- a/rules/cloud/policies/azure/datalake/enable_at_rest_encryption.go +++ b/checks/cloud/azure/datalake/enable_at_rest_encryption.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableAtRestEncryption = rules.Register( +var CheckEnableAtRestEncryption = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0036", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/datalake/enable_at_rest_encryption.tf.go b/checks/cloud/azure/datalake/enable_at_rest_encryption.tf.go similarity index 100% rename from rules/cloud/policies/azure/datalake/enable_at_rest_encryption.tf.go rename to checks/cloud/azure/datalake/enable_at_rest_encryption.tf.go diff --git a/rules/cloud/policies/azure/datalake/enable_at_rest_encryption_test.go b/checks/cloud/azure/datalake/enable_at_rest_encryption_test.go similarity index 100% rename from rules/cloud/policies/azure/datalake/enable_at_rest_encryption_test.go rename to checks/cloud/azure/datalake/enable_at_rest_encryption_test.go diff --git a/rules/cloud/policies/azure/keyvault/content_type_for_secret.go b/checks/cloud/azure/keyvault/content_type_for_secret.go similarity index 94% rename from rules/cloud/policies/azure/keyvault/content_type_for_secret.go rename to checks/cloud/azure/keyvault/content_type_for_secret.go index 8c6f6985..f1ed7415 100755 --- a/rules/cloud/policies/azure/keyvault/content_type_for_secret.go +++ b/checks/cloud/azure/keyvault/content_type_for_secret.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckContentTypeForSecret = rules.Register( +var CheckContentTypeForSecret = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0015", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/keyvault/content_type_for_secret.tf.go b/checks/cloud/azure/keyvault/content_type_for_secret.tf.go similarity index 100% rename from rules/cloud/policies/azure/keyvault/content_type_for_secret.tf.go rename to checks/cloud/azure/keyvault/content_type_for_secret.tf.go diff --git a/rules/cloud/policies/azure/keyvault/content_type_for_secret_test.go b/checks/cloud/azure/keyvault/content_type_for_secret_test.go similarity index 100% rename from rules/cloud/policies/azure/keyvault/content_type_for_secret_test.go rename to checks/cloud/azure/keyvault/content_type_for_secret_test.go diff --git a/rules/cloud/policies/azure/keyvault/ensure_key_expiry.go b/checks/cloud/azure/keyvault/ensure_key_expiry.go similarity index 94% rename from rules/cloud/policies/azure/keyvault/ensure_key_expiry.go rename to checks/cloud/azure/keyvault/ensure_key_expiry.go index 321a0db2..b2581280 100755 --- a/rules/cloud/policies/azure/keyvault/ensure_key_expiry.go +++ b/checks/cloud/azure/keyvault/ensure_key_expiry.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnsureKeyExpiry = rules.Register( +var CheckEnsureKeyExpiry = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0014", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/keyvault/ensure_key_expiry.tf.go b/checks/cloud/azure/keyvault/ensure_key_expiry.tf.go similarity index 100% rename from rules/cloud/policies/azure/keyvault/ensure_key_expiry.tf.go rename to checks/cloud/azure/keyvault/ensure_key_expiry.tf.go diff --git a/rules/cloud/policies/azure/keyvault/ensure_key_expiry_test.go b/checks/cloud/azure/keyvault/ensure_key_expiry_test.go similarity index 100% rename from rules/cloud/policies/azure/keyvault/ensure_key_expiry_test.go rename to checks/cloud/azure/keyvault/ensure_key_expiry_test.go diff --git a/rules/cloud/policies/azure/keyvault/ensure_secret_expiry.go b/checks/cloud/azure/keyvault/ensure_secret_expiry.go similarity index 93% rename from rules/cloud/policies/azure/keyvault/ensure_secret_expiry.go rename to checks/cloud/azure/keyvault/ensure_secret_expiry.go index 4db7cf03..977ecaa1 100755 --- a/rules/cloud/policies/azure/keyvault/ensure_secret_expiry.go +++ b/checks/cloud/azure/keyvault/ensure_secret_expiry.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnsureSecretExpiry = rules.Register( +var CheckEnsureSecretExpiry = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0017", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/keyvault/ensure_secret_expiry.tf.go b/checks/cloud/azure/keyvault/ensure_secret_expiry.tf.go similarity index 100% rename from rules/cloud/policies/azure/keyvault/ensure_secret_expiry.tf.go rename to checks/cloud/azure/keyvault/ensure_secret_expiry.tf.go diff --git a/rules/cloud/policies/azure/keyvault/ensure_secret_expiry_test.go b/checks/cloud/azure/keyvault/ensure_secret_expiry_test.go similarity index 100% rename from rules/cloud/policies/azure/keyvault/ensure_secret_expiry_test.go rename to checks/cloud/azure/keyvault/ensure_secret_expiry_test.go diff --git a/rules/cloud/policies/azure/keyvault/no_purge.go b/checks/cloud/azure/keyvault/no_purge.go similarity index 95% rename from rules/cloud/policies/azure/keyvault/no_purge.go rename to checks/cloud/azure/keyvault/no_purge.go index 2e44e0b4..410fd753 100755 --- a/rules/cloud/policies/azure/keyvault/no_purge.go +++ b/checks/cloud/azure/keyvault/no_purge.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPurge = rules.Register( +var CheckNoPurge = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0016", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/keyvault/no_purge.tf.go b/checks/cloud/azure/keyvault/no_purge.tf.go similarity index 100% rename from rules/cloud/policies/azure/keyvault/no_purge.tf.go rename to checks/cloud/azure/keyvault/no_purge.tf.go diff --git a/rules/cloud/policies/azure/keyvault/no_purge_test.go b/checks/cloud/azure/keyvault/no_purge_test.go similarity index 100% rename from rules/cloud/policies/azure/keyvault/no_purge_test.go rename to checks/cloud/azure/keyvault/no_purge_test.go diff --git a/rules/cloud/policies/azure/keyvault/specify_network_acl.go b/checks/cloud/azure/keyvault/specify_network_acl.go similarity index 94% rename from rules/cloud/policies/azure/keyvault/specify_network_acl.go rename to checks/cloud/azure/keyvault/specify_network_acl.go index 2633379e..0cf45c90 100755 --- a/rules/cloud/policies/azure/keyvault/specify_network_acl.go +++ b/checks/cloud/azure/keyvault/specify_network_acl.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckSpecifyNetworkAcl = rules.Register( +var CheckSpecifyNetworkAcl = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0013", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/keyvault/specify_network_acl.tf.go b/checks/cloud/azure/keyvault/specify_network_acl.tf.go similarity index 100% rename from rules/cloud/policies/azure/keyvault/specify_network_acl.tf.go rename to checks/cloud/azure/keyvault/specify_network_acl.tf.go diff --git a/rules/cloud/policies/azure/keyvault/specify_network_acl_test.go b/checks/cloud/azure/keyvault/specify_network_acl_test.go similarity index 100% rename from rules/cloud/policies/azure/keyvault/specify_network_acl_test.go rename to checks/cloud/azure/keyvault/specify_network_acl_test.go diff --git a/rules/cloud/policies/azure/monitor/activity_log_retention_set.go b/checks/cloud/azure/monitor/activity_log_retention_set.go similarity index 94% rename from rules/cloud/policies/azure/monitor/activity_log_retention_set.go rename to checks/cloud/azure/monitor/activity_log_retention_set.go index 95e3990b..96e292bf 100755 --- a/rules/cloud/policies/azure/monitor/activity_log_retention_set.go +++ b/checks/cloud/azure/monitor/activity_log_retention_set.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckActivityLogRetentionSet = rules.Register( +var CheckActivityLogRetentionSet = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0031", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/monitor/activity_log_retention_set.tf.go b/checks/cloud/azure/monitor/activity_log_retention_set.tf.go similarity index 100% rename from rules/cloud/policies/azure/monitor/activity_log_retention_set.tf.go rename to checks/cloud/azure/monitor/activity_log_retention_set.tf.go diff --git a/rules/cloud/policies/azure/monitor/activity_log_retention_set_test.go b/checks/cloud/azure/monitor/activity_log_retention_set_test.go similarity index 100% rename from rules/cloud/policies/azure/monitor/activity_log_retention_set_test.go rename to checks/cloud/azure/monitor/activity_log_retention_set_test.go diff --git a/rules/cloud/policies/azure/monitor/capture_all_activities.go b/checks/cloud/azure/monitor/capture_all_activities.go similarity index 95% rename from rules/cloud/policies/azure/monitor/capture_all_activities.go rename to checks/cloud/azure/monitor/capture_all_activities.go index 57318a4b..52b697cb 100755 --- a/rules/cloud/policies/azure/monitor/capture_all_activities.go +++ b/checks/cloud/azure/monitor/capture_all_activities.go @@ -9,13 +9,13 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/defsec/pkg/providers" "github.com/aquasecurity/defsec/pkg/providers/azure/monitor" ) -var CheckCaptureAllActivities = rules.Register( +var CheckCaptureAllActivities = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0033", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/monitor/capture_all_activities.tf.go b/checks/cloud/azure/monitor/capture_all_activities.tf.go similarity index 100% rename from rules/cloud/policies/azure/monitor/capture_all_activities.tf.go rename to checks/cloud/azure/monitor/capture_all_activities.tf.go diff --git a/rules/cloud/policies/azure/monitor/capture_all_activities_test.go b/checks/cloud/azure/monitor/capture_all_activities_test.go similarity index 100% rename from rules/cloud/policies/azure/monitor/capture_all_activities_test.go rename to checks/cloud/azure/monitor/capture_all_activities_test.go diff --git a/rules/cloud/policies/azure/monitor/capture_all_regions.go b/checks/cloud/azure/monitor/capture_all_regions.go similarity index 96% rename from rules/cloud/policies/azure/monitor/capture_all_regions.go rename to checks/cloud/azure/monitor/capture_all_regions.go index 56a4d14b..fdbc55c4 100755 --- a/rules/cloud/policies/azure/monitor/capture_all_regions.go +++ b/checks/cloud/azure/monitor/capture_all_regions.go @@ -10,13 +10,13 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/defsec/pkg/providers" "github.com/aquasecurity/defsec/pkg/providers/azure/monitor" ) -var CheckCaptureAllRegions = rules.Register( +var CheckCaptureAllRegions = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0032", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/monitor/capture_all_regions.tf.go b/checks/cloud/azure/monitor/capture_all_regions.tf.go similarity index 100% rename from rules/cloud/policies/azure/monitor/capture_all_regions.tf.go rename to checks/cloud/azure/monitor/capture_all_regions.tf.go diff --git a/rules/cloud/policies/azure/monitor/capture_all_regions_test.go b/checks/cloud/azure/monitor/capture_all_regions_test.go similarity index 100% rename from rules/cloud/policies/azure/monitor/capture_all_regions_test.go rename to checks/cloud/azure/monitor/capture_all_regions_test.go diff --git a/rules/cloud/policies/azure/network/disable_rdp_from_internet.go b/checks/cloud/azure/network/disable_rdp_from_internet.go similarity index 95% rename from rules/cloud/policies/azure/network/disable_rdp_from_internet.go rename to checks/cloud/azure/network/disable_rdp_from_internet.go index aa397293..2b5f9858 100755 --- a/rules/cloud/policies/azure/network/disable_rdp_from_internet.go +++ b/checks/cloud/azure/network/disable_rdp_from_internet.go @@ -7,10 +7,10 @@ import ( "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/defsec/pkg/types" "github.com/aquasecurity/trivy-policies/internal/cidr" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckDisableRdpFromInternet = rules.Register( +var CheckDisableRdpFromInternet = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0048", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/network/disable_rdp_from_internet.tf.go b/checks/cloud/azure/network/disable_rdp_from_internet.tf.go similarity index 100% rename from rules/cloud/policies/azure/network/disable_rdp_from_internet.tf.go rename to checks/cloud/azure/network/disable_rdp_from_internet.tf.go diff --git a/rules/cloud/policies/azure/network/disable_rdp_from_internet_test.go b/checks/cloud/azure/network/disable_rdp_from_internet_test.go similarity index 100% rename from rules/cloud/policies/azure/network/disable_rdp_from_internet_test.go rename to checks/cloud/azure/network/disable_rdp_from_internet_test.go diff --git a/rules/cloud/policies/azure/network/no_public_egress.go b/checks/cloud/azure/network/no_public_egress.go similarity index 90% rename from rules/cloud/policies/azure/network/no_public_egress.go rename to checks/cloud/azure/network/no_public_egress.go index a4e7a895..0322acfa 100755 --- a/rules/cloud/policies/azure/network/no_public_egress.go +++ b/checks/cloud/azure/network/no_public_egress.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/trivy-policies/internal/cidr" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicEgress = rules.Register( +var CheckNoPublicEgress = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0051", Provider: providers.AzureProvider, @@ -18,7 +18,7 @@ var CheckNoPublicEgress = rules.Register( Summary: "An outbound network security rule allows traffic to /0.", Impact: "The port is exposed for egress to the internet", Resolution: "Set a more restrictive cidr range", - Explanation: `Network security rules should not use very broad subnets. + Explanation: `Network security checks should not use very broad subnets. Where possible, segments should be broken into smaller subnets.`, Links: []string{ diff --git a/rules/cloud/policies/azure/network/no_public_egress.tf.go b/checks/cloud/azure/network/no_public_egress.tf.go similarity index 100% rename from rules/cloud/policies/azure/network/no_public_egress.tf.go rename to checks/cloud/azure/network/no_public_egress.tf.go diff --git a/rules/cloud/policies/azure/network/no_public_egress_test.go b/checks/cloud/azure/network/no_public_egress_test.go similarity index 100% rename from rules/cloud/policies/azure/network/no_public_egress_test.go rename to checks/cloud/azure/network/no_public_egress_test.go diff --git a/rules/cloud/policies/azure/network/no_public_ingress.go b/checks/cloud/azure/network/no_public_ingress.go similarity index 91% rename from rules/cloud/policies/azure/network/no_public_ingress.go rename to checks/cloud/azure/network/no_public_ingress.go index 901bb8b6..9aa2ed30 100755 --- a/rules/cloud/policies/azure/network/no_public_ingress.go +++ b/checks/cloud/azure/network/no_public_ingress.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/trivy-policies/internal/cidr" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicIngress = rules.Register( +var CheckNoPublicIngress = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0047", Provider: providers.AzureProvider, @@ -18,7 +18,7 @@ var CheckNoPublicIngress = rules.Register( Summary: "An inbound network security rule allows traffic from /0.", Impact: "The port is exposed for ingress from the internet", Resolution: "Set a more restrictive cidr range", - Explanation: `Network security rules should not use very broad subnets. + Explanation: `Network security checks should not use very broad subnets. Where possible, segments should be broken into smaller subnets.`, Links: []string{ diff --git a/rules/cloud/policies/azure/network/no_public_ingress.tf.go b/checks/cloud/azure/network/no_public_ingress.tf.go similarity index 100% rename from rules/cloud/policies/azure/network/no_public_ingress.tf.go rename to checks/cloud/azure/network/no_public_ingress.tf.go diff --git a/rules/cloud/policies/azure/network/no_public_ingress_test.go b/checks/cloud/azure/network/no_public_ingress_test.go similarity index 100% rename from rules/cloud/policies/azure/network/no_public_ingress_test.go rename to checks/cloud/azure/network/no_public_ingress_test.go diff --git a/rules/cloud/policies/azure/network/retention_policy_set.go b/checks/cloud/azure/network/retention_policy_set.go similarity index 95% rename from rules/cloud/policies/azure/network/retention_policy_set.go rename to checks/cloud/azure/network/retention_policy_set.go index fb0abfad..2c8c4998 100755 --- a/rules/cloud/policies/azure/network/retention_policy_set.go +++ b/checks/cloud/azure/network/retention_policy_set.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckRetentionPolicySet = rules.Register( +var CheckRetentionPolicySet = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0049", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/network/retention_policy_set.tf.go b/checks/cloud/azure/network/retention_policy_set.tf.go similarity index 100% rename from rules/cloud/policies/azure/network/retention_policy_set.tf.go rename to checks/cloud/azure/network/retention_policy_set.tf.go diff --git a/rules/cloud/policies/azure/network/retention_policy_set_test.go b/checks/cloud/azure/network/retention_policy_set_test.go similarity index 100% rename from rules/cloud/policies/azure/network/retention_policy_set_test.go rename to checks/cloud/azure/network/retention_policy_set_test.go diff --git a/rules/cloud/policies/azure/network/ssh_blocked_from_internet.go b/checks/cloud/azure/network/ssh_blocked_from_internet.go similarity index 95% rename from rules/cloud/policies/azure/network/ssh_blocked_from_internet.go rename to checks/cloud/azure/network/ssh_blocked_from_internet.go index d21ff2b9..a8ac9c5c 100755 --- a/rules/cloud/policies/azure/network/ssh_blocked_from_internet.go +++ b/checks/cloud/azure/network/ssh_blocked_from_internet.go @@ -7,10 +7,10 @@ import ( "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/defsec/pkg/types" "github.com/aquasecurity/trivy-policies/internal/cidr" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckSshBlockedFromInternet = rules.Register( +var CheckSshBlockedFromInternet = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0050", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/network/ssh_blocked_from_internet.tf.go b/checks/cloud/azure/network/ssh_blocked_from_internet.tf.go similarity index 100% rename from rules/cloud/policies/azure/network/ssh_blocked_from_internet.tf.go rename to checks/cloud/azure/network/ssh_blocked_from_internet.tf.go diff --git a/rules/cloud/policies/azure/network/ssh_blocked_from_internet_test.go b/checks/cloud/azure/network/ssh_blocked_from_internet_test.go similarity index 100% rename from rules/cloud/policies/azure/network/ssh_blocked_from_internet_test.go rename to checks/cloud/azure/network/ssh_blocked_from_internet_test.go diff --git a/rules/cloud/policies/azure/securitycenter/alert_on_severe_notifications.go b/checks/cloud/azure/securitycenter/alert_on_severe_notifications.go similarity index 93% rename from rules/cloud/policies/azure/securitycenter/alert_on_severe_notifications.go rename to checks/cloud/azure/securitycenter/alert_on_severe_notifications.go index 4daaac5a..1f3a067e 100755 --- a/rules/cloud/policies/azure/securitycenter/alert_on_severe_notifications.go +++ b/checks/cloud/azure/securitycenter/alert_on_severe_notifications.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckAlertOnSevereNotifications = rules.Register( +var CheckAlertOnSevereNotifications = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0044", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/securitycenter/alert_on_severe_notifications.tf.go b/checks/cloud/azure/securitycenter/alert_on_severe_notifications.tf.go similarity index 100% rename from rules/cloud/policies/azure/securitycenter/alert_on_severe_notifications.tf.go rename to checks/cloud/azure/securitycenter/alert_on_severe_notifications.tf.go diff --git a/rules/cloud/policies/azure/securitycenter/alert_on_severe_notifications_test.go b/checks/cloud/azure/securitycenter/alert_on_severe_notifications_test.go similarity index 100% rename from rules/cloud/policies/azure/securitycenter/alert_on_severe_notifications_test.go rename to checks/cloud/azure/securitycenter/alert_on_severe_notifications_test.go diff --git a/rules/cloud/policies/azure/securitycenter/enable_standard_subscription.go b/checks/cloud/azure/securitycenter/enable_standard_subscription.go similarity index 94% rename from rules/cloud/policies/azure/securitycenter/enable_standard_subscription.go rename to checks/cloud/azure/securitycenter/enable_standard_subscription.go index 2feaff4a..e1c5502e 100755 --- a/rules/cloud/policies/azure/securitycenter/enable_standard_subscription.go +++ b/checks/cloud/azure/securitycenter/enable_standard_subscription.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableStandardSubscription = rules.Register( +var CheckEnableStandardSubscription = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0045", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/securitycenter/enable_standard_subscription.tf.go b/checks/cloud/azure/securitycenter/enable_standard_subscription.tf.go similarity index 100% rename from rules/cloud/policies/azure/securitycenter/enable_standard_subscription.tf.go rename to checks/cloud/azure/securitycenter/enable_standard_subscription.tf.go diff --git a/rules/cloud/policies/azure/securitycenter/enable_standard_subscription_test.go b/checks/cloud/azure/securitycenter/enable_standard_subscription_test.go similarity index 100% rename from rules/cloud/policies/azure/securitycenter/enable_standard_subscription_test.go rename to checks/cloud/azure/securitycenter/enable_standard_subscription_test.go diff --git a/rules/cloud/policies/azure/securitycenter/set_required_contact_details.go b/checks/cloud/azure/securitycenter/set_required_contact_details.go similarity index 94% rename from rules/cloud/policies/azure/securitycenter/set_required_contact_details.go rename to checks/cloud/azure/securitycenter/set_required_contact_details.go index 2d55bb6b..86ac35c7 100755 --- a/rules/cloud/policies/azure/securitycenter/set_required_contact_details.go +++ b/checks/cloud/azure/securitycenter/set_required_contact_details.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckSetRequiredContactDetails = rules.Register( +var CheckSetRequiredContactDetails = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0046", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/securitycenter/set_required_contact_details.tf.go b/checks/cloud/azure/securitycenter/set_required_contact_details.tf.go similarity index 100% rename from rules/cloud/policies/azure/securitycenter/set_required_contact_details.tf.go rename to checks/cloud/azure/securitycenter/set_required_contact_details.tf.go diff --git a/rules/cloud/policies/azure/securitycenter/set_required_contact_details_test.go b/checks/cloud/azure/securitycenter/set_required_contact_details_test.go similarity index 100% rename from rules/cloud/policies/azure/securitycenter/set_required_contact_details_test.go rename to checks/cloud/azure/securitycenter/set_required_contact_details_test.go diff --git a/rules/cloud/policies/azure/storage/allow_microsoft_service_bypass.go b/checks/cloud/azure/storage/allow_microsoft_service_bypass.go similarity index 84% rename from rules/cloud/policies/azure/storage/allow_microsoft_service_bypass.go rename to checks/cloud/azure/storage/allow_microsoft_service_bypass.go index e1b44635..b66a26fa 100755 --- a/rules/cloud/policies/azure/storage/allow_microsoft_service_bypass.go +++ b/checks/cloud/azure/storage/allow_microsoft_service_bypass.go @@ -5,21 +5,21 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckAllowMicrosoftServiceBypass = rules.Register( +var CheckAllowMicrosoftServiceBypass = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0010", Provider: providers.AzureProvider, Service: "storage", ShortCode: "allow-microsoft-service-bypass", Summary: "Trusted Microsoft Services should have bypass access to Storage accounts", - Impact: "Trusted Microsoft Services won't be able to access storage account unless rules set to allow", + Impact: "Trusted Microsoft Services won't be able to access storage account unless checks set to allow", Resolution: "Allow Trusted Microsoft Services to bypass", - Explanation: `Some Microsoft services that interact with storage accounts operate from networks that can't be granted access through network rules. + Explanation: `Some Microsoft services that interact with storage accounts operate from networks that can't be granted access through network checks. -To help this type of service work as intended, allow the set of trusted Microsoft services to bypass the network rules`, +To help this type of service work as intended, allow the set of trusted Microsoft services to bypass the network checks`, Links: []string{ "https://docs.microsoft.com/en-us/azure/storage/common/storage-network-security#trusted-microsoft-services", }, @@ -42,7 +42,7 @@ To help this type of service work as intended, allow the set of trusted Microsof } if !found { results.Add( - "Network rules do not allow bypass for Microsoft Services.", + "Network checks do not allow bypass for Microsoft Services.", &rule, ) } else { diff --git a/rules/cloud/policies/azure/storage/allow_microsoft_service_bypass.tf.go b/checks/cloud/azure/storage/allow_microsoft_service_bypass.tf.go similarity index 100% rename from rules/cloud/policies/azure/storage/allow_microsoft_service_bypass.tf.go rename to checks/cloud/azure/storage/allow_microsoft_service_bypass.tf.go diff --git a/rules/cloud/policies/azure/storage/allow_microsoft_service_bypass_test.go b/checks/cloud/azure/storage/allow_microsoft_service_bypass_test.go similarity index 100% rename from rules/cloud/policies/azure/storage/allow_microsoft_service_bypass_test.go rename to checks/cloud/azure/storage/allow_microsoft_service_bypass_test.go diff --git a/rules/cloud/policies/azure/storage/default_action_deny.go b/checks/cloud/azure/storage/default_action_deny.go similarity index 70% rename from rules/cloud/policies/azure/storage/default_action_deny.go rename to checks/cloud/azure/storage/default_action_deny.go index a71ec254..3ba7767c 100755 --- a/rules/cloud/policies/azure/storage/default_action_deny.go +++ b/checks/cloud/azure/storage/default_action_deny.go @@ -5,19 +5,19 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckDefaultActionDeny = rules.Register( +var CheckDefaultActionDeny = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0012", Provider: providers.AzureProvider, Service: "storage", ShortCode: "default-action-deny", - Summary: "The default action on Storage account network rules should be set to deny", - Impact: "Network rules that allow could cause data to be exposed publicly", - Resolution: "Set network rules to deny", - Explanation: `The default_action for network rules should come into effect when no other rules are matched. + Summary: "The default action on Storage account network checks should be set to deny", + Impact: "Network checks that allow could cause data to be exposed publicly", + Resolution: "Set network checks to deny", + Explanation: `The default_action for network checks should come into effect when no other checks are matched. The default action should be set to Deny.`, Links: []string{ @@ -36,7 +36,7 @@ The default action should be set to Deny.`, for _, rule := range account.NetworkRules { if rule.AllowByDefault.IsTrue() { results.Add( - "Network rules allow access by default.", + "Network checks allow access by default.", rule.AllowByDefault, ) } else { diff --git a/rules/cloud/policies/azure/storage/default_action_deny.tf.go b/checks/cloud/azure/storage/default_action_deny.tf.go similarity index 100% rename from rules/cloud/policies/azure/storage/default_action_deny.tf.go rename to checks/cloud/azure/storage/default_action_deny.tf.go diff --git a/rules/cloud/policies/azure/storage/default_action_deny_test.go b/checks/cloud/azure/storage/default_action_deny_test.go similarity index 100% rename from rules/cloud/policies/azure/storage/default_action_deny_test.go rename to checks/cloud/azure/storage/default_action_deny_test.go diff --git a/rules/cloud/policies/azure/storage/enforce_https.go b/checks/cloud/azure/storage/enforce_https.go similarity index 95% rename from rules/cloud/policies/azure/storage/enforce_https.go rename to checks/cloud/azure/storage/enforce_https.go index ef1246b9..1997e493 100755 --- a/rules/cloud/policies/azure/storage/enforce_https.go +++ b/checks/cloud/azure/storage/enforce_https.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnforceHttps = rules.Register( +var CheckEnforceHttps = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0008", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/storage/enforce_https.tf.go b/checks/cloud/azure/storage/enforce_https.tf.go similarity index 100% rename from rules/cloud/policies/azure/storage/enforce_https.tf.go rename to checks/cloud/azure/storage/enforce_https.tf.go diff --git a/rules/cloud/policies/azure/storage/enforce_https_test.go b/checks/cloud/azure/storage/enforce_https_test.go similarity index 100% rename from rules/cloud/policies/azure/storage/enforce_https_test.go rename to checks/cloud/azure/storage/enforce_https_test.go diff --git a/rules/cloud/policies/azure/storage/no_public_access.go b/checks/cloud/azure/storage/no_public_access.go similarity index 94% rename from rules/cloud/policies/azure/storage/no_public_access.go rename to checks/cloud/azure/storage/no_public_access.go index 33bf1993..9925e48a 100755 --- a/rules/cloud/policies/azure/storage/no_public_access.go +++ b/checks/cloud/azure/storage/no_public_access.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicAccess = rules.Register( +var CheckNoPublicAccess = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0007", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/storage/no_public_access.tf.go b/checks/cloud/azure/storage/no_public_access.tf.go similarity index 100% rename from rules/cloud/policies/azure/storage/no_public_access.tf.go rename to checks/cloud/azure/storage/no_public_access.tf.go diff --git a/rules/cloud/policies/azure/storage/no_public_access_test.go b/checks/cloud/azure/storage/no_public_access_test.go similarity index 100% rename from rules/cloud/policies/azure/storage/no_public_access_test.go rename to checks/cloud/azure/storage/no_public_access_test.go diff --git a/rules/cloud/policies/azure/storage/queue_services_logging_enabled.go b/checks/cloud/azure/storage/queue_services_logging_enabled.go similarity index 94% rename from rules/cloud/policies/azure/storage/queue_services_logging_enabled.go rename to checks/cloud/azure/storage/queue_services_logging_enabled.go index e5b5b1fc..bceea587 100755 --- a/rules/cloud/policies/azure/storage/queue_services_logging_enabled.go +++ b/checks/cloud/azure/storage/queue_services_logging_enabled.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckQueueServicesLoggingEnabled = rules.Register( +var CheckQueueServicesLoggingEnabled = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0009", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/storage/queue_services_logging_enabled.tf.go b/checks/cloud/azure/storage/queue_services_logging_enabled.tf.go similarity index 100% rename from rules/cloud/policies/azure/storage/queue_services_logging_enabled.tf.go rename to checks/cloud/azure/storage/queue_services_logging_enabled.tf.go diff --git a/rules/cloud/policies/azure/storage/queue_services_logging_enabled_test.go b/checks/cloud/azure/storage/queue_services_logging_enabled_test.go similarity index 100% rename from rules/cloud/policies/azure/storage/queue_services_logging_enabled_test.go rename to checks/cloud/azure/storage/queue_services_logging_enabled_test.go diff --git a/rules/cloud/policies/azure/storage/use_secure_tls_policy.go b/checks/cloud/azure/storage/use_secure_tls_policy.go similarity index 94% rename from rules/cloud/policies/azure/storage/use_secure_tls_policy.go rename to checks/cloud/azure/storage/use_secure_tls_policy.go index db383697..bf56cfb6 100755 --- a/rules/cloud/policies/azure/storage/use_secure_tls_policy.go +++ b/checks/cloud/azure/storage/use_secure_tls_policy.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckUseSecureTlsPolicy = rules.Register( +var CheckUseSecureTlsPolicy = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0011", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/storage/use_secure_tls_policy.tf.go b/checks/cloud/azure/storage/use_secure_tls_policy.tf.go similarity index 100% rename from rules/cloud/policies/azure/storage/use_secure_tls_policy.tf.go rename to checks/cloud/azure/storage/use_secure_tls_policy.tf.go diff --git a/rules/cloud/policies/azure/storage/use_secure_tls_policy_test.go b/checks/cloud/azure/storage/use_secure_tls_policy_test.go similarity index 100% rename from rules/cloud/policies/azure/storage/use_secure_tls_policy_test.go rename to checks/cloud/azure/storage/use_secure_tls_policy_test.go diff --git a/rules/cloud/policies/azure/synapse/virtual_network_enabled.go b/checks/cloud/azure/synapse/virtual_network_enabled.go similarity index 95% rename from rules/cloud/policies/azure/synapse/virtual_network_enabled.go rename to checks/cloud/azure/synapse/virtual_network_enabled.go index 24adfdf6..368a46c9 100755 --- a/rules/cloud/policies/azure/synapse/virtual_network_enabled.go +++ b/checks/cloud/azure/synapse/virtual_network_enabled.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckVirtualNetworkEnabled = rules.Register( +var CheckVirtualNetworkEnabled = checks.Register( scan.Rule{ AVDID: "AVD-AZU-0034", Provider: providers.AzureProvider, diff --git a/rules/cloud/policies/azure/synapse/virtual_network_enabled.tf.go b/checks/cloud/azure/synapse/virtual_network_enabled.tf.go similarity index 100% rename from rules/cloud/policies/azure/synapse/virtual_network_enabled.tf.go rename to checks/cloud/azure/synapse/virtual_network_enabled.tf.go diff --git a/rules/cloud/policies/azure/synapse/virtual_network_enabled_test.go b/checks/cloud/azure/synapse/virtual_network_enabled_test.go similarity index 100% rename from rules/cloud/policies/azure/synapse/virtual_network_enabled_test.go rename to checks/cloud/azure/synapse/virtual_network_enabled_test.go diff --git a/rules/cloud/policies/cloudstack/compute/no_sensitive_info.go b/checks/cloud/cloudstack/compute/no_sensitive_info.go similarity index 94% rename from rules/cloud/policies/cloudstack/compute/no_sensitive_info.go rename to checks/cloud/cloudstack/compute/no_sensitive_info.go index dba3585b..f246ff03 100755 --- a/rules/cloud/policies/cloudstack/compute/no_sensitive_info.go +++ b/checks/cloud/cloudstack/compute/no_sensitive_info.go @@ -5,13 +5,13 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/owenrumney/squealer/pkg/squealer" ) var scanner = squealer.NewStringScanner() -var CheckNoSensitiveInfo = rules.Register( +var CheckNoSensitiveInfo = checks.Register( scan.Rule{ AVDID: "AVD-CLDSTK-0001", Provider: providers.CloudStackProvider, diff --git a/rules/cloud/policies/cloudstack/compute/no_sensitive_info.tf.go b/checks/cloud/cloudstack/compute/no_sensitive_info.tf.go similarity index 100% rename from rules/cloud/policies/cloudstack/compute/no_sensitive_info.tf.go rename to checks/cloud/cloudstack/compute/no_sensitive_info.tf.go diff --git a/rules/cloud/policies/cloudstack/compute/no_sensitive_info_test.go b/checks/cloud/cloudstack/compute/no_sensitive_info_test.go similarity index 100% rename from rules/cloud/policies/cloudstack/compute/no_sensitive_info_test.go rename to checks/cloud/cloudstack/compute/no_sensitive_info_test.go diff --git a/rules/cloud/policies/digitalocean/compute/auto_upgrade_no_maintenance_policy.go b/checks/cloud/digitalocean/compute/auto_upgrade_no_maintenance_policy.go similarity index 94% rename from rules/cloud/policies/digitalocean/compute/auto_upgrade_no_maintenance_policy.go rename to checks/cloud/digitalocean/compute/auto_upgrade_no_maintenance_policy.go index 4364b058..fda1bf8e 100644 --- a/rules/cloud/policies/digitalocean/compute/auto_upgrade_no_maintenance_policy.go +++ b/checks/cloud/digitalocean/compute/auto_upgrade_no_maintenance_policy.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckAutoUpgrade = rules.Register( +var CheckAutoUpgrade = checks.Register( scan.Rule{ AVDID: "AVD-DIG-0008", Provider: providers.DigitalOceanProvider, diff --git a/rules/cloud/policies/digitalocean/compute/auto_upgrade_no_maintenance_policy.tf.go b/checks/cloud/digitalocean/compute/auto_upgrade_no_maintenance_policy.tf.go similarity index 100% rename from rules/cloud/policies/digitalocean/compute/auto_upgrade_no_maintenance_policy.tf.go rename to checks/cloud/digitalocean/compute/auto_upgrade_no_maintenance_policy.tf.go diff --git a/rules/cloud/policies/digitalocean/compute/auto_upgrade_no_maintenance_policy_test.go b/checks/cloud/digitalocean/compute/auto_upgrade_no_maintenance_policy_test.go similarity index 100% rename from rules/cloud/policies/digitalocean/compute/auto_upgrade_no_maintenance_policy_test.go rename to checks/cloud/digitalocean/compute/auto_upgrade_no_maintenance_policy_test.go diff --git a/rules/cloud/policies/digitalocean/compute/enforce_https.go b/checks/cloud/digitalocean/compute/enforce_https.go similarity index 94% rename from rules/cloud/policies/digitalocean/compute/enforce_https.go rename to checks/cloud/digitalocean/compute/enforce_https.go index 7c03108c..5a535395 100755 --- a/rules/cloud/policies/digitalocean/compute/enforce_https.go +++ b/checks/cloud/digitalocean/compute/enforce_https.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnforceHttps = rules.Register( +var CheckEnforceHttps = checks.Register( scan.Rule{ AVDID: "AVD-DIG-0002", Provider: providers.DigitalOceanProvider, diff --git a/rules/cloud/policies/digitalocean/compute/enforce_https.tf.go b/checks/cloud/digitalocean/compute/enforce_https.tf.go similarity index 100% rename from rules/cloud/policies/digitalocean/compute/enforce_https.tf.go rename to checks/cloud/digitalocean/compute/enforce_https.tf.go diff --git a/rules/cloud/policies/digitalocean/compute/enforce_https_test.go b/checks/cloud/digitalocean/compute/enforce_https_test.go similarity index 100% rename from rules/cloud/policies/digitalocean/compute/enforce_https_test.go rename to checks/cloud/digitalocean/compute/enforce_https_test.go diff --git a/rules/cloud/policies/digitalocean/compute/kubernetes_surge_upgrades.go b/checks/cloud/digitalocean/compute/kubernetes_surge_upgrades.go similarity index 94% rename from rules/cloud/policies/digitalocean/compute/kubernetes_surge_upgrades.go rename to checks/cloud/digitalocean/compute/kubernetes_surge_upgrades.go index 298f8a44..d23c7b4e 100644 --- a/rules/cloud/policies/digitalocean/compute/kubernetes_surge_upgrades.go +++ b/checks/cloud/digitalocean/compute/kubernetes_surge_upgrades.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckKubernetesSurgeUpgrades = rules.Register( +var CheckKubernetesSurgeUpgrades = checks.Register( scan.Rule{ AVDID: "AVD-DIG-0005", Provider: providers.DigitalOceanProvider, diff --git a/rules/cloud/policies/digitalocean/compute/kubernetes_surge_upgrades.tf.go b/checks/cloud/digitalocean/compute/kubernetes_surge_upgrades.tf.go similarity index 100% rename from rules/cloud/policies/digitalocean/compute/kubernetes_surge_upgrades.tf.go rename to checks/cloud/digitalocean/compute/kubernetes_surge_upgrades.tf.go diff --git a/rules/cloud/policies/digitalocean/compute/kubernetes_surge_upgrades_test.go b/checks/cloud/digitalocean/compute/kubernetes_surge_upgrades_test.go similarity index 100% rename from rules/cloud/policies/digitalocean/compute/kubernetes_surge_upgrades_test.go rename to checks/cloud/digitalocean/compute/kubernetes_surge_upgrades_test.go diff --git a/rules/cloud/policies/digitalocean/compute/no_public_egress.go b/checks/cloud/digitalocean/compute/no_public_egress.go similarity index 94% rename from rules/cloud/policies/digitalocean/compute/no_public_egress.go rename to checks/cloud/digitalocean/compute/no_public_egress.go index c92f178c..9a84f2d1 100755 --- a/rules/cloud/policies/digitalocean/compute/no_public_egress.go +++ b/checks/cloud/digitalocean/compute/no_public_egress.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/trivy-policies/internal/cidr" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicEgress = rules.Register( +var CheckNoPublicEgress = checks.Register( scan.Rule{ AVDID: "AVD-DIG-0003", Provider: providers.DigitalOceanProvider, diff --git a/rules/cloud/policies/digitalocean/compute/no_public_egress.tf.go b/checks/cloud/digitalocean/compute/no_public_egress.tf.go similarity index 100% rename from rules/cloud/policies/digitalocean/compute/no_public_egress.tf.go rename to checks/cloud/digitalocean/compute/no_public_egress.tf.go diff --git a/rules/cloud/policies/digitalocean/compute/no_public_egress_test.go b/checks/cloud/digitalocean/compute/no_public_egress_test.go similarity index 100% rename from rules/cloud/policies/digitalocean/compute/no_public_egress_test.go rename to checks/cloud/digitalocean/compute/no_public_egress_test.go diff --git a/rules/cloud/policies/digitalocean/compute/no_public_ingress.go b/checks/cloud/digitalocean/compute/no_public_ingress.go similarity index 94% rename from rules/cloud/policies/digitalocean/compute/no_public_ingress.go rename to checks/cloud/digitalocean/compute/no_public_ingress.go index 01d8a2d6..b872d2a3 100755 --- a/rules/cloud/policies/digitalocean/compute/no_public_ingress.go +++ b/checks/cloud/digitalocean/compute/no_public_ingress.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/trivy-policies/internal/cidr" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicIngress = rules.Register( +var CheckNoPublicIngress = checks.Register( scan.Rule{ AVDID: "AVD-DIG-0001", Provider: providers.DigitalOceanProvider, diff --git a/rules/cloud/policies/digitalocean/compute/no_public_ingress.tf.go b/checks/cloud/digitalocean/compute/no_public_ingress.tf.go similarity index 100% rename from rules/cloud/policies/digitalocean/compute/no_public_ingress.tf.go rename to checks/cloud/digitalocean/compute/no_public_ingress.tf.go diff --git a/rules/cloud/policies/digitalocean/compute/no_public_ingress_test.go b/checks/cloud/digitalocean/compute/no_public_ingress_test.go similarity index 100% rename from rules/cloud/policies/digitalocean/compute/no_public_ingress_test.go rename to checks/cloud/digitalocean/compute/no_public_ingress_test.go diff --git a/rules/cloud/policies/digitalocean/compute/use_ssh_keys.go b/checks/cloud/digitalocean/compute/use_ssh_keys.go similarity index 94% rename from rules/cloud/policies/digitalocean/compute/use_ssh_keys.go rename to checks/cloud/digitalocean/compute/use_ssh_keys.go index 6ac25680..d8bdb852 100755 --- a/rules/cloud/policies/digitalocean/compute/use_ssh_keys.go +++ b/checks/cloud/digitalocean/compute/use_ssh_keys.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckUseSshKeys = rules.Register( +var CheckUseSshKeys = checks.Register( scan.Rule{ AVDID: "AVD-DIG-0004", Provider: providers.DigitalOceanProvider, diff --git a/rules/cloud/policies/digitalocean/compute/use_ssh_keys.tf.go b/checks/cloud/digitalocean/compute/use_ssh_keys.tf.go similarity index 100% rename from rules/cloud/policies/digitalocean/compute/use_ssh_keys.tf.go rename to checks/cloud/digitalocean/compute/use_ssh_keys.tf.go diff --git a/rules/cloud/policies/digitalocean/compute/use_ssh_keys_test.go b/checks/cloud/digitalocean/compute/use_ssh_keys_test.go similarity index 100% rename from rules/cloud/policies/digitalocean/compute/use_ssh_keys_test.go rename to checks/cloud/digitalocean/compute/use_ssh_keys_test.go diff --git a/rules/cloud/policies/digitalocean/spaces/acl_no_public_read.go b/checks/cloud/digitalocean/spaces/acl_no_public_read.go similarity index 94% rename from rules/cloud/policies/digitalocean/spaces/acl_no_public_read.go rename to checks/cloud/digitalocean/spaces/acl_no_public_read.go index 308dc287..7af552ae 100755 --- a/rules/cloud/policies/digitalocean/spaces/acl_no_public_read.go +++ b/checks/cloud/digitalocean/spaces/acl_no_public_read.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckAclNoPublicRead = rules.Register( +var CheckAclNoPublicRead = checks.Register( scan.Rule{ AVDID: "AVD-DIG-0006", Provider: providers.DigitalOceanProvider, diff --git a/rules/cloud/policies/digitalocean/spaces/acl_no_public_read.tf.go b/checks/cloud/digitalocean/spaces/acl_no_public_read.tf.go similarity index 100% rename from rules/cloud/policies/digitalocean/spaces/acl_no_public_read.tf.go rename to checks/cloud/digitalocean/spaces/acl_no_public_read.tf.go diff --git a/rules/cloud/policies/digitalocean/spaces/acl_no_public_read_test.go b/checks/cloud/digitalocean/spaces/acl_no_public_read_test.go similarity index 100% rename from rules/cloud/policies/digitalocean/spaces/acl_no_public_read_test.go rename to checks/cloud/digitalocean/spaces/acl_no_public_read_test.go diff --git a/rules/cloud/policies/digitalocean/spaces/disable_force_destroy.go b/checks/cloud/digitalocean/spaces/disable_force_destroy.go similarity index 93% rename from rules/cloud/policies/digitalocean/spaces/disable_force_destroy.go rename to checks/cloud/digitalocean/spaces/disable_force_destroy.go index d974000c..d8bc4cee 100755 --- a/rules/cloud/policies/digitalocean/spaces/disable_force_destroy.go +++ b/checks/cloud/digitalocean/spaces/disable_force_destroy.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckDisableForceDestroy = rules.Register( +var CheckDisableForceDestroy = checks.Register( scan.Rule{ AVDID: "AVD-DIG-0009", Provider: providers.DigitalOceanProvider, diff --git a/rules/cloud/policies/digitalocean/spaces/disable_force_destroy.tf.go b/checks/cloud/digitalocean/spaces/disable_force_destroy.tf.go similarity index 100% rename from rules/cloud/policies/digitalocean/spaces/disable_force_destroy.tf.go rename to checks/cloud/digitalocean/spaces/disable_force_destroy.tf.go diff --git a/rules/cloud/policies/digitalocean/spaces/disable_force_destroy_test.go b/checks/cloud/digitalocean/spaces/disable_force_destroy_test.go similarity index 100% rename from rules/cloud/policies/digitalocean/spaces/disable_force_destroy_test.go rename to checks/cloud/digitalocean/spaces/disable_force_destroy_test.go diff --git a/rules/cloud/policies/digitalocean/spaces/versioning_enabled.go b/checks/cloud/digitalocean/spaces/versioning_enabled.go similarity index 94% rename from rules/cloud/policies/digitalocean/spaces/versioning_enabled.go rename to checks/cloud/digitalocean/spaces/versioning_enabled.go index a98a93b7..9ac78c5d 100755 --- a/rules/cloud/policies/digitalocean/spaces/versioning_enabled.go +++ b/checks/cloud/digitalocean/spaces/versioning_enabled.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckVersioningEnabled = rules.Register( +var CheckVersioningEnabled = checks.Register( scan.Rule{ AVDID: "AVD-DIG-0007", Provider: providers.DigitalOceanProvider, diff --git a/rules/cloud/policies/digitalocean/spaces/versioning_enabled.tf.go b/checks/cloud/digitalocean/spaces/versioning_enabled.tf.go similarity index 100% rename from rules/cloud/policies/digitalocean/spaces/versioning_enabled.tf.go rename to checks/cloud/digitalocean/spaces/versioning_enabled.tf.go diff --git a/rules/cloud/policies/digitalocean/spaces/versioning_enabled_test.go b/checks/cloud/digitalocean/spaces/versioning_enabled_test.go similarity index 100% rename from rules/cloud/policies/digitalocean/spaces/versioning_enabled_test.go rename to checks/cloud/digitalocean/spaces/versioning_enabled_test.go diff --git a/rules/cloud/policies/github/actions/no_plain_text_action_secrets.go b/checks/cloud/github/actions/no_plain_text_action_secrets.go similarity index 94% rename from rules/cloud/policies/github/actions/no_plain_text_action_secrets.go rename to checks/cloud/github/actions/no_plain_text_action_secrets.go index 439c548d..cd8a1f93 100644 --- a/rules/cloud/policies/github/actions/no_plain_text_action_secrets.go +++ b/checks/cloud/github/actions/no_plain_text_action_secrets.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPlainTextActionEnvironmentSecrets = rules.Register( +var CheckNoPlainTextActionEnvironmentSecrets = checks.Register( scan.Rule{ AVDID: "AVD-GIT-0002", Provider: providers.GitHubProvider, diff --git a/rules/cloud/policies/github/actions/no_plain_text_action_secrets.tf.go b/checks/cloud/github/actions/no_plain_text_action_secrets.tf.go similarity index 100% rename from rules/cloud/policies/github/actions/no_plain_text_action_secrets.tf.go rename to checks/cloud/github/actions/no_plain_text_action_secrets.tf.go diff --git a/rules/cloud/policies/github/actions/no_plain_text_action_secrets_test.go b/checks/cloud/github/actions/no_plain_text_action_secrets_test.go similarity index 100% rename from rules/cloud/policies/github/actions/no_plain_text_action_secrets_test.go rename to checks/cloud/github/actions/no_plain_text_action_secrets_test.go diff --git a/rules/cloud/policies/github/branch_protections/require_signed_commits.go b/checks/cloud/github/branch_protections/require_signed_commits.go similarity index 94% rename from rules/cloud/policies/github/branch_protections/require_signed_commits.go rename to checks/cloud/github/branch_protections/require_signed_commits.go index 35980530..e18cd4ce 100755 --- a/rules/cloud/policies/github/branch_protections/require_signed_commits.go +++ b/checks/cloud/github/branch_protections/require_signed_commits.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckRequireSignedCommits = rules.Register( +var CheckRequireSignedCommits = checks.Register( scan.Rule{ AVDID: "AVD-GIT-0004", Provider: providers.GitHubProvider, diff --git a/rules/cloud/policies/github/branch_protections/require_signed_commits.tf.go b/checks/cloud/github/branch_protections/require_signed_commits.tf.go similarity index 100% rename from rules/cloud/policies/github/branch_protections/require_signed_commits.tf.go rename to checks/cloud/github/branch_protections/require_signed_commits.tf.go diff --git a/rules/cloud/policies/github/branch_protections/require_signed_commits_test.go b/checks/cloud/github/branch_protections/require_signed_commits_test.go similarity index 100% rename from rules/cloud/policies/github/branch_protections/require_signed_commits_test.go rename to checks/cloud/github/branch_protections/require_signed_commits_test.go diff --git a/rules/cloud/policies/github/repositories/enable_vulnerability_alerts.go b/checks/cloud/github/repositories/enable_vulnerability_alerts.go similarity index 94% rename from rules/cloud/policies/github/repositories/enable_vulnerability_alerts.go rename to checks/cloud/github/repositories/enable_vulnerability_alerts.go index ed727202..fd37f332 100755 --- a/rules/cloud/policies/github/repositories/enable_vulnerability_alerts.go +++ b/checks/cloud/github/repositories/enable_vulnerability_alerts.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableVulnerabilityAlerts = rules.Register( +var CheckEnableVulnerabilityAlerts = checks.Register( scan.Rule{ AVDID: "AVD-GIT-0003", Provider: providers.GitHubProvider, diff --git a/rules/cloud/policies/github/repositories/enable_vulnerability_alerts.tf.go b/checks/cloud/github/repositories/enable_vulnerability_alerts.tf.go similarity index 100% rename from rules/cloud/policies/github/repositories/enable_vulnerability_alerts.tf.go rename to checks/cloud/github/repositories/enable_vulnerability_alerts.tf.go diff --git a/rules/cloud/policies/github/repositories/enable_vulnerability_alerts_test.go b/checks/cloud/github/repositories/enable_vulnerability_alerts_test.go similarity index 100% rename from rules/cloud/policies/github/repositories/enable_vulnerability_alerts_test.go rename to checks/cloud/github/repositories/enable_vulnerability_alerts_test.go diff --git a/rules/cloud/policies/github/repositories/private.go b/checks/cloud/github/repositories/private.go similarity index 94% rename from rules/cloud/policies/github/repositories/private.go rename to checks/cloud/github/repositories/private.go index 3623d336..e963d60e 100755 --- a/rules/cloud/policies/github/repositories/private.go +++ b/checks/cloud/github/repositories/private.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckPrivate = rules.Register( +var CheckPrivate = checks.Register( scan.Rule{ AVDID: "AVD-GIT-0001", Provider: providers.GitHubProvider, diff --git a/rules/cloud/policies/github/repositories/private.tf.go b/checks/cloud/github/repositories/private.tf.go similarity index 100% rename from rules/cloud/policies/github/repositories/private.tf.go rename to checks/cloud/github/repositories/private.tf.go diff --git a/rules/cloud/policies/github/repositories/private_test.go b/checks/cloud/github/repositories/private_test.go similarity index 100% rename from rules/cloud/policies/github/repositories/private_test.go rename to checks/cloud/github/repositories/private_test.go diff --git a/rules/cloud/policies/google/bigquery/no_public_access.go b/checks/cloud/google/bigquery/no_public_access.go similarity index 94% rename from rules/cloud/policies/google/bigquery/no_public_access.go rename to checks/cloud/google/bigquery/no_public_access.go index eabeb4c5..c57c0737 100755 --- a/rules/cloud/policies/google/bigquery/no_public_access.go +++ b/checks/cloud/google/bigquery/no_public_access.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicAccess = rules.Register( +var CheckNoPublicAccess = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0046", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/bigquery/no_public_access.tf.go b/checks/cloud/google/bigquery/no_public_access.tf.go similarity index 100% rename from rules/cloud/policies/google/bigquery/no_public_access.tf.go rename to checks/cloud/google/bigquery/no_public_access.tf.go diff --git a/rules/cloud/policies/google/bigquery/no_public_access_test.go b/checks/cloud/google/bigquery/no_public_access_test.go similarity index 100% rename from rules/cloud/policies/google/bigquery/no_public_access_test.go rename to checks/cloud/google/bigquery/no_public_access_test.go diff --git a/rules/cloud/policies/google/compute/disk_encryption_customer_key.go b/checks/cloud/google/compute/disk_encryption_customer_key.go similarity index 93% rename from rules/cloud/policies/google/compute/disk_encryption_customer_key.go rename to checks/cloud/google/compute/disk_encryption_customer_key.go index fc890a7d..06e0ccbd 100755 --- a/rules/cloud/policies/google/compute/disk_encryption_customer_key.go +++ b/checks/cloud/google/compute/disk_encryption_customer_key.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckDiskEncryptionCustomerKey = rules.Register( +var CheckDiskEncryptionCustomerKey = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0034", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/compute/disk_encryption_customer_key.tf.go b/checks/cloud/google/compute/disk_encryption_customer_key.tf.go similarity index 100% rename from rules/cloud/policies/google/compute/disk_encryption_customer_key.tf.go rename to checks/cloud/google/compute/disk_encryption_customer_key.tf.go diff --git a/rules/cloud/policies/google/compute/disk_encryption_customer_key_test.go b/checks/cloud/google/compute/disk_encryption_customer_key_test.go similarity index 100% rename from rules/cloud/policies/google/compute/disk_encryption_customer_key_test.go rename to checks/cloud/google/compute/disk_encryption_customer_key_test.go diff --git a/rules/cloud/policies/google/compute/disk_encryption_no_plaintext_key.go b/checks/cloud/google/compute/disk_encryption_no_plaintext_key.go similarity index 94% rename from rules/cloud/policies/google/compute/disk_encryption_no_plaintext_key.go rename to checks/cloud/google/compute/disk_encryption_no_plaintext_key.go index 8b5b9768..459cc332 100755 --- a/rules/cloud/policies/google/compute/disk_encryption_no_plaintext_key.go +++ b/checks/cloud/google/compute/disk_encryption_no_plaintext_key.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckDiskEncryptionRequired = rules.Register( +var CheckDiskEncryptionRequired = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0037", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/compute/disk_encryption_no_plaintext_key.tf.go b/checks/cloud/google/compute/disk_encryption_no_plaintext_key.tf.go similarity index 100% rename from rules/cloud/policies/google/compute/disk_encryption_no_plaintext_key.tf.go rename to checks/cloud/google/compute/disk_encryption_no_plaintext_key.tf.go diff --git a/rules/cloud/policies/google/compute/disk_encryption_no_plaintext_key_test.go b/checks/cloud/google/compute/disk_encryption_no_plaintext_key_test.go similarity index 100% rename from rules/cloud/policies/google/compute/disk_encryption_no_plaintext_key_test.go rename to checks/cloud/google/compute/disk_encryption_no_plaintext_key_test.go diff --git a/rules/cloud/policies/google/compute/enable_shielded_vm_im.go b/checks/cloud/google/compute/enable_shielded_vm_im.go similarity index 93% rename from rules/cloud/policies/google/compute/enable_shielded_vm_im.go rename to checks/cloud/google/compute/enable_shielded_vm_im.go index 7392ba9d..79c639d9 100755 --- a/rules/cloud/policies/google/compute/enable_shielded_vm_im.go +++ b/checks/cloud/google/compute/enable_shielded_vm_im.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableShieldedVMIntegrityMonitoring = rules.Register( +var CheckEnableShieldedVMIntegrityMonitoring = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0045", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/compute/enable_shielded_vm_im.tf.go b/checks/cloud/google/compute/enable_shielded_vm_im.tf.go similarity index 100% rename from rules/cloud/policies/google/compute/enable_shielded_vm_im.tf.go rename to checks/cloud/google/compute/enable_shielded_vm_im.tf.go diff --git a/rules/cloud/policies/google/compute/enable_shielded_vm_im_test.go b/checks/cloud/google/compute/enable_shielded_vm_im_test.go similarity index 100% rename from rules/cloud/policies/google/compute/enable_shielded_vm_im_test.go rename to checks/cloud/google/compute/enable_shielded_vm_im_test.go diff --git a/rules/cloud/policies/google/compute/enable_shielded_vm_sb.go b/checks/cloud/google/compute/enable_shielded_vm_sb.go similarity index 93% rename from rules/cloud/policies/google/compute/enable_shielded_vm_sb.go rename to checks/cloud/google/compute/enable_shielded_vm_sb.go index 40651fc5..7fc95e44 100644 --- a/rules/cloud/policies/google/compute/enable_shielded_vm_sb.go +++ b/checks/cloud/google/compute/enable_shielded_vm_sb.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableShieldedVMSecureBoot = rules.Register( +var CheckEnableShieldedVMSecureBoot = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0067", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/compute/enable_shielded_vm_sb.tf.go b/checks/cloud/google/compute/enable_shielded_vm_sb.tf.go similarity index 100% rename from rules/cloud/policies/google/compute/enable_shielded_vm_sb.tf.go rename to checks/cloud/google/compute/enable_shielded_vm_sb.tf.go diff --git a/rules/cloud/policies/google/compute/enable_shielded_vm_sb_test.go b/checks/cloud/google/compute/enable_shielded_vm_sb_test.go similarity index 100% rename from rules/cloud/policies/google/compute/enable_shielded_vm_sb_test.go rename to checks/cloud/google/compute/enable_shielded_vm_sb_test.go diff --git a/rules/cloud/policies/google/compute/enable_shielded_vm_vtpm.go b/checks/cloud/google/compute/enable_shielded_vm_vtpm.go similarity index 93% rename from rules/cloud/policies/google/compute/enable_shielded_vm_vtpm.go rename to checks/cloud/google/compute/enable_shielded_vm_vtpm.go index 1594e0ff..4ae2469f 100755 --- a/rules/cloud/policies/google/compute/enable_shielded_vm_vtpm.go +++ b/checks/cloud/google/compute/enable_shielded_vm_vtpm.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableShieldedVMVTPM = rules.Register( +var CheckEnableShieldedVMVTPM = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0041", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/compute/enable_shielded_vm_vtpm.tf.go b/checks/cloud/google/compute/enable_shielded_vm_vtpm.tf.go similarity index 100% rename from rules/cloud/policies/google/compute/enable_shielded_vm_vtpm.tf.go rename to checks/cloud/google/compute/enable_shielded_vm_vtpm.tf.go diff --git a/rules/cloud/policies/google/compute/enable_shielded_vm_vtpm_test.go b/checks/cloud/google/compute/enable_shielded_vm_vtpm_test.go similarity index 100% rename from rules/cloud/policies/google/compute/enable_shielded_vm_vtpm_test.go rename to checks/cloud/google/compute/enable_shielded_vm_vtpm_test.go diff --git a/rules/cloud/policies/google/compute/enable_vpc_flow_logs.go b/checks/cloud/google/compute/enable_vpc_flow_logs.go similarity index 94% rename from rules/cloud/policies/google/compute/enable_vpc_flow_logs.go rename to checks/cloud/google/compute/enable_vpc_flow_logs.go index a9add7b6..162f1888 100755 --- a/rules/cloud/policies/google/compute/enable_vpc_flow_logs.go +++ b/checks/cloud/google/compute/enable_vpc_flow_logs.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableVPCFlowLogs = rules.Register( +var CheckEnableVPCFlowLogs = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0029", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/compute/enable_vpc_flow_logs.tf.go b/checks/cloud/google/compute/enable_vpc_flow_logs.tf.go similarity index 100% rename from rules/cloud/policies/google/compute/enable_vpc_flow_logs.tf.go rename to checks/cloud/google/compute/enable_vpc_flow_logs.tf.go diff --git a/rules/cloud/policies/google/compute/enable_vpc_flow_logs_test.go b/checks/cloud/google/compute/enable_vpc_flow_logs_test.go similarity index 100% rename from rules/cloud/policies/google/compute/enable_vpc_flow_logs_test.go rename to checks/cloud/google/compute/enable_vpc_flow_logs_test.go diff --git a/rules/cloud/policies/google/compute/no_default_service_account.go b/checks/cloud/google/compute/no_default_service_account.go similarity index 93% rename from rules/cloud/policies/google/compute/no_default_service_account.go rename to checks/cloud/google/compute/no_default_service_account.go index 62fc521e..862c09c5 100755 --- a/rules/cloud/policies/google/compute/no_default_service_account.go +++ b/checks/cloud/google/compute/no_default_service_account.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoDefaultServiceAccount = rules.Register( +var CheckNoDefaultServiceAccount = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0044", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/compute/no_default_service_account.tf.go b/checks/cloud/google/compute/no_default_service_account.tf.go similarity index 100% rename from rules/cloud/policies/google/compute/no_default_service_account.tf.go rename to checks/cloud/google/compute/no_default_service_account.tf.go diff --git a/rules/cloud/policies/google/compute/no_default_service_account_test.go b/checks/cloud/google/compute/no_default_service_account_test.go similarity index 100% rename from rules/cloud/policies/google/compute/no_default_service_account_test.go rename to checks/cloud/google/compute/no_default_service_account_test.go diff --git a/rules/cloud/policies/google/compute/no_ip_forwarding.go b/checks/cloud/google/compute/no_ip_forwarding.go similarity index 93% rename from rules/cloud/policies/google/compute/no_ip_forwarding.go rename to checks/cloud/google/compute/no_ip_forwarding.go index f61629db..a4128cbe 100755 --- a/rules/cloud/policies/google/compute/no_ip_forwarding.go +++ b/checks/cloud/google/compute/no_ip_forwarding.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoIpForwarding = rules.Register( +var CheckNoIpForwarding = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0043", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/compute/no_ip_forwarding.tf.go b/checks/cloud/google/compute/no_ip_forwarding.tf.go similarity index 100% rename from rules/cloud/policies/google/compute/no_ip_forwarding.tf.go rename to checks/cloud/google/compute/no_ip_forwarding.tf.go diff --git a/rules/cloud/policies/google/compute/no_ip_forwarding_test.go b/checks/cloud/google/compute/no_ip_forwarding_test.go similarity index 100% rename from rules/cloud/policies/google/compute/no_ip_forwarding_test.go rename to checks/cloud/google/compute/no_ip_forwarding_test.go diff --git a/rules/cloud/policies/google/compute/no_oslogin_override.go b/checks/cloud/google/compute/no_oslogin_override.go similarity index 93% rename from rules/cloud/policies/google/compute/no_oslogin_override.go rename to checks/cloud/google/compute/no_oslogin_override.go index 7752fa24..3c40a4a4 100755 --- a/rules/cloud/policies/google/compute/no_oslogin_override.go +++ b/checks/cloud/google/compute/no_oslogin_override.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoOsloginOverride = rules.Register( +var CheckNoOsloginOverride = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0036", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/compute/no_oslogin_override.tf.go b/checks/cloud/google/compute/no_oslogin_override.tf.go similarity index 100% rename from rules/cloud/policies/google/compute/no_oslogin_override.tf.go rename to checks/cloud/google/compute/no_oslogin_override.tf.go diff --git a/rules/cloud/policies/google/compute/no_oslogin_override_test.go b/checks/cloud/google/compute/no_oslogin_override_test.go similarity index 100% rename from rules/cloud/policies/google/compute/no_oslogin_override_test.go rename to checks/cloud/google/compute/no_oslogin_override_test.go diff --git a/rules/cloud/policies/google/compute/no_project_wide_ssh_keys.go b/checks/cloud/google/compute/no_project_wide_ssh_keys.go similarity index 93% rename from rules/cloud/policies/google/compute/no_project_wide_ssh_keys.go rename to checks/cloud/google/compute/no_project_wide_ssh_keys.go index b490a1a8..b836239e 100755 --- a/rules/cloud/policies/google/compute/no_project_wide_ssh_keys.go +++ b/checks/cloud/google/compute/no_project_wide_ssh_keys.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoProjectWideSshKeys = rules.Register( +var CheckNoProjectWideSshKeys = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0030", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/compute/no_project_wide_ssh_keys.tf.go b/checks/cloud/google/compute/no_project_wide_ssh_keys.tf.go similarity index 100% rename from rules/cloud/policies/google/compute/no_project_wide_ssh_keys.tf.go rename to checks/cloud/google/compute/no_project_wide_ssh_keys.tf.go diff --git a/rules/cloud/policies/google/compute/no_project_wide_ssh_keys_test.go b/checks/cloud/google/compute/no_project_wide_ssh_keys_test.go similarity index 100% rename from rules/cloud/policies/google/compute/no_project_wide_ssh_keys_test.go rename to checks/cloud/google/compute/no_project_wide_ssh_keys_test.go diff --git a/rules/cloud/policies/google/compute/no_public_egress.go b/checks/cloud/google/compute/no_public_egress.go similarity index 91% rename from rules/cloud/policies/google/compute/no_public_egress.go rename to checks/cloud/google/compute/no_public_egress.go index addd9b10..968862b1 100755 --- a/rules/cloud/policies/google/compute/no_public_egress.go +++ b/checks/cloud/google/compute/no_public_egress.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/trivy-policies/internal/cidr" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicEgress = rules.Register( +var CheckNoPublicEgress = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0035", Provider: providers.GoogleProvider, @@ -18,7 +18,7 @@ var CheckNoPublicEgress = rules.Register( Summary: "An outbound firewall rule allows traffic to /0.", Impact: "The port is exposed for egress to the internet", Resolution: "Set a more restrictive cidr range", - Explanation: `Network security rules should not use very broad subnets. + Explanation: `Network security checks should not use very broad subnets. Where possible, segments should be broken into smaller subnets and avoid using the /0 subnet.`, Links: []string{ diff --git a/rules/cloud/policies/google/compute/no_public_egress.tf.go b/checks/cloud/google/compute/no_public_egress.tf.go similarity index 100% rename from rules/cloud/policies/google/compute/no_public_egress.tf.go rename to checks/cloud/google/compute/no_public_egress.tf.go diff --git a/rules/cloud/policies/google/compute/no_public_egress_test.go b/checks/cloud/google/compute/no_public_egress_test.go similarity index 100% rename from rules/cloud/policies/google/compute/no_public_egress_test.go rename to checks/cloud/google/compute/no_public_egress_test.go diff --git a/rules/cloud/policies/google/compute/no_public_ingress.go b/checks/cloud/google/compute/no_public_ingress.go similarity index 91% rename from rules/cloud/policies/google/compute/no_public_ingress.go rename to checks/cloud/google/compute/no_public_ingress.go index b169683b..c976ec0e 100755 --- a/rules/cloud/policies/google/compute/no_public_ingress.go +++ b/checks/cloud/google/compute/no_public_ingress.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/trivy-policies/internal/cidr" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicIngress = rules.Register( +var CheckNoPublicIngress = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0027", Provider: providers.GoogleProvider, @@ -18,7 +18,7 @@ var CheckNoPublicIngress = rules.Register( Summary: "An inbound firewall rule allows traffic from /0.", Impact: "The port is exposed for ingress from the internet", Resolution: "Set a more restrictive cidr range", - Explanation: `Network security rules should not use very broad subnets. + Explanation: `Network security checks should not use very broad subnets. Where possible, segments should be broken into smaller subnets and avoid using the /0 subnet.`, Links: []string{ diff --git a/rules/cloud/policies/google/compute/no_public_ingress.tf.go b/checks/cloud/google/compute/no_public_ingress.tf.go similarity index 100% rename from rules/cloud/policies/google/compute/no_public_ingress.tf.go rename to checks/cloud/google/compute/no_public_ingress.tf.go diff --git a/rules/cloud/policies/google/compute/no_public_ingress_test.go b/checks/cloud/google/compute/no_public_ingress_test.go similarity index 100% rename from rules/cloud/policies/google/compute/no_public_ingress_test.go rename to checks/cloud/google/compute/no_public_ingress_test.go diff --git a/rules/cloud/policies/google/compute/no_public_ip.go b/checks/cloud/google/compute/no_public_ip.go similarity index 92% rename from rules/cloud/policies/google/compute/no_public_ip.go rename to checks/cloud/google/compute/no_public_ip.go index 510473c4..441cdde7 100755 --- a/rules/cloud/policies/google/compute/no_public_ip.go +++ b/checks/cloud/google/compute/no_public_ip.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckInstancesDoNotHavePublicIPs = rules.Register( +var CheckInstancesDoNotHavePublicIPs = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0031", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/compute/no_public_ip.tf.go b/checks/cloud/google/compute/no_public_ip.tf.go similarity index 100% rename from rules/cloud/policies/google/compute/no_public_ip.tf.go rename to checks/cloud/google/compute/no_public_ip.tf.go diff --git a/rules/cloud/policies/google/compute/no_public_ip_test.go b/checks/cloud/google/compute/no_public_ip_test.go similarity index 100% rename from rules/cloud/policies/google/compute/no_public_ip_test.go rename to checks/cloud/google/compute/no_public_ip_test.go diff --git a/rules/cloud/policies/google/compute/no_serial_port.go b/checks/cloud/google/compute/no_serial_port.go similarity index 88% rename from rules/cloud/policies/google/compute/no_serial_port.go rename to checks/cloud/google/compute/no_serial_port.go index 3831e910..6a3f88f9 100755 --- a/rules/cloud/policies/google/compute/no_serial_port.go +++ b/checks/cloud/google/compute/no_serial_port.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoSerialPort = rules.Register( +var CheckNoSerialPort = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0032", Provider: providers.GoogleProvider, @@ -17,7 +17,7 @@ var CheckNoSerialPort = rules.Register( Summary: "Disable serial port connectivity for all instances", Impact: "Unrestricted network access to the serial console of the instance", Resolution: "Disable serial port access", - Explanation: `When serial port access is enabled, the access is not governed by network security rules meaning the port can be exposed publicly.`, + Explanation: `When serial port access is enabled, the access is not governed by network security checks meaning the port can be exposed publicly.`, Links: []string{}, Terraform: &scan.EngineMetadata{ GoodExamples: terraformNoSerialPortGoodExamples, diff --git a/rules/cloud/policies/google/compute/no_serial_port.tf.go b/checks/cloud/google/compute/no_serial_port.tf.go similarity index 100% rename from rules/cloud/policies/google/compute/no_serial_port.tf.go rename to checks/cloud/google/compute/no_serial_port.tf.go diff --git a/rules/cloud/policies/google/compute/no_serial_port_test.go b/checks/cloud/google/compute/no_serial_port_test.go similarity index 100% rename from rules/cloud/policies/google/compute/no_serial_port_test.go rename to checks/cloud/google/compute/no_serial_port_test.go diff --git a/rules/cloud/policies/google/compute/project_level_oslogin.go b/checks/cloud/google/compute/project_level_oslogin.go similarity index 93% rename from rules/cloud/policies/google/compute/project_level_oslogin.go rename to checks/cloud/google/compute/project_level_oslogin.go index cabaeea5..709d5cbf 100755 --- a/rules/cloud/policies/google/compute/project_level_oslogin.go +++ b/checks/cloud/google/compute/project_level_oslogin.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckProjectLevelOslogin = rules.Register( +var CheckProjectLevelOslogin = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0042", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/compute/project_level_oslogin.tf.go b/checks/cloud/google/compute/project_level_oslogin.tf.go similarity index 100% rename from rules/cloud/policies/google/compute/project_level_oslogin.tf.go rename to checks/cloud/google/compute/project_level_oslogin.tf.go diff --git a/rules/cloud/policies/google/compute/project_level_oslogin_test.go b/checks/cloud/google/compute/project_level_oslogin_test.go similarity index 100% rename from rules/cloud/policies/google/compute/project_level_oslogin_test.go rename to checks/cloud/google/compute/project_level_oslogin_test.go diff --git a/rules/cloud/policies/google/compute/service.go b/checks/cloud/google/compute/service.go similarity index 100% rename from rules/cloud/policies/google/compute/service.go rename to checks/cloud/google/compute/service.go diff --git a/rules/cloud/policies/google/compute/use_secure_tls_policy.go b/checks/cloud/google/compute/use_secure_tls_policy.go similarity index 93% rename from rules/cloud/policies/google/compute/use_secure_tls_policy.go rename to checks/cloud/google/compute/use_secure_tls_policy.go index 762e419c..111904c8 100755 --- a/rules/cloud/policies/google/compute/use_secure_tls_policy.go +++ b/checks/cloud/google/compute/use_secure_tls_policy.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckUseSecureTlsPolicy = rules.Register( +var CheckUseSecureTlsPolicy = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0039", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/compute/use_secure_tls_policy.tf.go b/checks/cloud/google/compute/use_secure_tls_policy.tf.go similarity index 100% rename from rules/cloud/policies/google/compute/use_secure_tls_policy.tf.go rename to checks/cloud/google/compute/use_secure_tls_policy.tf.go diff --git a/rules/cloud/policies/google/compute/use_secure_tls_policy_test.go b/checks/cloud/google/compute/use_secure_tls_policy_test.go similarity index 100% rename from rules/cloud/policies/google/compute/use_secure_tls_policy_test.go rename to checks/cloud/google/compute/use_secure_tls_policy_test.go diff --git a/rules/cloud/policies/google/compute/vm_disk_encryption_customer_key.go b/checks/cloud/google/compute/vm_disk_encryption_customer_key.go similarity index 93% rename from rules/cloud/policies/google/compute/vm_disk_encryption_customer_key.go rename to checks/cloud/google/compute/vm_disk_encryption_customer_key.go index 13524990..71f73c19 100755 --- a/rules/cloud/policies/google/compute/vm_disk_encryption_customer_key.go +++ b/checks/cloud/google/compute/vm_disk_encryption_customer_key.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckVmDiskEncryptionCustomerKey = rules.Register( +var CheckVmDiskEncryptionCustomerKey = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0033", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/compute/vm_disk_encryption_customer_key.tf.go b/checks/cloud/google/compute/vm_disk_encryption_customer_key.tf.go similarity index 100% rename from rules/cloud/policies/google/compute/vm_disk_encryption_customer_key.tf.go rename to checks/cloud/google/compute/vm_disk_encryption_customer_key.tf.go diff --git a/rules/cloud/policies/google/compute/vm_disk_encryption_customer_key_test.go b/checks/cloud/google/compute/vm_disk_encryption_customer_key_test.go similarity index 100% rename from rules/cloud/policies/google/compute/vm_disk_encryption_customer_key_test.go rename to checks/cloud/google/compute/vm_disk_encryption_customer_key_test.go diff --git a/rules/cloud/policies/google/dns/enable_dnssec.go b/checks/cloud/google/dns/enable_dnssec.go similarity index 93% rename from rules/cloud/policies/google/dns/enable_dnssec.go rename to checks/cloud/google/dns/enable_dnssec.go index db1caf9e..a2ca3298 100755 --- a/rules/cloud/policies/google/dns/enable_dnssec.go +++ b/checks/cloud/google/dns/enable_dnssec.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableDnssec = rules.Register( +var CheckEnableDnssec = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0013", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/dns/enable_dnssec.tf.go b/checks/cloud/google/dns/enable_dnssec.tf.go similarity index 100% rename from rules/cloud/policies/google/dns/enable_dnssec.tf.go rename to checks/cloud/google/dns/enable_dnssec.tf.go diff --git a/rules/cloud/policies/google/dns/enable_dnssec_test.go b/checks/cloud/google/dns/enable_dnssec_test.go similarity index 100% rename from rules/cloud/policies/google/dns/enable_dnssec_test.go rename to checks/cloud/google/dns/enable_dnssec_test.go diff --git a/rules/cloud/policies/google/dns/no_rsa_sha1.go b/checks/cloud/google/dns/no_rsa_sha1.go similarity index 93% rename from rules/cloud/policies/google/dns/no_rsa_sha1.go rename to checks/cloud/google/dns/no_rsa_sha1.go index 7920f3cb..5b4426aa 100755 --- a/rules/cloud/policies/google/dns/no_rsa_sha1.go +++ b/checks/cloud/google/dns/no_rsa_sha1.go @@ -7,10 +7,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoRsaSha1 = rules.Register( +var CheckNoRsaSha1 = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0012", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/dns/no_rsa_sha1.tf.go b/checks/cloud/google/dns/no_rsa_sha1.tf.go similarity index 100% rename from rules/cloud/policies/google/dns/no_rsa_sha1.tf.go rename to checks/cloud/google/dns/no_rsa_sha1.tf.go diff --git a/rules/cloud/policies/google/dns/no_rsa_sha1_test.go b/checks/cloud/google/dns/no_rsa_sha1_test.go similarity index 100% rename from rules/cloud/policies/google/dns/no_rsa_sha1_test.go rename to checks/cloud/google/dns/no_rsa_sha1_test.go diff --git a/rules/cloud/policies/google/gke/enable_auto_repair.go b/checks/cloud/google/gke/enable_auto_repair.go similarity index 93% rename from rules/cloud/policies/google/gke/enable_auto_repair.go rename to checks/cloud/google/gke/enable_auto_repair.go index 3c7e63cc..643b8946 100755 --- a/rules/cloud/policies/google/gke/enable_auto_repair.go +++ b/checks/cloud/google/gke/enable_auto_repair.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableAutoRepair = rules.Register( +var CheckEnableAutoRepair = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0063", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/gke/enable_auto_repair.tf.go b/checks/cloud/google/gke/enable_auto_repair.tf.go similarity index 100% rename from rules/cloud/policies/google/gke/enable_auto_repair.tf.go rename to checks/cloud/google/gke/enable_auto_repair.tf.go diff --git a/rules/cloud/policies/google/gke/enable_auto_repair_test.go b/checks/cloud/google/gke/enable_auto_repair_test.go similarity index 100% rename from rules/cloud/policies/google/gke/enable_auto_repair_test.go rename to checks/cloud/google/gke/enable_auto_repair_test.go diff --git a/rules/cloud/policies/google/gke/enable_auto_upgrade.go b/checks/cloud/google/gke/enable_auto_upgrade.go similarity index 93% rename from rules/cloud/policies/google/gke/enable_auto_upgrade.go rename to checks/cloud/google/gke/enable_auto_upgrade.go index c8753c22..c35b87fb 100755 --- a/rules/cloud/policies/google/gke/enable_auto_upgrade.go +++ b/checks/cloud/google/gke/enable_auto_upgrade.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableAutoUpgrade = rules.Register( +var CheckEnableAutoUpgrade = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0058", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/gke/enable_auto_upgrade.tf.go b/checks/cloud/google/gke/enable_auto_upgrade.tf.go similarity index 100% rename from rules/cloud/policies/google/gke/enable_auto_upgrade.tf.go rename to checks/cloud/google/gke/enable_auto_upgrade.tf.go diff --git a/rules/cloud/policies/google/gke/enable_auto_upgrade_test.go b/checks/cloud/google/gke/enable_auto_upgrade_test.go similarity index 100% rename from rules/cloud/policies/google/gke/enable_auto_upgrade_test.go rename to checks/cloud/google/gke/enable_auto_upgrade_test.go diff --git a/rules/cloud/policies/google/gke/enable_ip_aliasing.go b/checks/cloud/google/gke/enable_ip_aliasing.go similarity index 93% rename from rules/cloud/policies/google/gke/enable_ip_aliasing.go rename to checks/cloud/google/gke/enable_ip_aliasing.go index ab9f544c..8c6bb5cc 100755 --- a/rules/cloud/policies/google/gke/enable_ip_aliasing.go +++ b/checks/cloud/google/gke/enable_ip_aliasing.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableIpAliasing = rules.Register( +var CheckEnableIpAliasing = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0049", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/gke/enable_ip_aliasing.tf.go b/checks/cloud/google/gke/enable_ip_aliasing.tf.go similarity index 100% rename from rules/cloud/policies/google/gke/enable_ip_aliasing.tf.go rename to checks/cloud/google/gke/enable_ip_aliasing.tf.go diff --git a/rules/cloud/policies/google/gke/enable_ip_aliasing_test.go b/checks/cloud/google/gke/enable_ip_aliasing_test.go similarity index 100% rename from rules/cloud/policies/google/gke/enable_ip_aliasing_test.go rename to checks/cloud/google/gke/enable_ip_aliasing_test.go diff --git a/rules/cloud/policies/google/gke/enable_master_networks.go b/checks/cloud/google/gke/enable_master_networks.go similarity index 93% rename from rules/cloud/policies/google/gke/enable_master_networks.go rename to checks/cloud/google/gke/enable_master_networks.go index 6c2377ad..40a41472 100755 --- a/rules/cloud/policies/google/gke/enable_master_networks.go +++ b/checks/cloud/google/gke/enable_master_networks.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableMasterNetworks = rules.Register( +var CheckEnableMasterNetworks = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0061", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/gke/enable_master_networks.tf.go b/checks/cloud/google/gke/enable_master_networks.tf.go similarity index 100% rename from rules/cloud/policies/google/gke/enable_master_networks.tf.go rename to checks/cloud/google/gke/enable_master_networks.tf.go diff --git a/rules/cloud/policies/google/gke/enable_master_networks_test.go b/checks/cloud/google/gke/enable_master_networks_test.go similarity index 100% rename from rules/cloud/policies/google/gke/enable_master_networks_test.go rename to checks/cloud/google/gke/enable_master_networks_test.go diff --git a/rules/cloud/policies/google/gke/enable_network_policy.go b/checks/cloud/google/gke/enable_network_policy.go similarity index 93% rename from rules/cloud/policies/google/gke/enable_network_policy.go rename to checks/cloud/google/gke/enable_network_policy.go index ea835527..19462f1c 100755 --- a/rules/cloud/policies/google/gke/enable_network_policy.go +++ b/checks/cloud/google/gke/enable_network_policy.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableNetworkPolicy = rules.Register( +var CheckEnableNetworkPolicy = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0056", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/gke/enable_network_policy.tf.go b/checks/cloud/google/gke/enable_network_policy.tf.go similarity index 100% rename from rules/cloud/policies/google/gke/enable_network_policy.tf.go rename to checks/cloud/google/gke/enable_network_policy.tf.go diff --git a/rules/cloud/policies/google/gke/enable_network_policy_test.go b/checks/cloud/google/gke/enable_network_policy_test.go similarity index 100% rename from rules/cloud/policies/google/gke/enable_network_policy_test.go rename to checks/cloud/google/gke/enable_network_policy_test.go diff --git a/rules/cloud/policies/google/gke/enable_private_cluster.go b/checks/cloud/google/gke/enable_private_cluster.go similarity index 93% rename from rules/cloud/policies/google/gke/enable_private_cluster.go rename to checks/cloud/google/gke/enable_private_cluster.go index f2360ac7..8bf5407a 100755 --- a/rules/cloud/policies/google/gke/enable_private_cluster.go +++ b/checks/cloud/google/gke/enable_private_cluster.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnablePrivateCluster = rules.Register( +var CheckEnablePrivateCluster = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0059", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/gke/enable_private_cluster.tf.go b/checks/cloud/google/gke/enable_private_cluster.tf.go similarity index 100% rename from rules/cloud/policies/google/gke/enable_private_cluster.tf.go rename to checks/cloud/google/gke/enable_private_cluster.tf.go diff --git a/rules/cloud/policies/google/gke/enable_private_cluster_test.go b/checks/cloud/google/gke/enable_private_cluster_test.go similarity index 100% rename from rules/cloud/policies/google/gke/enable_private_cluster_test.go rename to checks/cloud/google/gke/enable_private_cluster_test.go diff --git a/rules/cloud/policies/google/gke/enable_stackdriver_logging.go b/checks/cloud/google/gke/enable_stackdriver_logging.go similarity index 93% rename from rules/cloud/policies/google/gke/enable_stackdriver_logging.go rename to checks/cloud/google/gke/enable_stackdriver_logging.go index 8acd337d..c199c772 100755 --- a/rules/cloud/policies/google/gke/enable_stackdriver_logging.go +++ b/checks/cloud/google/gke/enable_stackdriver_logging.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableStackdriverLogging = rules.Register( +var CheckEnableStackdriverLogging = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0060", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/gke/enable_stackdriver_logging.tf.go b/checks/cloud/google/gke/enable_stackdriver_logging.tf.go similarity index 100% rename from rules/cloud/policies/google/gke/enable_stackdriver_logging.tf.go rename to checks/cloud/google/gke/enable_stackdriver_logging.tf.go diff --git a/rules/cloud/policies/google/gke/enable_stackdriver_logging_test.go b/checks/cloud/google/gke/enable_stackdriver_logging_test.go similarity index 100% rename from rules/cloud/policies/google/gke/enable_stackdriver_logging_test.go rename to checks/cloud/google/gke/enable_stackdriver_logging_test.go diff --git a/rules/cloud/policies/google/gke/enable_stackdriver_monitoring.go b/checks/cloud/google/gke/enable_stackdriver_monitoring.go similarity index 93% rename from rules/cloud/policies/google/gke/enable_stackdriver_monitoring.go rename to checks/cloud/google/gke/enable_stackdriver_monitoring.go index 68e087c7..39737eeb 100755 --- a/rules/cloud/policies/google/gke/enable_stackdriver_monitoring.go +++ b/checks/cloud/google/gke/enable_stackdriver_monitoring.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableStackdriverMonitoring = rules.Register( +var CheckEnableStackdriverMonitoring = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0052", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/gke/enable_stackdriver_monitoring.tf.go b/checks/cloud/google/gke/enable_stackdriver_monitoring.tf.go similarity index 100% rename from rules/cloud/policies/google/gke/enable_stackdriver_monitoring.tf.go rename to checks/cloud/google/gke/enable_stackdriver_monitoring.tf.go diff --git a/rules/cloud/policies/google/gke/enable_stackdriver_monitoring_test.go b/checks/cloud/google/gke/enable_stackdriver_monitoring_test.go similarity index 100% rename from rules/cloud/policies/google/gke/enable_stackdriver_monitoring_test.go rename to checks/cloud/google/gke/enable_stackdriver_monitoring_test.go diff --git a/rules/cloud/policies/google/gke/metadata_endpoints_disabled.go b/checks/cloud/google/gke/metadata_endpoints_disabled.go similarity index 95% rename from rules/cloud/policies/google/gke/metadata_endpoints_disabled.go rename to checks/cloud/google/gke/metadata_endpoints_disabled.go index ad6faab3..3bfe4ccc 100755 --- a/rules/cloud/policies/google/gke/metadata_endpoints_disabled.go +++ b/checks/cloud/google/gke/metadata_endpoints_disabled.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckMetadataEndpointsDisabled = rules.Register( +var CheckMetadataEndpointsDisabled = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0048", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/gke/metadata_endpoints_disabled.tf.go b/checks/cloud/google/gke/metadata_endpoints_disabled.tf.go similarity index 100% rename from rules/cloud/policies/google/gke/metadata_endpoints_disabled.tf.go rename to checks/cloud/google/gke/metadata_endpoints_disabled.tf.go diff --git a/rules/cloud/policies/google/gke/metadata_endpoints_disabled_test.go b/checks/cloud/google/gke/metadata_endpoints_disabled_test.go similarity index 100% rename from rules/cloud/policies/google/gke/metadata_endpoints_disabled_test.go rename to checks/cloud/google/gke/metadata_endpoints_disabled_test.go diff --git a/rules/cloud/policies/google/gke/no_legacy_authentication.go b/checks/cloud/google/gke/no_legacy_authentication.go similarity index 95% rename from rules/cloud/policies/google/gke/no_legacy_authentication.go rename to checks/cloud/google/gke/no_legacy_authentication.go index 35948664..b560c043 100755 --- a/rules/cloud/policies/google/gke/no_legacy_authentication.go +++ b/checks/cloud/google/gke/no_legacy_authentication.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoLegacyAuthentication = rules.Register( +var CheckNoLegacyAuthentication = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0064", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/gke/no_legacy_authentication.tf.go b/checks/cloud/google/gke/no_legacy_authentication.tf.go similarity index 100% rename from rules/cloud/policies/google/gke/no_legacy_authentication.tf.go rename to checks/cloud/google/gke/no_legacy_authentication.tf.go diff --git a/rules/cloud/policies/google/gke/no_legacy_authentication_test.go b/checks/cloud/google/gke/no_legacy_authentication_test.go similarity index 100% rename from rules/cloud/policies/google/gke/no_legacy_authentication_test.go rename to checks/cloud/google/gke/no_legacy_authentication_test.go diff --git a/rules/cloud/policies/google/gke/no_public_control_plane.go b/checks/cloud/google/gke/no_public_control_plane.go similarity index 93% rename from rules/cloud/policies/google/gke/no_public_control_plane.go rename to checks/cloud/google/gke/no_public_control_plane.go index 2b51725e..aa11394c 100755 --- a/rules/cloud/policies/google/gke/no_public_control_plane.go +++ b/checks/cloud/google/gke/no_public_control_plane.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/trivy-policies/internal/cidr" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicControlPlane = rules.Register( +var CheckNoPublicControlPlane = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0053", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/gke/no_public_control_plane.tf.go b/checks/cloud/google/gke/no_public_control_plane.tf.go similarity index 100% rename from rules/cloud/policies/google/gke/no_public_control_plane.tf.go rename to checks/cloud/google/gke/no_public_control_plane.tf.go diff --git a/rules/cloud/policies/google/gke/no_public_control_plane_test.go b/checks/cloud/google/gke/no_public_control_plane_test.go similarity index 100% rename from rules/cloud/policies/google/gke/no_public_control_plane_test.go rename to checks/cloud/google/gke/no_public_control_plane_test.go diff --git a/rules/cloud/policies/google/gke/node_metadata_security.go b/checks/cloud/google/gke/node_metadata_security.go similarity index 95% rename from rules/cloud/policies/google/gke/node_metadata_security.go rename to checks/cloud/google/gke/node_metadata_security.go index e623215d..5d86acd3 100755 --- a/rules/cloud/policies/google/gke/node_metadata_security.go +++ b/checks/cloud/google/gke/node_metadata_security.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNodeMetadataSecurity = rules.Register( +var CheckNodeMetadataSecurity = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0057", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/gke/node_metadata_security.tf.go b/checks/cloud/google/gke/node_metadata_security.tf.go similarity index 100% rename from rules/cloud/policies/google/gke/node_metadata_security.tf.go rename to checks/cloud/google/gke/node_metadata_security.tf.go diff --git a/rules/cloud/policies/google/gke/node_metadata_security_test.go b/checks/cloud/google/gke/node_metadata_security_test.go similarity index 100% rename from rules/cloud/policies/google/gke/node_metadata_security_test.go rename to checks/cloud/google/gke/node_metadata_security_test.go diff --git a/rules/cloud/policies/google/gke/node_pool_uses_cos.go b/checks/cloud/google/gke/node_pool_uses_cos.go similarity index 95% rename from rules/cloud/policies/google/gke/node_pool_uses_cos.go rename to checks/cloud/google/gke/node_pool_uses_cos.go index 4a415f68..8cd4e80f 100755 --- a/rules/cloud/policies/google/gke/node_pool_uses_cos.go +++ b/checks/cloud/google/gke/node_pool_uses_cos.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/defsec/pkg/types" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNodePoolUsesCos = rules.Register( +var CheckNodePoolUsesCos = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0054", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/gke/node_pool_uses_cos.tf.go b/checks/cloud/google/gke/node_pool_uses_cos.tf.go similarity index 100% rename from rules/cloud/policies/google/gke/node_pool_uses_cos.tf.go rename to checks/cloud/google/gke/node_pool_uses_cos.tf.go diff --git a/rules/cloud/policies/google/gke/node_pool_uses_cos_test.go b/checks/cloud/google/gke/node_pool_uses_cos_test.go similarity index 100% rename from rules/cloud/policies/google/gke/node_pool_uses_cos_test.go rename to checks/cloud/google/gke/node_pool_uses_cos_test.go diff --git a/rules/cloud/policies/google/gke/node_shielding_enabled.go b/checks/cloud/google/gke/node_shielding_enabled.go similarity index 94% rename from rules/cloud/policies/google/gke/node_shielding_enabled.go rename to checks/cloud/google/gke/node_shielding_enabled.go index 2c12579b..6cbf541c 100755 --- a/rules/cloud/policies/google/gke/node_shielding_enabled.go +++ b/checks/cloud/google/gke/node_shielding_enabled.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNodeShieldingEnabled = rules.Register( +var CheckNodeShieldingEnabled = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0055", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/gke/node_shielding_enabled.tf.go b/checks/cloud/google/gke/node_shielding_enabled.tf.go similarity index 100% rename from rules/cloud/policies/google/gke/node_shielding_enabled.tf.go rename to checks/cloud/google/gke/node_shielding_enabled.tf.go diff --git a/rules/cloud/policies/google/gke/node_shielding_enabled_test.go b/checks/cloud/google/gke/node_shielding_enabled_test.go similarity index 100% rename from rules/cloud/policies/google/gke/node_shielding_enabled_test.go rename to checks/cloud/google/gke/node_shielding_enabled_test.go diff --git a/rules/cloud/policies/google/gke/use_cluster_labels.go b/checks/cloud/google/gke/use_cluster_labels.go similarity index 93% rename from rules/cloud/policies/google/gke/use_cluster_labels.go rename to checks/cloud/google/gke/use_cluster_labels.go index de152664..357ad0b5 100755 --- a/rules/cloud/policies/google/gke/use_cluster_labels.go +++ b/checks/cloud/google/gke/use_cluster_labels.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckUseClusterLabels = rules.Register( +var CheckUseClusterLabels = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0051", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/gke/use_cluster_labels.tf.go b/checks/cloud/google/gke/use_cluster_labels.tf.go similarity index 100% rename from rules/cloud/policies/google/gke/use_cluster_labels.tf.go rename to checks/cloud/google/gke/use_cluster_labels.tf.go diff --git a/rules/cloud/policies/google/gke/use_cluster_labels_test.go b/checks/cloud/google/gke/use_cluster_labels_test.go similarity index 100% rename from rules/cloud/policies/google/gke/use_cluster_labels_test.go rename to checks/cloud/google/gke/use_cluster_labels_test.go diff --git a/rules/cloud/policies/google/gke/use_rbac_permissions.go b/checks/cloud/google/gke/use_rbac_permissions.go similarity index 94% rename from rules/cloud/policies/google/gke/use_rbac_permissions.go rename to checks/cloud/google/gke/use_rbac_permissions.go index bdccdd26..1a0f7f77 100755 --- a/rules/cloud/policies/google/gke/use_rbac_permissions.go +++ b/checks/cloud/google/gke/use_rbac_permissions.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckUseRbacPermissions = rules.Register( +var CheckUseRbacPermissions = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0062", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/gke/use_rbac_permissions.tf.go b/checks/cloud/google/gke/use_rbac_permissions.tf.go similarity index 100% rename from rules/cloud/policies/google/gke/use_rbac_permissions.tf.go rename to checks/cloud/google/gke/use_rbac_permissions.tf.go diff --git a/rules/cloud/policies/google/gke/use_rbac_permissions_test.go b/checks/cloud/google/gke/use_rbac_permissions_test.go similarity index 100% rename from rules/cloud/policies/google/gke/use_rbac_permissions_test.go rename to checks/cloud/google/gke/use_rbac_permissions_test.go diff --git a/rules/cloud/policies/google/gke/use_service_account.go b/checks/cloud/google/gke/use_service_account.go similarity index 95% rename from rules/cloud/policies/google/gke/use_service_account.go rename to checks/cloud/google/gke/use_service_account.go index cd776003..a7342bfe 100755 --- a/rules/cloud/policies/google/gke/use_service_account.go +++ b/checks/cloud/google/gke/use_service_account.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckUseServiceAccount = rules.Register( +var CheckUseServiceAccount = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0050", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/gke/use_service_account.tf.go b/checks/cloud/google/gke/use_service_account.tf.go similarity index 100% rename from rules/cloud/policies/google/gke/use_service_account.tf.go rename to checks/cloud/google/gke/use_service_account.tf.go diff --git a/rules/cloud/policies/google/gke/use_service_account_test.go b/checks/cloud/google/gke/use_service_account_test.go similarity index 100% rename from rules/cloud/policies/google/gke/use_service_account_test.go rename to checks/cloud/google/gke/use_service_account_test.go diff --git a/rules/cloud/policies/google/iam/no_conditions_on_workload_identity_pool_provider.go b/checks/cloud/google/iam/no_conditions_on_workload_identity_pool_provider.go similarity index 94% rename from rules/cloud/policies/google/iam/no_conditions_on_workload_identity_pool_provider.go rename to checks/cloud/google/iam/no_conditions_on_workload_identity_pool_provider.go index 4ce4d906..446f5d70 100644 --- a/rules/cloud/policies/google/iam/no_conditions_on_workload_identity_pool_provider.go +++ b/checks/cloud/google/iam/no_conditions_on_workload_identity_pool_provider.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoConditionOnWorkloadIdentityPoolProvider = rules.Register( +var CheckNoConditionOnWorkloadIdentityPoolProvider = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0068", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/iam/no_conditions_on_workload_identity_pool_provider.tf.go b/checks/cloud/google/iam/no_conditions_on_workload_identity_pool_provider.tf.go similarity index 100% rename from rules/cloud/policies/google/iam/no_conditions_on_workload_identity_pool_provider.tf.go rename to checks/cloud/google/iam/no_conditions_on_workload_identity_pool_provider.tf.go diff --git a/rules/cloud/policies/google/iam/no_conditions_on_workload_identity_pool_provider_test.go b/checks/cloud/google/iam/no_conditions_on_workload_identity_pool_provider_test.go similarity index 100% rename from rules/cloud/policies/google/iam/no_conditions_on_workload_identity_pool_provider_test.go rename to checks/cloud/google/iam/no_conditions_on_workload_identity_pool_provider_test.go diff --git a/rules/cloud/policies/google/iam/no_default_network.go b/checks/cloud/google/iam/no_default_network.go similarity index 84% rename from rules/cloud/policies/google/iam/no_default_network.go rename to checks/cloud/google/iam/no_default_network.go index 2c51f298..c518c57c 100755 --- a/rules/cloud/policies/google/iam/no_default_network.go +++ b/checks/cloud/google/iam/no_default_network.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoDefaultNetwork = rules.Register( +var CheckNoDefaultNetwork = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0010", Provider: providers.GoogleProvider, @@ -17,7 +17,7 @@ var CheckNoDefaultNetwork = rules.Register( Summary: "Default network should not be created at project level", Impact: "Exposure of internal infrastructure/services to public internet", Resolution: "Disable automatic default network creation", - Explanation: `The default network which is provided for a project contains multiple insecure firewall rules which allow ingress to the project's infrastructure. Creation of this network should therefore be disabled.`, + Explanation: `The default network which is provided for a project contains multiple insecure firewall checks which allow ingress to the project's infrastructure. Creation of this network should therefore be disabled.`, Links: []string{}, Terraform: &scan.EngineMetadata{ GoodExamples: terraformNoDefaultNetworkGoodExamples, diff --git a/rules/cloud/policies/google/iam/no_default_network.tf.go b/checks/cloud/google/iam/no_default_network.tf.go similarity index 100% rename from rules/cloud/policies/google/iam/no_default_network.tf.go rename to checks/cloud/google/iam/no_default_network.tf.go diff --git a/rules/cloud/policies/google/iam/no_default_network_test.go b/checks/cloud/google/iam/no_default_network_test.go similarity index 100% rename from rules/cloud/policies/google/iam/no_default_network_test.go rename to checks/cloud/google/iam/no_default_network_test.go diff --git a/rules/cloud/policies/google/iam/no_folder_level_default_service_account_assignment.go b/checks/cloud/google/iam/no_folder_level_default_service_account_assignment.go similarity index 95% rename from rules/cloud/policies/google/iam/no_folder_level_default_service_account_assignment.go rename to checks/cloud/google/iam/no_folder_level_default_service_account_assignment.go index d47051a6..cf64286c 100755 --- a/rules/cloud/policies/google/iam/no_folder_level_default_service_account_assignment.go +++ b/checks/cloud/google/iam/no_folder_level_default_service_account_assignment.go @@ -9,12 +9,12 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/defsec/pkg/providers" ) -var CheckNoFolderLevelDefaultServiceAccountAssignment = rules.Register( +var CheckNoFolderLevelDefaultServiceAccountAssignment = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0004", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/iam/no_folder_level_default_service_account_assignment.tf.go b/checks/cloud/google/iam/no_folder_level_default_service_account_assignment.tf.go similarity index 100% rename from rules/cloud/policies/google/iam/no_folder_level_default_service_account_assignment.tf.go rename to checks/cloud/google/iam/no_folder_level_default_service_account_assignment.tf.go diff --git a/rules/cloud/policies/google/iam/no_folder_level_default_service_account_assignment_test.go b/checks/cloud/google/iam/no_folder_level_default_service_account_assignment_test.go similarity index 100% rename from rules/cloud/policies/google/iam/no_folder_level_default_service_account_assignment_test.go rename to checks/cloud/google/iam/no_folder_level_default_service_account_assignment_test.go diff --git a/rules/cloud/policies/google/iam/no_folder_level_service_account_impersonation.go b/checks/cloud/google/iam/no_folder_level_service_account_impersonation.go similarity index 94% rename from rules/cloud/policies/google/iam/no_folder_level_service_account_impersonation.go rename to checks/cloud/google/iam/no_folder_level_service_account_impersonation.go index 6e7c5362..c81120d4 100755 --- a/rules/cloud/policies/google/iam/no_folder_level_service_account_impersonation.go +++ b/checks/cloud/google/iam/no_folder_level_service_account_impersonation.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoFolderLevelServiceAccountImpersonation = rules.Register( +var CheckNoFolderLevelServiceAccountImpersonation = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0005", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/iam/no_folder_level_service_account_impersonation.tf.go b/checks/cloud/google/iam/no_folder_level_service_account_impersonation.tf.go similarity index 100% rename from rules/cloud/policies/google/iam/no_folder_level_service_account_impersonation.tf.go rename to checks/cloud/google/iam/no_folder_level_service_account_impersonation.tf.go diff --git a/rules/cloud/policies/google/iam/no_folder_level_service_account_impersonation_test.go b/checks/cloud/google/iam/no_folder_level_service_account_impersonation_test.go similarity index 100% rename from rules/cloud/policies/google/iam/no_folder_level_service_account_impersonation_test.go rename to checks/cloud/google/iam/no_folder_level_service_account_impersonation_test.go diff --git a/rules/cloud/policies/google/iam/no_org_level_default_service_account_assignment.go b/checks/cloud/google/iam/no_org_level_default_service_account_assignment.go similarity index 95% rename from rules/cloud/policies/google/iam/no_org_level_default_service_account_assignment.go rename to checks/cloud/google/iam/no_org_level_default_service_account_assignment.go index 2b022c17..8f3fbb7c 100755 --- a/rules/cloud/policies/google/iam/no_org_level_default_service_account_assignment.go +++ b/checks/cloud/google/iam/no_org_level_default_service_account_assignment.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoOrgLevelDefaultServiceAccountAssignment = rules.Register( +var CheckNoOrgLevelDefaultServiceAccountAssignment = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0008", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/iam/no_org_level_default_service_account_assignment.tf.go b/checks/cloud/google/iam/no_org_level_default_service_account_assignment.tf.go similarity index 100% rename from rules/cloud/policies/google/iam/no_org_level_default_service_account_assignment.tf.go rename to checks/cloud/google/iam/no_org_level_default_service_account_assignment.tf.go diff --git a/rules/cloud/policies/google/iam/no_org_level_default_service_account_assignment_test.go b/checks/cloud/google/iam/no_org_level_default_service_account_assignment_test.go similarity index 100% rename from rules/cloud/policies/google/iam/no_org_level_default_service_account_assignment_test.go rename to checks/cloud/google/iam/no_org_level_default_service_account_assignment_test.go diff --git a/rules/cloud/policies/google/iam/no_org_level_service_account_impersonation.go b/checks/cloud/google/iam/no_org_level_service_account_impersonation.go similarity index 94% rename from rules/cloud/policies/google/iam/no_org_level_service_account_impersonation.go rename to checks/cloud/google/iam/no_org_level_service_account_impersonation.go index 601e3208..a4bb1241 100755 --- a/rules/cloud/policies/google/iam/no_org_level_service_account_impersonation.go +++ b/checks/cloud/google/iam/no_org_level_service_account_impersonation.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoOrgLevelServiceAccountImpersonation = rules.Register( +var CheckNoOrgLevelServiceAccountImpersonation = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0009", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/iam/no_org_level_service_account_impersonation.tf.go b/checks/cloud/google/iam/no_org_level_service_account_impersonation.tf.go similarity index 100% rename from rules/cloud/policies/google/iam/no_org_level_service_account_impersonation.tf.go rename to checks/cloud/google/iam/no_org_level_service_account_impersonation.tf.go diff --git a/rules/cloud/policies/google/iam/no_org_level_service_account_impersonation_test.go b/checks/cloud/google/iam/no_org_level_service_account_impersonation_test.go similarity index 100% rename from rules/cloud/policies/google/iam/no_org_level_service_account_impersonation_test.go rename to checks/cloud/google/iam/no_org_level_service_account_impersonation_test.go diff --git a/rules/cloud/policies/google/iam/no_privileged_service_accounts.go b/checks/cloud/google/iam/no_privileged_service_accounts.go similarity index 97% rename from rules/cloud/policies/google/iam/no_privileged_service_accounts.go rename to checks/cloud/google/iam/no_privileged_service_accounts.go index 1caf1915..0e6afd94 100755 --- a/rules/cloud/policies/google/iam/no_privileged_service_accounts.go +++ b/checks/cloud/google/iam/no_privileged_service_accounts.go @@ -9,12 +9,12 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/defsec/pkg/providers" ) -var CheckNoPrivilegedServiceAccounts = rules.Register( +var CheckNoPrivilegedServiceAccounts = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0007", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/iam/no_privileged_service_accounts.tf.go b/checks/cloud/google/iam/no_privileged_service_accounts.tf.go similarity index 100% rename from rules/cloud/policies/google/iam/no_privileged_service_accounts.tf.go rename to checks/cloud/google/iam/no_privileged_service_accounts.tf.go diff --git a/rules/cloud/policies/google/iam/no_privileged_service_accounts_test.go b/checks/cloud/google/iam/no_privileged_service_accounts_test.go similarity index 100% rename from rules/cloud/policies/google/iam/no_privileged_service_accounts_test.go rename to checks/cloud/google/iam/no_privileged_service_accounts_test.go diff --git a/rules/cloud/policies/google/iam/no_project_level_default_service_account_assignment.go b/checks/cloud/google/iam/no_project_level_default_service_account_assignment.go similarity index 95% rename from rules/cloud/policies/google/iam/no_project_level_default_service_account_assignment.go rename to checks/cloud/google/iam/no_project_level_default_service_account_assignment.go index c5be27e3..5ea9164c 100755 --- a/rules/cloud/policies/google/iam/no_project_level_default_service_account_assignment.go +++ b/checks/cloud/google/iam/no_project_level_default_service_account_assignment.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoProjectLevelDefaultServiceAccountAssignment = rules.Register( +var CheckNoProjectLevelDefaultServiceAccountAssignment = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0006", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/iam/no_project_level_default_service_account_assignment.tf.go b/checks/cloud/google/iam/no_project_level_default_service_account_assignment.tf.go similarity index 100% rename from rules/cloud/policies/google/iam/no_project_level_default_service_account_assignment.tf.go rename to checks/cloud/google/iam/no_project_level_default_service_account_assignment.tf.go diff --git a/rules/cloud/policies/google/iam/no_project_level_default_service_account_assignment_test.go b/checks/cloud/google/iam/no_project_level_default_service_account_assignment_test.go similarity index 100% rename from rules/cloud/policies/google/iam/no_project_level_default_service_account_assignment_test.go rename to checks/cloud/google/iam/no_project_level_default_service_account_assignment_test.go diff --git a/rules/cloud/policies/google/iam/no_project_level_service_account_impersonation.go b/checks/cloud/google/iam/no_project_level_service_account_impersonation.go similarity index 94% rename from rules/cloud/policies/google/iam/no_project_level_service_account_impersonation.go rename to checks/cloud/google/iam/no_project_level_service_account_impersonation.go index 84c37f50..e08c0a1c 100755 --- a/rules/cloud/policies/google/iam/no_project_level_service_account_impersonation.go +++ b/checks/cloud/google/iam/no_project_level_service_account_impersonation.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoProjectLevelServiceAccountImpersonation = rules.Register( +var CheckNoProjectLevelServiceAccountImpersonation = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0011", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/iam/no_project_level_service_account_impersonation.tf.go b/checks/cloud/google/iam/no_project_level_service_account_impersonation.tf.go similarity index 100% rename from rules/cloud/policies/google/iam/no_project_level_service_account_impersonation.tf.go rename to checks/cloud/google/iam/no_project_level_service_account_impersonation.tf.go diff --git a/rules/cloud/policies/google/iam/no_project_level_service_account_impersonation_test.go b/checks/cloud/google/iam/no_project_level_service_account_impersonation_test.go similarity index 100% rename from rules/cloud/policies/google/iam/no_project_level_service_account_impersonation_test.go rename to checks/cloud/google/iam/no_project_level_service_account_impersonation_test.go diff --git a/rules/cloud/policies/google/iam/no_user_granted_permissions.go b/checks/cloud/google/iam/no_user_granted_permissions.go similarity index 97% rename from rules/cloud/policies/google/iam/no_user_granted_permissions.go rename to checks/cloud/google/iam/no_user_granted_permissions.go index 8fd6c237..3a80a762 100755 --- a/rules/cloud/policies/google/iam/no_user_granted_permissions.go +++ b/checks/cloud/google/iam/no_user_granted_permissions.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoUserGrantedPermissions = rules.Register( +var CheckNoUserGrantedPermissions = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0003", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/iam/no_user_granted_permissions.tf.go b/checks/cloud/google/iam/no_user_granted_permissions.tf.go similarity index 100% rename from rules/cloud/policies/google/iam/no_user_granted_permissions.tf.go rename to checks/cloud/google/iam/no_user_granted_permissions.tf.go diff --git a/rules/cloud/policies/google/iam/no_user_granted_permissions_test.go b/checks/cloud/google/iam/no_user_granted_permissions_test.go similarity index 100% rename from rules/cloud/policies/google/iam/no_user_granted_permissions_test.go rename to checks/cloud/google/iam/no_user_granted_permissions_test.go diff --git a/rules/cloud/policies/google/kms/rotate_kms_keys.go b/checks/cloud/google/kms/rotate_kms_keys.go similarity index 93% rename from rules/cloud/policies/google/kms/rotate_kms_keys.go rename to checks/cloud/google/kms/rotate_kms_keys.go index bff552a5..772dfd2d 100755 --- a/rules/cloud/policies/google/kms/rotate_kms_keys.go +++ b/checks/cloud/google/kms/rotate_kms_keys.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckRotateKmsKeys = rules.Register( +var CheckRotateKmsKeys = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0065", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/kms/rotate_kms_keys.tf.go b/checks/cloud/google/kms/rotate_kms_keys.tf.go similarity index 100% rename from rules/cloud/policies/google/kms/rotate_kms_keys.tf.go rename to checks/cloud/google/kms/rotate_kms_keys.tf.go diff --git a/rules/cloud/policies/google/kms/rotate_kms_keys_test.go b/checks/cloud/google/kms/rotate_kms_keys_test.go similarity index 100% rename from rules/cloud/policies/google/kms/rotate_kms_keys_test.go rename to checks/cloud/google/kms/rotate_kms_keys_test.go diff --git a/rules/cloud/policies/google/sql/enable_backup.go b/checks/cloud/google/sql/enable_backup.go similarity index 94% rename from rules/cloud/policies/google/sql/enable_backup.go rename to checks/cloud/google/sql/enable_backup.go index fef25a67..cac9ad4e 100755 --- a/rules/cloud/policies/google/sql/enable_backup.go +++ b/checks/cloud/google/sql/enable_backup.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableBackup = rules.Register( +var CheckEnableBackup = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0024", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/sql/enable_backup.tf.go b/checks/cloud/google/sql/enable_backup.tf.go similarity index 100% rename from rules/cloud/policies/google/sql/enable_backup.tf.go rename to checks/cloud/google/sql/enable_backup.tf.go diff --git a/rules/cloud/policies/google/sql/enable_backup_test.go b/checks/cloud/google/sql/enable_backup_test.go similarity index 100% rename from rules/cloud/policies/google/sql/enable_backup_test.go rename to checks/cloud/google/sql/enable_backup_test.go diff --git a/rules/cloud/policies/google/sql/enable_pg_temp_file_logging.go b/checks/cloud/google/sql/enable_pg_temp_file_logging.go similarity index 95% rename from rules/cloud/policies/google/sql/enable_pg_temp_file_logging.go rename to checks/cloud/google/sql/enable_pg_temp_file_logging.go index db86b255..616d650e 100755 --- a/rules/cloud/policies/google/sql/enable_pg_temp_file_logging.go +++ b/checks/cloud/google/sql/enable_pg_temp_file_logging.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnablePgTempFileLogging = rules.Register( +var CheckEnablePgTempFileLogging = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0014", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/sql/enable_pg_temp_file_logging.tf.go b/checks/cloud/google/sql/enable_pg_temp_file_logging.tf.go similarity index 100% rename from rules/cloud/policies/google/sql/enable_pg_temp_file_logging.tf.go rename to checks/cloud/google/sql/enable_pg_temp_file_logging.tf.go diff --git a/rules/cloud/policies/google/sql/enable_pg_temp_file_logging_test.go b/checks/cloud/google/sql/enable_pg_temp_file_logging_test.go similarity index 100% rename from rules/cloud/policies/google/sql/enable_pg_temp_file_logging_test.go rename to checks/cloud/google/sql/enable_pg_temp_file_logging_test.go diff --git a/rules/cloud/policies/google/sql/encrypt_in_transit_data.go b/checks/cloud/google/sql/encrypt_in_transit_data.go similarity index 93% rename from rules/cloud/policies/google/sql/encrypt_in_transit_data.go rename to checks/cloud/google/sql/encrypt_in_transit_data.go index 2ff9f617..16372ff3 100755 --- a/rules/cloud/policies/google/sql/encrypt_in_transit_data.go +++ b/checks/cloud/google/sql/encrypt_in_transit_data.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEncryptInTransitData = rules.Register( +var CheckEncryptInTransitData = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0015", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/sql/encrypt_in_transit_data.tf.go b/checks/cloud/google/sql/encrypt_in_transit_data.tf.go similarity index 100% rename from rules/cloud/policies/google/sql/encrypt_in_transit_data.tf.go rename to checks/cloud/google/sql/encrypt_in_transit_data.tf.go diff --git a/rules/cloud/policies/google/sql/encrypt_in_transit_data_test.go b/checks/cloud/google/sql/encrypt_in_transit_data_test.go similarity index 100% rename from rules/cloud/policies/google/sql/encrypt_in_transit_data_test.go rename to checks/cloud/google/sql/encrypt_in_transit_data_test.go diff --git a/rules/cloud/policies/google/sql/mysql_no_local_infile.go b/checks/cloud/google/sql/mysql_no_local_infile.go similarity index 94% rename from rules/cloud/policies/google/sql/mysql_no_local_infile.go rename to checks/cloud/google/sql/mysql_no_local_infile.go index 0af82960..a21fe98b 100755 --- a/rules/cloud/policies/google/sql/mysql_no_local_infile.go +++ b/checks/cloud/google/sql/mysql_no_local_infile.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckMysqlNoLocalInfile = rules.Register( +var CheckMysqlNoLocalInfile = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0026", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/sql/mysql_no_local_infile.tf.go b/checks/cloud/google/sql/mysql_no_local_infile.tf.go similarity index 100% rename from rules/cloud/policies/google/sql/mysql_no_local_infile.tf.go rename to checks/cloud/google/sql/mysql_no_local_infile.tf.go diff --git a/rules/cloud/policies/google/sql/mysql_no_local_infile_test.go b/checks/cloud/google/sql/mysql_no_local_infile_test.go similarity index 100% rename from rules/cloud/policies/google/sql/mysql_no_local_infile_test.go rename to checks/cloud/google/sql/mysql_no_local_infile_test.go diff --git a/rules/cloud/policies/google/sql/no_contained_db_auth.go b/checks/cloud/google/sql/no_contained_db_auth.go similarity index 94% rename from rules/cloud/policies/google/sql/no_contained_db_auth.go rename to checks/cloud/google/sql/no_contained_db_auth.go index df14ef01..bf3b1044 100755 --- a/rules/cloud/policies/google/sql/no_contained_db_auth.go +++ b/checks/cloud/google/sql/no_contained_db_auth.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoContainedDbAuth = rules.Register( +var CheckNoContainedDbAuth = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0023", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/sql/no_contained_db_auth.tf.go b/checks/cloud/google/sql/no_contained_db_auth.tf.go similarity index 100% rename from rules/cloud/policies/google/sql/no_contained_db_auth.tf.go rename to checks/cloud/google/sql/no_contained_db_auth.tf.go diff --git a/rules/cloud/policies/google/sql/no_contained_db_auth_test.go b/checks/cloud/google/sql/no_contained_db_auth_test.go similarity index 100% rename from rules/cloud/policies/google/sql/no_contained_db_auth_test.go rename to checks/cloud/google/sql/no_contained_db_auth_test.go diff --git a/rules/cloud/policies/google/sql/no_cross_db_ownership_chaining.go b/checks/cloud/google/sql/no_cross_db_ownership_chaining.go similarity index 94% rename from rules/cloud/policies/google/sql/no_cross_db_ownership_chaining.go rename to checks/cloud/google/sql/no_cross_db_ownership_chaining.go index dec577e7..9db398fb 100755 --- a/rules/cloud/policies/google/sql/no_cross_db_ownership_chaining.go +++ b/checks/cloud/google/sql/no_cross_db_ownership_chaining.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoCrossDbOwnershipChaining = rules.Register( +var CheckNoCrossDbOwnershipChaining = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0019", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/sql/no_cross_db_ownership_chaining.tf.go b/checks/cloud/google/sql/no_cross_db_ownership_chaining.tf.go similarity index 100% rename from rules/cloud/policies/google/sql/no_cross_db_ownership_chaining.tf.go rename to checks/cloud/google/sql/no_cross_db_ownership_chaining.tf.go diff --git a/rules/cloud/policies/google/sql/no_cross_db_ownership_chaining_test.go b/checks/cloud/google/sql/no_cross_db_ownership_chaining_test.go similarity index 100% rename from rules/cloud/policies/google/sql/no_cross_db_ownership_chaining_test.go rename to checks/cloud/google/sql/no_cross_db_ownership_chaining_test.go diff --git a/rules/cloud/policies/google/sql/no_public_access.go b/checks/cloud/google/sql/no_public_access.go similarity index 95% rename from rules/cloud/policies/google/sql/no_public_access.go rename to checks/cloud/google/sql/no_public_access.go index 66021e4d..212ba052 100755 --- a/rules/cloud/policies/google/sql/no_public_access.go +++ b/checks/cloud/google/sql/no_public_access.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/trivy-policies/internal/cidr" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicAccess = rules.Register( +var CheckNoPublicAccess = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0017", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/sql/no_public_access.tf.go b/checks/cloud/google/sql/no_public_access.tf.go similarity index 100% rename from rules/cloud/policies/google/sql/no_public_access.tf.go rename to checks/cloud/google/sql/no_public_access.tf.go diff --git a/rules/cloud/policies/google/sql/no_public_access_test.go b/checks/cloud/google/sql/no_public_access_test.go similarity index 100% rename from rules/cloud/policies/google/sql/no_public_access_test.go rename to checks/cloud/google/sql/no_public_access_test.go diff --git a/rules/cloud/policies/google/sql/pg_log_checkpoints.go b/checks/cloud/google/sql/pg_log_checkpoints.go similarity index 94% rename from rules/cloud/policies/google/sql/pg_log_checkpoints.go rename to checks/cloud/google/sql/pg_log_checkpoints.go index 50dae19f..e967ec2d 100755 --- a/rules/cloud/policies/google/sql/pg_log_checkpoints.go +++ b/checks/cloud/google/sql/pg_log_checkpoints.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckPgLogCheckpoints = rules.Register( +var CheckPgLogCheckpoints = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0025", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/sql/pg_log_checkpoints.tf.go b/checks/cloud/google/sql/pg_log_checkpoints.tf.go similarity index 100% rename from rules/cloud/policies/google/sql/pg_log_checkpoints.tf.go rename to checks/cloud/google/sql/pg_log_checkpoints.tf.go diff --git a/rules/cloud/policies/google/sql/pg_log_checkpoints_test.go b/checks/cloud/google/sql/pg_log_checkpoints_test.go similarity index 100% rename from rules/cloud/policies/google/sql/pg_log_checkpoints_test.go rename to checks/cloud/google/sql/pg_log_checkpoints_test.go diff --git a/rules/cloud/policies/google/sql/pg_log_connections.go b/checks/cloud/google/sql/pg_log_connections.go similarity index 94% rename from rules/cloud/policies/google/sql/pg_log_connections.go rename to checks/cloud/google/sql/pg_log_connections.go index 151c7796..864e6663 100755 --- a/rules/cloud/policies/google/sql/pg_log_connections.go +++ b/checks/cloud/google/sql/pg_log_connections.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckPgLogConnections = rules.Register( +var CheckPgLogConnections = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0016", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/sql/pg_log_connections.tf.go b/checks/cloud/google/sql/pg_log_connections.tf.go similarity index 100% rename from rules/cloud/policies/google/sql/pg_log_connections.tf.go rename to checks/cloud/google/sql/pg_log_connections.tf.go diff --git a/rules/cloud/policies/google/sql/pg_log_connections_test.go b/checks/cloud/google/sql/pg_log_connections_test.go similarity index 100% rename from rules/cloud/policies/google/sql/pg_log_connections_test.go rename to checks/cloud/google/sql/pg_log_connections_test.go diff --git a/rules/cloud/policies/google/sql/pg_log_disconnections.go b/checks/cloud/google/sql/pg_log_disconnections.go similarity index 94% rename from rules/cloud/policies/google/sql/pg_log_disconnections.go rename to checks/cloud/google/sql/pg_log_disconnections.go index 41c4045e..84106252 100755 --- a/rules/cloud/policies/google/sql/pg_log_disconnections.go +++ b/checks/cloud/google/sql/pg_log_disconnections.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckPgLogDisconnections = rules.Register( +var CheckPgLogDisconnections = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0022", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/sql/pg_log_disconnections.tf.go b/checks/cloud/google/sql/pg_log_disconnections.tf.go similarity index 100% rename from rules/cloud/policies/google/sql/pg_log_disconnections.tf.go rename to checks/cloud/google/sql/pg_log_disconnections.tf.go diff --git a/rules/cloud/policies/google/sql/pg_log_disconnections_test.go b/checks/cloud/google/sql/pg_log_disconnections_test.go similarity index 100% rename from rules/cloud/policies/google/sql/pg_log_disconnections_test.go rename to checks/cloud/google/sql/pg_log_disconnections_test.go diff --git a/rules/cloud/policies/google/sql/pg_log_errors.go b/checks/cloud/google/sql/pg_log_errors.go similarity index 94% rename from rules/cloud/policies/google/sql/pg_log_errors.go rename to checks/cloud/google/sql/pg_log_errors.go index f2695ccb..3cc92ecf 100755 --- a/rules/cloud/policies/google/sql/pg_log_errors.go +++ b/checks/cloud/google/sql/pg_log_errors.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckPgLogErrors = rules.Register( +var CheckPgLogErrors = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0018", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/sql/pg_log_errors.tf.go b/checks/cloud/google/sql/pg_log_errors.tf.go similarity index 100% rename from rules/cloud/policies/google/sql/pg_log_errors.tf.go rename to checks/cloud/google/sql/pg_log_errors.tf.go diff --git a/rules/cloud/policies/google/sql/pg_log_errors_test.go b/checks/cloud/google/sql/pg_log_errors_test.go similarity index 100% rename from rules/cloud/policies/google/sql/pg_log_errors_test.go rename to checks/cloud/google/sql/pg_log_errors_test.go diff --git a/rules/cloud/policies/google/sql/pg_log_lock_waits.go b/checks/cloud/google/sql/pg_log_lock_waits.go similarity index 94% rename from rules/cloud/policies/google/sql/pg_log_lock_waits.go rename to checks/cloud/google/sql/pg_log_lock_waits.go index 86d80f68..19bf53a9 100755 --- a/rules/cloud/policies/google/sql/pg_log_lock_waits.go +++ b/checks/cloud/google/sql/pg_log_lock_waits.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckPgLogLockWaits = rules.Register( +var CheckPgLogLockWaits = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0020", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/sql/pg_log_lock_waits.tf.go b/checks/cloud/google/sql/pg_log_lock_waits.tf.go similarity index 100% rename from rules/cloud/policies/google/sql/pg_log_lock_waits.tf.go rename to checks/cloud/google/sql/pg_log_lock_waits.tf.go diff --git a/rules/cloud/policies/google/sql/pg_log_lock_waits_test.go b/checks/cloud/google/sql/pg_log_lock_waits_test.go similarity index 100% rename from rules/cloud/policies/google/sql/pg_log_lock_waits_test.go rename to checks/cloud/google/sql/pg_log_lock_waits_test.go diff --git a/rules/cloud/policies/google/sql/pg_no_min_statement_logging.go b/checks/cloud/google/sql/pg_no_min_statement_logging.go similarity index 94% rename from rules/cloud/policies/google/sql/pg_no_min_statement_logging.go rename to checks/cloud/google/sql/pg_no_min_statement_logging.go index dd78cfe3..a3897b75 100755 --- a/rules/cloud/policies/google/sql/pg_no_min_statement_logging.go +++ b/checks/cloud/google/sql/pg_no_min_statement_logging.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckPgNoMinStatementLogging = rules.Register( +var CheckPgNoMinStatementLogging = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0021", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/sql/pg_no_min_statement_logging.tf.go b/checks/cloud/google/sql/pg_no_min_statement_logging.tf.go similarity index 100% rename from rules/cloud/policies/google/sql/pg_no_min_statement_logging.tf.go rename to checks/cloud/google/sql/pg_no_min_statement_logging.tf.go diff --git a/rules/cloud/policies/google/sql/pg_no_min_statement_logging_test.go b/checks/cloud/google/sql/pg_no_min_statement_logging_test.go similarity index 100% rename from rules/cloud/policies/google/sql/pg_no_min_statement_logging_test.go rename to checks/cloud/google/sql/pg_no_min_statement_logging_test.go diff --git a/rules/cloud/policies/google/storage/bucket_encryption_customer_key.go b/checks/cloud/google/storage/bucket_encryption_customer_key.go similarity index 93% rename from rules/cloud/policies/google/storage/bucket_encryption_customer_key.go rename to checks/cloud/google/storage/bucket_encryption_customer_key.go index baa8134a..8e3a2d3b 100755 --- a/rules/cloud/policies/google/storage/bucket_encryption_customer_key.go +++ b/checks/cloud/google/storage/bucket_encryption_customer_key.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckBucketEncryptionCustomerKey = rules.Register( +var CheckBucketEncryptionCustomerKey = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0066", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/storage/bucket_encryption_customer_key.tf.go b/checks/cloud/google/storage/bucket_encryption_customer_key.tf.go similarity index 100% rename from rules/cloud/policies/google/storage/bucket_encryption_customer_key.tf.go rename to checks/cloud/google/storage/bucket_encryption_customer_key.tf.go diff --git a/rules/cloud/policies/google/storage/bucket_encryption_customer_test.go b/checks/cloud/google/storage/bucket_encryption_customer_test.go similarity index 100% rename from rules/cloud/policies/google/storage/bucket_encryption_customer_test.go rename to checks/cloud/google/storage/bucket_encryption_customer_test.go diff --git a/rules/cloud/policies/google/storage/enable_ubla.go b/checks/cloud/google/storage/enable_ubla.go similarity index 95% rename from rules/cloud/policies/google/storage/enable_ubla.go rename to checks/cloud/google/storage/enable_ubla.go index 085af6e4..4e749ca1 100755 --- a/rules/cloud/policies/google/storage/enable_ubla.go +++ b/checks/cloud/google/storage/enable_ubla.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckEnableUbla = rules.Register( +var CheckEnableUbla = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0002", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/storage/enable_ubla.tf.go b/checks/cloud/google/storage/enable_ubla.tf.go similarity index 100% rename from rules/cloud/policies/google/storage/enable_ubla.tf.go rename to checks/cloud/google/storage/enable_ubla.tf.go diff --git a/rules/cloud/policies/google/storage/enable_ubla_test.go b/checks/cloud/google/storage/enable_ubla_test.go similarity index 100% rename from rules/cloud/policies/google/storage/enable_ubla_test.go rename to checks/cloud/google/storage/enable_ubla_test.go diff --git a/rules/cloud/policies/google/storage/no_public_access.go b/checks/cloud/google/storage/no_public_access.go similarity index 95% rename from rules/cloud/policies/google/storage/no_public_access.go rename to checks/cloud/google/storage/no_public_access.go index ebc47ca3..b7138f73 100755 --- a/rules/cloud/policies/google/storage/no_public_access.go +++ b/checks/cloud/google/storage/no_public_access.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicAccess = rules.Register( +var CheckNoPublicAccess = checks.Register( scan.Rule{ AVDID: "AVD-GCP-0001", Provider: providers.GoogleProvider, diff --git a/rules/cloud/policies/google/storage/no_public_access.tf.go b/checks/cloud/google/storage/no_public_access.tf.go similarity index 100% rename from rules/cloud/policies/google/storage/no_public_access.tf.go rename to checks/cloud/google/storage/no_public_access.tf.go diff --git a/rules/cloud/policies/google/storage/no_public_access_test.go b/checks/cloud/google/storage/no_public_access_test.go similarity index 100% rename from rules/cloud/policies/google/storage/no_public_access_test.go rename to checks/cloud/google/storage/no_public_access_test.go diff --git a/rules/cloud/policies/nifcloud/computing/add_description_to_security_group.go b/checks/cloud/nifcloud/computing/add_description_to_security_group.go similarity index 94% rename from rules/cloud/policies/nifcloud/computing/add_description_to_security_group.go rename to checks/cloud/nifcloud/computing/add_description_to_security_group.go index c4c5a0e0..51845d52 100755 --- a/rules/cloud/policies/nifcloud/computing/add_description_to_security_group.go +++ b/checks/cloud/nifcloud/computing/add_description_to_security_group.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckAddDescriptionToSecurityGroup = rules.Register( +var CheckAddDescriptionToSecurityGroup = checks.Register( scan.Rule{ AVDID: "AVD-NIF-0002", Aliases: []string{"nifcloud-computing-add-description-to-security-group"}, diff --git a/rules/cloud/policies/nifcloud/computing/add_description_to_security_group.tf.go b/checks/cloud/nifcloud/computing/add_description_to_security_group.tf.go similarity index 100% rename from rules/cloud/policies/nifcloud/computing/add_description_to_security_group.tf.go rename to checks/cloud/nifcloud/computing/add_description_to_security_group.tf.go diff --git a/rules/cloud/policies/nifcloud/computing/add_description_to_security_group_rule.go b/checks/cloud/nifcloud/computing/add_description_to_security_group_rule.go similarity index 85% rename from rules/cloud/policies/nifcloud/computing/add_description_to_security_group_rule.go rename to checks/cloud/nifcloud/computing/add_description_to_security_group_rule.go index 8bd42b12..ecc5ba93 100755 --- a/rules/cloud/policies/nifcloud/computing/add_description_to_security_group_rule.go +++ b/checks/cloud/nifcloud/computing/add_description_to_security_group_rule.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckAddDescriptionToSecurityGroupRule = rules.Register( +var CheckAddDescriptionToSecurityGroupRule = checks.Register( scan.Rule{ AVDID: "AVD-NIF-0003", Aliases: []string{"nifcloud-computing-add-description-to-security-group-rule"}, @@ -17,8 +17,8 @@ var CheckAddDescriptionToSecurityGroupRule = rules.Register( ShortCode: "add-description-to-security-group-rule", Summary: "Missing description for security group rule.", Impact: "Descriptions provide context for the firewall rule reasons", - Resolution: "Add descriptions for all security groups rules", - Explanation: `Security group rules should include a description for auditing purposes. + Resolution: "Add descriptions for all security groups checks", + Explanation: `Security group checks should include a description for auditing purposes. Simplifies auditing, debugging, and managing security groups.`, Links: []string{ diff --git a/rules/cloud/policies/nifcloud/computing/add_description_to_security_group_rule.tf.go b/checks/cloud/nifcloud/computing/add_description_to_security_group_rule.tf.go similarity index 100% rename from rules/cloud/policies/nifcloud/computing/add_description_to_security_group_rule.tf.go rename to checks/cloud/nifcloud/computing/add_description_to_security_group_rule.tf.go diff --git a/rules/cloud/policies/nifcloud/computing/add_description_to_security_group_rule_test.go b/checks/cloud/nifcloud/computing/add_description_to_security_group_rule_test.go similarity index 100% rename from rules/cloud/policies/nifcloud/computing/add_description_to_security_group_rule_test.go rename to checks/cloud/nifcloud/computing/add_description_to_security_group_rule_test.go diff --git a/rules/cloud/policies/nifcloud/computing/add_description_to_security_group_test.go b/checks/cloud/nifcloud/computing/add_description_to_security_group_test.go similarity index 100% rename from rules/cloud/policies/nifcloud/computing/add_description_to_security_group_test.go rename to checks/cloud/nifcloud/computing/add_description_to_security_group_test.go diff --git a/rules/cloud/policies/nifcloud/computing/add_security_group_to_instance.go b/checks/cloud/nifcloud/computing/add_security_group_to_instance.go similarity index 93% rename from rules/cloud/policies/nifcloud/computing/add_security_group_to_instance.go rename to checks/cloud/nifcloud/computing/add_security_group_to_instance.go index c3d97590..64ab0c5c 100755 --- a/rules/cloud/policies/nifcloud/computing/add_security_group_to_instance.go +++ b/checks/cloud/nifcloud/computing/add_security_group_to_instance.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckAddSecurityGroupToInstance = rules.Register( +var CheckAddSecurityGroupToInstance = checks.Register( scan.Rule{ AVDID: "AVD-NIF-0004", Aliases: []string{"nifcloud-computing-add-security-group-to-instance"}, diff --git a/rules/cloud/policies/nifcloud/computing/add_security_group_to_instance.tf.go b/checks/cloud/nifcloud/computing/add_security_group_to_instance.tf.go similarity index 100% rename from rules/cloud/policies/nifcloud/computing/add_security_group_to_instance.tf.go rename to checks/cloud/nifcloud/computing/add_security_group_to_instance.tf.go diff --git a/rules/cloud/policies/nifcloud/computing/add_security_group_to_instance_test.go b/checks/cloud/nifcloud/computing/add_security_group_to_instance_test.go similarity index 100% rename from rules/cloud/policies/nifcloud/computing/add_security_group_to_instance_test.go rename to checks/cloud/nifcloud/computing/add_security_group_to_instance_test.go diff --git a/rules/cloud/policies/nifcloud/computing/no_common_private_instance.go b/checks/cloud/nifcloud/computing/no_common_private_instance.go similarity index 93% rename from rules/cloud/policies/nifcloud/computing/no_common_private_instance.go rename to checks/cloud/nifcloud/computing/no_common_private_instance.go index e68429b3..68ffb555 100755 --- a/rules/cloud/policies/nifcloud/computing/no_common_private_instance.go +++ b/checks/cloud/nifcloud/computing/no_common_private_instance.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoCommonPrivateInstance = rules.Register( +var CheckNoCommonPrivateInstance = checks.Register( scan.Rule{ AVDID: "AVD-NIF-0005", Aliases: []string{"nifcloud-computing-no-common-private-instance"}, diff --git a/rules/cloud/policies/nifcloud/computing/no_common_private_instance.tf.go b/checks/cloud/nifcloud/computing/no_common_private_instance.tf.go similarity index 100% rename from rules/cloud/policies/nifcloud/computing/no_common_private_instance.tf.go rename to checks/cloud/nifcloud/computing/no_common_private_instance.tf.go diff --git a/rules/cloud/policies/nifcloud/computing/no_common_private_instance_test.go b/checks/cloud/nifcloud/computing/no_common_private_instance_test.go similarity index 100% rename from rules/cloud/policies/nifcloud/computing/no_common_private_instance_test.go rename to checks/cloud/nifcloud/computing/no_common_private_instance_test.go diff --git a/rules/cloud/policies/nifcloud/computing/no_public_ingress_sgr.go b/checks/cloud/nifcloud/computing/no_public_ingress_sgr.go similarity index 94% rename from rules/cloud/policies/nifcloud/computing/no_public_ingress_sgr.go rename to checks/cloud/nifcloud/computing/no_public_ingress_sgr.go index f9e1cd6a..f3712044 100755 --- a/rules/cloud/policies/nifcloud/computing/no_public_ingress_sgr.go +++ b/checks/cloud/nifcloud/computing/no_public_ingress_sgr.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/trivy-policies/internal/cidr" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicIngressSgr = rules.Register( +var CheckNoPublicIngressSgr = checks.Register( scan.Rule{ AVDID: "AVD-NIF-0001", Aliases: []string{"nifcloud-computing-no-public-ingress-sgr"}, diff --git a/rules/cloud/policies/nifcloud/computing/no_public_ingress_sgr.tf.go b/checks/cloud/nifcloud/computing/no_public_ingress_sgr.tf.go similarity index 100% rename from rules/cloud/policies/nifcloud/computing/no_public_ingress_sgr.tf.go rename to checks/cloud/nifcloud/computing/no_public_ingress_sgr.tf.go diff --git a/rules/cloud/policies/nifcloud/computing/no_public_ingress_sgr_test.go b/checks/cloud/nifcloud/computing/no_public_ingress_sgr_test.go similarity index 100% rename from rules/cloud/policies/nifcloud/computing/no_public_ingress_sgr_test.go rename to checks/cloud/nifcloud/computing/no_public_ingress_sgr_test.go diff --git a/rules/cloud/policies/nifcloud/dns/remove_verified_record.go b/checks/cloud/nifcloud/dns/remove_verified_record.go similarity index 91% rename from rules/cloud/policies/nifcloud/dns/remove_verified_record.go rename to checks/cloud/nifcloud/dns/remove_verified_record.go index 6294bf64..d21eefd7 100644 --- a/rules/cloud/policies/nifcloud/dns/remove_verified_record.go +++ b/checks/cloud/nifcloud/dns/remove_verified_record.go @@ -8,12 +8,12 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/defsec/pkg/providers" ) -var CheckRemoveVerifiedRecord = rules.Register( +var CheckRemoveVerifiedRecord = checks.Register( scan.Rule{ AVDID: "AVD-NIF-0007", Provider: providers.NifcloudProvider, diff --git a/rules/cloud/policies/nifcloud/dns/remove_verified_record_test.go b/checks/cloud/nifcloud/dns/remove_verified_record_test.go similarity index 100% rename from rules/cloud/policies/nifcloud/dns/remove_verified_record_test.go rename to checks/cloud/nifcloud/dns/remove_verified_record_test.go diff --git a/rules/cloud/policies/nifcloud/nas/add_description_to_nas_security_group.go b/checks/cloud/nifcloud/nas/add_description_to_nas_security_group.go similarity index 94% rename from rules/cloud/policies/nifcloud/nas/add_description_to_nas_security_group.go rename to checks/cloud/nifcloud/nas/add_description_to_nas_security_group.go index faf4da41..eeba1a56 100755 --- a/rules/cloud/policies/nifcloud/nas/add_description_to_nas_security_group.go +++ b/checks/cloud/nifcloud/nas/add_description_to_nas_security_group.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckAddDescriptionToNASSecurityGroup = rules.Register( +var CheckAddDescriptionToNASSecurityGroup = checks.Register( scan.Rule{ AVDID: "AVD-NIF-0015", Aliases: []string{"nifcloud-nas-add-description-to-nas-security-group"}, diff --git a/rules/cloud/policies/nifcloud/nas/add_description_to_nas_security_group.tf.go b/checks/cloud/nifcloud/nas/add_description_to_nas_security_group.tf.go similarity index 100% rename from rules/cloud/policies/nifcloud/nas/add_description_to_nas_security_group.tf.go rename to checks/cloud/nifcloud/nas/add_description_to_nas_security_group.tf.go diff --git a/rules/cloud/policies/nifcloud/nas/add_description_to_nas_security_group_test.go b/checks/cloud/nifcloud/nas/add_description_to_nas_security_group_test.go similarity index 100% rename from rules/cloud/policies/nifcloud/nas/add_description_to_nas_security_group_test.go rename to checks/cloud/nifcloud/nas/add_description_to_nas_security_group_test.go diff --git a/rules/cloud/policies/nifcloud/nas/no_common_private_nas_instance.go b/checks/cloud/nifcloud/nas/no_common_private_nas_instance.go similarity index 93% rename from rules/cloud/policies/nifcloud/nas/no_common_private_nas_instance.go rename to checks/cloud/nifcloud/nas/no_common_private_nas_instance.go index 913f8fee..92ab4955 100755 --- a/rules/cloud/policies/nifcloud/nas/no_common_private_nas_instance.go +++ b/checks/cloud/nifcloud/nas/no_common_private_nas_instance.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoCommonPrivateNASInstance = rules.Register( +var CheckNoCommonPrivateNASInstance = checks.Register( scan.Rule{ AVDID: "AVD-NIF-0013", Aliases: []string{"nifcloud-nas-no-common-private-nas-instance"}, diff --git a/rules/cloud/policies/nifcloud/nas/no_common_private_nas_instance.tf.go b/checks/cloud/nifcloud/nas/no_common_private_nas_instance.tf.go similarity index 100% rename from rules/cloud/policies/nifcloud/nas/no_common_private_nas_instance.tf.go rename to checks/cloud/nifcloud/nas/no_common_private_nas_instance.tf.go diff --git a/rules/cloud/policies/nifcloud/nas/no_common_private_nas_instance_test.go b/checks/cloud/nifcloud/nas/no_common_private_nas_instance_test.go similarity index 100% rename from rules/cloud/policies/nifcloud/nas/no_common_private_nas_instance_test.go rename to checks/cloud/nifcloud/nas/no_common_private_nas_instance_test.go diff --git a/rules/cloud/policies/nifcloud/nas/no_public_ingress_nas_sgr.go b/checks/cloud/nifcloud/nas/no_public_ingress_nas_sgr.go similarity index 94% rename from rules/cloud/policies/nifcloud/nas/no_public_ingress_nas_sgr.go rename to checks/cloud/nifcloud/nas/no_public_ingress_nas_sgr.go index 40076d05..6fc65300 100755 --- a/rules/cloud/policies/nifcloud/nas/no_public_ingress_nas_sgr.go +++ b/checks/cloud/nifcloud/nas/no_public_ingress_nas_sgr.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/trivy-policies/internal/cidr" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicIngressNASSgr = rules.Register( +var CheckNoPublicIngressNASSgr = checks.Register( scan.Rule{ AVDID: "AVD-NIF-0014", Aliases: []string{"nifcloud-nas-no-public-ingress-nas-sgr"}, diff --git a/rules/cloud/policies/nifcloud/nas/no_public_ingress_nas_sgr.tf.go b/checks/cloud/nifcloud/nas/no_public_ingress_nas_sgr.tf.go similarity index 100% rename from rules/cloud/policies/nifcloud/nas/no_public_ingress_nas_sgr.tf.go rename to checks/cloud/nifcloud/nas/no_public_ingress_nas_sgr.tf.go diff --git a/rules/cloud/policies/nifcloud/nas/no_public_ingress_nas_sgr_test.go b/checks/cloud/nifcloud/nas/no_public_ingress_nas_sgr_test.go similarity index 100% rename from rules/cloud/policies/nifcloud/nas/no_public_ingress_nas_sgr_test.go rename to checks/cloud/nifcloud/nas/no_public_ingress_nas_sgr_test.go diff --git a/rules/cloud/policies/nifcloud/network/add_security_group_to_router.go b/checks/cloud/nifcloud/network/add_security_group_to_router.go similarity index 93% rename from rules/cloud/policies/nifcloud/network/add_security_group_to_router.go rename to checks/cloud/nifcloud/network/add_security_group_to_router.go index 8577d6f6..5c4a5976 100755 --- a/rules/cloud/policies/nifcloud/network/add_security_group_to_router.go +++ b/checks/cloud/nifcloud/network/add_security_group_to_router.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckAddSecurityGroupToRouter = rules.Register( +var CheckAddSecurityGroupToRouter = checks.Register( scan.Rule{ AVDID: "AVD-NIF-0016", Aliases: []string{"nifcloud-computing-add-security-group-to-router"}, diff --git a/rules/cloud/policies/nifcloud/network/add_security_group_to_router.tf.go b/checks/cloud/nifcloud/network/add_security_group_to_router.tf.go similarity index 100% rename from rules/cloud/policies/nifcloud/network/add_security_group_to_router.tf.go rename to checks/cloud/nifcloud/network/add_security_group_to_router.tf.go diff --git a/rules/cloud/policies/nifcloud/network/add_security_group_to_router_test.go b/checks/cloud/nifcloud/network/add_security_group_to_router_test.go similarity index 100% rename from rules/cloud/policies/nifcloud/network/add_security_group_to_router_test.go rename to checks/cloud/nifcloud/network/add_security_group_to_router_test.go diff --git a/rules/cloud/policies/nifcloud/network/add_security_group_to_vpn_gateway.go b/checks/cloud/nifcloud/network/add_security_group_to_vpn_gateway.go similarity index 93% rename from rules/cloud/policies/nifcloud/network/add_security_group_to_vpn_gateway.go rename to checks/cloud/nifcloud/network/add_security_group_to_vpn_gateway.go index 3fc7c21d..f30382bd 100755 --- a/rules/cloud/policies/nifcloud/network/add_security_group_to_vpn_gateway.go +++ b/checks/cloud/nifcloud/network/add_security_group_to_vpn_gateway.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckAddSecurityGroupToVpnGateway = rules.Register( +var CheckAddSecurityGroupToVpnGateway = checks.Register( scan.Rule{ AVDID: "AVD-NIF-0018", Aliases: []string{"nifcloud-computing-add-security-group-to-vpn-gateway"}, diff --git a/rules/cloud/policies/nifcloud/network/add_security_group_to_vpn_gateway.tf.go b/checks/cloud/nifcloud/network/add_security_group_to_vpn_gateway.tf.go similarity index 100% rename from rules/cloud/policies/nifcloud/network/add_security_group_to_vpn_gateway.tf.go rename to checks/cloud/nifcloud/network/add_security_group_to_vpn_gateway.tf.go diff --git a/rules/cloud/policies/nifcloud/network/add_security_group_to_vpn_gateway_test.go b/checks/cloud/nifcloud/network/add_security_group_to_vpn_gateway_test.go similarity index 100% rename from rules/cloud/policies/nifcloud/network/add_security_group_to_vpn_gateway_test.go rename to checks/cloud/nifcloud/network/add_security_group_to_vpn_gateway_test.go diff --git a/rules/cloud/policies/nifcloud/network/http_not_used.go b/checks/cloud/nifcloud/network/http_not_used.go similarity index 95% rename from rules/cloud/policies/nifcloud/network/http_not_used.go rename to checks/cloud/nifcloud/network/http_not_used.go index fbe0cfa5..ec360e2c 100755 --- a/rules/cloud/policies/nifcloud/network/http_not_used.go +++ b/checks/cloud/nifcloud/network/http_not_used.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckHttpNotUsed = rules.Register( +var CheckHttpNotUsed = checks.Register( scan.Rule{ AVDID: "AVD-NIF-0021", Provider: providers.NifcloudProvider, diff --git a/rules/cloud/policies/nifcloud/network/http_not_used.tf.go b/checks/cloud/nifcloud/network/http_not_used.tf.go similarity index 100% rename from rules/cloud/policies/nifcloud/network/http_not_used.tf.go rename to checks/cloud/nifcloud/network/http_not_used.tf.go diff --git a/rules/cloud/policies/nifcloud/network/http_not_used_test.go b/checks/cloud/nifcloud/network/http_not_used_test.go similarity index 100% rename from rules/cloud/policies/nifcloud/network/http_not_used_test.go rename to checks/cloud/nifcloud/network/http_not_used_test.go diff --git a/rules/cloud/policies/nifcloud/network/no_common_private_elb.go b/checks/cloud/nifcloud/network/no_common_private_elb.go similarity index 93% rename from rules/cloud/policies/nifcloud/network/no_common_private_elb.go rename to checks/cloud/nifcloud/network/no_common_private_elb.go index c2f7f1d8..89360be4 100755 --- a/rules/cloud/policies/nifcloud/network/no_common_private_elb.go +++ b/checks/cloud/nifcloud/network/no_common_private_elb.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoCommonPrivateElasticLoadBalancer = rules.Register( +var CheckNoCommonPrivateElasticLoadBalancer = checks.Register( scan.Rule{ AVDID: "AVD-NIF-0019", Aliases: []string{"nifcloud-network-no-common-private-elb"}, diff --git a/rules/cloud/policies/nifcloud/network/no_common_private_elb.tf.go b/checks/cloud/nifcloud/network/no_common_private_elb.tf.go similarity index 100% rename from rules/cloud/policies/nifcloud/network/no_common_private_elb.tf.go rename to checks/cloud/nifcloud/network/no_common_private_elb.tf.go diff --git a/rules/cloud/policies/nifcloud/network/no_common_private_elb_test.go b/checks/cloud/nifcloud/network/no_common_private_elb_test.go similarity index 100% rename from rules/cloud/policies/nifcloud/network/no_common_private_elb_test.go rename to checks/cloud/nifcloud/network/no_common_private_elb_test.go diff --git a/rules/cloud/policies/nifcloud/network/no_common_private_router.go b/checks/cloud/nifcloud/network/no_common_private_router.go similarity index 93% rename from rules/cloud/policies/nifcloud/network/no_common_private_router.go rename to checks/cloud/nifcloud/network/no_common_private_router.go index 1f8d0e95..ab89c2ba 100755 --- a/rules/cloud/policies/nifcloud/network/no_common_private_router.go +++ b/checks/cloud/nifcloud/network/no_common_private_router.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoCommonPrivateRouter = rules.Register( +var CheckNoCommonPrivateRouter = checks.Register( scan.Rule{ AVDID: "AVD-NIF-0017", Aliases: []string{"nifcloud-network-no-common-private-router"}, diff --git a/rules/cloud/policies/nifcloud/network/no_common_private_router.tf.go b/checks/cloud/nifcloud/network/no_common_private_router.tf.go similarity index 100% rename from rules/cloud/policies/nifcloud/network/no_common_private_router.tf.go rename to checks/cloud/nifcloud/network/no_common_private_router.tf.go diff --git a/rules/cloud/policies/nifcloud/network/no_common_private_router_test.go b/checks/cloud/nifcloud/network/no_common_private_router_test.go similarity index 100% rename from rules/cloud/policies/nifcloud/network/no_common_private_router_test.go rename to checks/cloud/nifcloud/network/no_common_private_router_test.go diff --git a/rules/cloud/policies/nifcloud/network/use_secure_tls_policy.go b/checks/cloud/nifcloud/network/use_secure_tls_policy.go similarity index 94% rename from rules/cloud/policies/nifcloud/network/use_secure_tls_policy.go rename to checks/cloud/nifcloud/network/use_secure_tls_policy.go index fb200970..0780e54b 100755 --- a/rules/cloud/policies/nifcloud/network/use_secure_tls_policy.go +++ b/checks/cloud/nifcloud/network/use_secure_tls_policy.go @@ -5,7 +5,7 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) var outdatedSSLPolicies = []string{ @@ -22,7 +22,7 @@ var outdatedSSLPolicies = []string{ "Ats Ciphers D ver1", } -var CheckUseSecureTlsPolicy = rules.Register( +var CheckUseSecureTlsPolicy = checks.Register( scan.Rule{ AVDID: "AVD-NIF-0020", Provider: providers.NifcloudProvider, diff --git a/rules/cloud/policies/nifcloud/network/use_secure_tls_policy.tf.go b/checks/cloud/nifcloud/network/use_secure_tls_policy.tf.go similarity index 100% rename from rules/cloud/policies/nifcloud/network/use_secure_tls_policy.tf.go rename to checks/cloud/nifcloud/network/use_secure_tls_policy.tf.go diff --git a/rules/cloud/policies/nifcloud/network/use_secure_tls_policy_test.go b/checks/cloud/nifcloud/network/use_secure_tls_policy_test.go similarity index 100% rename from rules/cloud/policies/nifcloud/network/use_secure_tls_policy_test.go rename to checks/cloud/nifcloud/network/use_secure_tls_policy_test.go diff --git a/rules/cloud/policies/nifcloud/rdb/add_description_to_db_security_group.go b/checks/cloud/nifcloud/rdb/add_description_to_db_security_group.go similarity index 94% rename from rules/cloud/policies/nifcloud/rdb/add_description_to_db_security_group.go rename to checks/cloud/nifcloud/rdb/add_description_to_db_security_group.go index 96518c70..4eba0583 100755 --- a/rules/cloud/policies/nifcloud/rdb/add_description_to_db_security_group.go +++ b/checks/cloud/nifcloud/rdb/add_description_to_db_security_group.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckAddDescriptionToDBSecurityGroup = rules.Register( +var CheckAddDescriptionToDBSecurityGroup = checks.Register( scan.Rule{ AVDID: "AVD-NIF-0012", Aliases: []string{"nifcloud-rdb-add-description-to-db-security-group"}, diff --git a/rules/cloud/policies/nifcloud/rdb/add_description_to_db_security_group.tf.go b/checks/cloud/nifcloud/rdb/add_description_to_db_security_group.tf.go similarity index 100% rename from rules/cloud/policies/nifcloud/rdb/add_description_to_db_security_group.tf.go rename to checks/cloud/nifcloud/rdb/add_description_to_db_security_group.tf.go diff --git a/rules/cloud/policies/nifcloud/rdb/add_description_to_db_security_group_test.go b/checks/cloud/nifcloud/rdb/add_description_to_db_security_group_test.go similarity index 100% rename from rules/cloud/policies/nifcloud/rdb/add_description_to_db_security_group_test.go rename to checks/cloud/nifcloud/rdb/add_description_to_db_security_group_test.go diff --git a/rules/cloud/policies/nifcloud/rdb/no_common_private_db_instance.go b/checks/cloud/nifcloud/rdb/no_common_private_db_instance.go similarity index 93% rename from rules/cloud/policies/nifcloud/rdb/no_common_private_db_instance.go rename to checks/cloud/nifcloud/rdb/no_common_private_db_instance.go index 87969155..54d343d9 100755 --- a/rules/cloud/policies/nifcloud/rdb/no_common_private_db_instance.go +++ b/checks/cloud/nifcloud/rdb/no_common_private_db_instance.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoCommonPrivateDBInstance = rules.Register( +var CheckNoCommonPrivateDBInstance = checks.Register( scan.Rule{ AVDID: "AVD-NIF-0010", Aliases: []string{"nifcloud-rdb-no-common-private-db-instance"}, diff --git a/rules/cloud/policies/nifcloud/rdb/no_common_private_db_instance.tf.go b/checks/cloud/nifcloud/rdb/no_common_private_db_instance.tf.go similarity index 100% rename from rules/cloud/policies/nifcloud/rdb/no_common_private_db_instance.tf.go rename to checks/cloud/nifcloud/rdb/no_common_private_db_instance.tf.go diff --git a/rules/cloud/policies/nifcloud/rdb/no_common_private_db_instance_test.go b/checks/cloud/nifcloud/rdb/no_common_private_db_instance_test.go similarity index 100% rename from rules/cloud/policies/nifcloud/rdb/no_common_private_db_instance_test.go rename to checks/cloud/nifcloud/rdb/no_common_private_db_instance_test.go diff --git a/rules/cloud/policies/nifcloud/rdb/no_public_db_access.go b/checks/cloud/nifcloud/rdb/no_public_db_access.go similarity index 93% rename from rules/cloud/policies/nifcloud/rdb/no_public_db_access.go rename to checks/cloud/nifcloud/rdb/no_public_db_access.go index b25e1ade..9650f90e 100755 --- a/rules/cloud/policies/nifcloud/rdb/no_public_db_access.go +++ b/checks/cloud/nifcloud/rdb/no_public_db_access.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicDbAccess = rules.Register( +var CheckNoPublicDbAccess = checks.Register( scan.Rule{ AVDID: "AVD-NIF-0008", Provider: providers.NifcloudProvider, diff --git a/rules/cloud/policies/nifcloud/rdb/no_public_db_access.tf.go b/checks/cloud/nifcloud/rdb/no_public_db_access.tf.go similarity index 100% rename from rules/cloud/policies/nifcloud/rdb/no_public_db_access.tf.go rename to checks/cloud/nifcloud/rdb/no_public_db_access.tf.go diff --git a/rules/cloud/policies/nifcloud/rdb/no_public_db_access_test.go b/checks/cloud/nifcloud/rdb/no_public_db_access_test.go similarity index 100% rename from rules/cloud/policies/nifcloud/rdb/no_public_db_access_test.go rename to checks/cloud/nifcloud/rdb/no_public_db_access_test.go diff --git a/rules/cloud/policies/nifcloud/rdb/no_public_ingress_db_sgr.go b/checks/cloud/nifcloud/rdb/no_public_ingress_db_sgr.go similarity index 94% rename from rules/cloud/policies/nifcloud/rdb/no_public_ingress_db_sgr.go rename to checks/cloud/nifcloud/rdb/no_public_ingress_db_sgr.go index 63e78aac..b6ccf612 100755 --- a/rules/cloud/policies/nifcloud/rdb/no_public_ingress_db_sgr.go +++ b/checks/cloud/nifcloud/rdb/no_public_ingress_db_sgr.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/trivy-policies/internal/cidr" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicIngressDBSgr = rules.Register( +var CheckNoPublicIngressDBSgr = checks.Register( scan.Rule{ AVDID: "AVD-NIF-0011", Aliases: []string{"nifcloud-rdb-no-public-ingress-db-sgr"}, diff --git a/rules/cloud/policies/nifcloud/rdb/no_public_ingress_db_sgr.tf.go b/checks/cloud/nifcloud/rdb/no_public_ingress_db_sgr.tf.go similarity index 100% rename from rules/cloud/policies/nifcloud/rdb/no_public_ingress_db_sgr.tf.go rename to checks/cloud/nifcloud/rdb/no_public_ingress_db_sgr.tf.go diff --git a/rules/cloud/policies/nifcloud/rdb/no_public_ingress_db_sgr_test.go b/checks/cloud/nifcloud/rdb/no_public_ingress_db_sgr_test.go similarity index 100% rename from rules/cloud/policies/nifcloud/rdb/no_public_ingress_db_sgr_test.go rename to checks/cloud/nifcloud/rdb/no_public_ingress_db_sgr_test.go diff --git a/rules/cloud/policies/nifcloud/rdb/specify_backup_retention.go b/checks/cloud/nifcloud/rdb/specify_backup_retention.go similarity index 93% rename from rules/cloud/policies/nifcloud/rdb/specify_backup_retention.go rename to checks/cloud/nifcloud/rdb/specify_backup_retention.go index a70a3be5..bba114a2 100755 --- a/rules/cloud/policies/nifcloud/rdb/specify_backup_retention.go +++ b/checks/cloud/nifcloud/rdb/specify_backup_retention.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckBackupRetentionSpecified = rules.Register( +var CheckBackupRetentionSpecified = checks.Register( scan.Rule{ AVDID: "AVD-NIF-0009", Provider: providers.NifcloudProvider, diff --git a/rules/cloud/policies/nifcloud/rdb/specify_backup_retention.tf.go b/checks/cloud/nifcloud/rdb/specify_backup_retention.tf.go similarity index 100% rename from rules/cloud/policies/nifcloud/rdb/specify_backup_retention.tf.go rename to checks/cloud/nifcloud/rdb/specify_backup_retention.tf.go diff --git a/rules/cloud/policies/nifcloud/rdb/specify_backup_retention_test.go b/checks/cloud/nifcloud/rdb/specify_backup_retention_test.go similarity index 100% rename from rules/cloud/policies/nifcloud/rdb/specify_backup_retention_test.go rename to checks/cloud/nifcloud/rdb/specify_backup_retention_test.go diff --git a/rules/cloud/policies/nifcloud/sslcertificate/remove_expired_certificates.go b/checks/cloud/nifcloud/sslcertificate/remove_expired_certificates.go similarity index 92% rename from rules/cloud/policies/nifcloud/sslcertificate/remove_expired_certificates.go rename to checks/cloud/nifcloud/sslcertificate/remove_expired_certificates.go index cd364582..dd87e6ed 100644 --- a/rules/cloud/policies/nifcloud/sslcertificate/remove_expired_certificates.go +++ b/checks/cloud/nifcloud/sslcertificate/remove_expired_certificates.go @@ -9,12 +9,12 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" "github.com/aquasecurity/defsec/pkg/providers" ) -var CheckRemoveExpiredCertificates = rules.Register( +var CheckRemoveExpiredCertificates = checks.Register( scan.Rule{ AVDID: "AVD-NIF-0006", Provider: providers.NifcloudProvider, diff --git a/rules/cloud/policies/nifcloud/sslcertificate/remove_expired_certificates_test.go b/checks/cloud/nifcloud/sslcertificate/remove_expired_certificates_test.go similarity index 100% rename from rules/cloud/policies/nifcloud/sslcertificate/remove_expired_certificates_test.go rename to checks/cloud/nifcloud/sslcertificate/remove_expired_certificates_test.go diff --git a/rules/cloud/policies/openstack/compute/no_plaintext_password.go b/checks/cloud/openstack/compute/no_plaintext_password.go similarity index 93% rename from rules/cloud/policies/openstack/compute/no_plaintext_password.go rename to checks/cloud/openstack/compute/no_plaintext_password.go index c37b032a..84e0f615 100755 --- a/rules/cloud/policies/openstack/compute/no_plaintext_password.go +++ b/checks/cloud/openstack/compute/no_plaintext_password.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPlaintextPassword = rules.Register( +var CheckNoPlaintextPassword = checks.Register( scan.Rule{ AVDID: "AVD-OPNSTK-0001", Provider: providers.OpenStackProvider, diff --git a/rules/cloud/policies/openstack/compute/no_plaintext_password.tf.go b/checks/cloud/openstack/compute/no_plaintext_password.tf.go similarity index 100% rename from rules/cloud/policies/openstack/compute/no_plaintext_password.tf.go rename to checks/cloud/openstack/compute/no_plaintext_password.tf.go diff --git a/rules/cloud/policies/openstack/compute/no_plaintext_password_test.go b/checks/cloud/openstack/compute/no_plaintext_password_test.go similarity index 100% rename from rules/cloud/policies/openstack/compute/no_plaintext_password_test.go rename to checks/cloud/openstack/compute/no_plaintext_password_test.go diff --git a/rules/cloud/policies/openstack/compute/no_public_access.go b/checks/cloud/openstack/compute/no_public_access.go similarity index 92% rename from rules/cloud/policies/openstack/compute/no_public_access.go rename to checks/cloud/openstack/compute/no_public_access.go index 9a6a36ce..f6051dd9 100755 --- a/rules/cloud/policies/openstack/compute/no_public_access.go +++ b/checks/cloud/openstack/compute/no_public_access.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/trivy-policies/internal/cidr" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicAccess = rules.Register( +var CheckNoPublicAccess = checks.Register( scan.Rule{ AVDID: "AVD-OPNSTK-0002", Provider: providers.OpenStackProvider, @@ -17,7 +17,7 @@ var CheckNoPublicAccess = rules.Register( ShortCode: "no-public-access", Summary: "A firewall rule allows traffic from/to the public internet", Impact: "Exposure of infrastructure to the public internet", - Resolution: "Employ more restrictive firewall rules", + Resolution: "Employ more restrictive firewall checks", Explanation: `Opening up ports to the public internet is generally to be avoided. You should restrict access to IP addresses or ranges that explicitly require it where possible.`, Links: []string{}, Terraform: &scan.EngineMetadata{ diff --git a/rules/cloud/policies/openstack/compute/no_public_access.tf.go b/checks/cloud/openstack/compute/no_public_access.tf.go similarity index 100% rename from rules/cloud/policies/openstack/compute/no_public_access.tf.go rename to checks/cloud/openstack/compute/no_public_access.tf.go diff --git a/rules/cloud/policies/openstack/compute/no_public_access_test.go b/checks/cloud/openstack/compute/no_public_access_test.go similarity index 100% rename from rules/cloud/policies/openstack/compute/no_public_access_test.go rename to checks/cloud/openstack/compute/no_public_access_test.go diff --git a/rules/cloud/policies/openstack/networking/add_description_to_security_group.go b/checks/cloud/openstack/networking/add_description_to_security_group.go similarity index 93% rename from rules/cloud/policies/openstack/networking/add_description_to_security_group.go rename to checks/cloud/openstack/networking/add_description_to_security_group.go index 5d2c45a5..554c4807 100755 --- a/rules/cloud/policies/openstack/networking/add_description_to_security_group.go +++ b/checks/cloud/openstack/networking/add_description_to_security_group.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckSecurityGroupHasDescription = rules.Register( +var CheckSecurityGroupHasDescription = checks.Register( scan.Rule{ AVDID: "AVD-OPNSTK-0005", Provider: providers.OpenStackProvider, diff --git a/rules/cloud/policies/openstack/networking/add_description_to_security_group.tf.go b/checks/cloud/openstack/networking/add_description_to_security_group.tf.go similarity index 100% rename from rules/cloud/policies/openstack/networking/add_description_to_security_group.tf.go rename to checks/cloud/openstack/networking/add_description_to_security_group.tf.go diff --git a/rules/cloud/policies/openstack/networking/add_description_to_security_group_test.go b/checks/cloud/openstack/networking/add_description_to_security_group_test.go similarity index 100% rename from rules/cloud/policies/openstack/networking/add_description_to_security_group_test.go rename to checks/cloud/openstack/networking/add_description_to_security_group_test.go diff --git a/rules/cloud/policies/openstack/networking/no_public_egress.go b/checks/cloud/openstack/networking/no_public_egress.go similarity index 90% rename from rules/cloud/policies/openstack/networking/no_public_egress.go rename to checks/cloud/openstack/networking/no_public_egress.go index 732ec91d..1edfa55b 100755 --- a/rules/cloud/policies/openstack/networking/no_public_egress.go +++ b/checks/cloud/openstack/networking/no_public_egress.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/trivy-policies/internal/cidr" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicEgress = rules.Register( +var CheckNoPublicEgress = checks.Register( scan.Rule{ AVDID: "AVD-OPNSTK-0004", Provider: providers.OpenStackProvider, @@ -17,7 +17,7 @@ var CheckNoPublicEgress = rules.Register( ShortCode: "no-public-egress", Summary: "A security group rule allows egress traffic to multiple public addresses", Impact: "Potential exfiltration of data to the public internet", - Resolution: "Employ more restrictive security group rules", + Resolution: "Employ more restrictive security group checks", Explanation: `Opening up ports to the public internet is generally to be avoided. You should restrict access to IP addresses or ranges that explicitly require it where possible.`, Links: []string{}, Terraform: &scan.EngineMetadata{ diff --git a/rules/cloud/policies/openstack/networking/no_public_egress.tf.go b/checks/cloud/openstack/networking/no_public_egress.tf.go similarity index 100% rename from rules/cloud/policies/openstack/networking/no_public_egress.tf.go rename to checks/cloud/openstack/networking/no_public_egress.tf.go diff --git a/rules/cloud/policies/openstack/networking/no_public_egress_test.go b/checks/cloud/openstack/networking/no_public_egress_test.go similarity index 100% rename from rules/cloud/policies/openstack/networking/no_public_egress_test.go rename to checks/cloud/openstack/networking/no_public_egress_test.go diff --git a/rules/cloud/policies/openstack/networking/no_public_ingress.go b/checks/cloud/openstack/networking/no_public_ingress.go similarity index 90% rename from rules/cloud/policies/openstack/networking/no_public_ingress.go rename to checks/cloud/openstack/networking/no_public_ingress.go index fcdb14be..a2e1cf75 100755 --- a/rules/cloud/policies/openstack/networking/no_public_ingress.go +++ b/checks/cloud/openstack/networking/no_public_ingress.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/trivy-policies/internal/cidr" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicIngress = rules.Register( +var CheckNoPublicIngress = checks.Register( scan.Rule{ AVDID: "AVD-OPNSTK-0003", Provider: providers.OpenStackProvider, @@ -17,7 +17,7 @@ var CheckNoPublicIngress = rules.Register( ShortCode: "no-public-ingress", Summary: "A security group rule allows ingress traffic from multiple public addresses", Impact: "Exposure of infrastructure to the public internet", - Resolution: "Employ more restrictive security group rules", + Resolution: "Employ more restrictive security group checks", Explanation: `Opening up ports to the public internet is generally to be avoided. You should restrict access to IP addresses or ranges that explicitly require it where possible.`, Links: []string{}, Terraform: &scan.EngineMetadata{ diff --git a/rules/cloud/policies/openstack/networking/no_public_ingress.tf.go b/checks/cloud/openstack/networking/no_public_ingress.tf.go similarity index 100% rename from rules/cloud/policies/openstack/networking/no_public_ingress.tf.go rename to checks/cloud/openstack/networking/no_public_ingress.tf.go diff --git a/rules/cloud/policies/openstack/networking/no_public_ingress_test.go b/checks/cloud/openstack/networking/no_public_ingress_test.go similarity index 100% rename from rules/cloud/policies/openstack/networking/no_public_ingress_test.go rename to checks/cloud/openstack/networking/no_public_ingress_test.go diff --git a/rules/cloud/policies/oracle/compute/no_public_ip.go b/checks/cloud/oracle/compute/no_public_ip.go similarity index 94% rename from rules/cloud/policies/oracle/compute/no_public_ip.go rename to checks/cloud/oracle/compute/no_public_ip.go index 208e9b2f..58d9668b 100755 --- a/rules/cloud/policies/oracle/compute/no_public_ip.go +++ b/checks/cloud/oracle/compute/no_public_ip.go @@ -5,10 +5,10 @@ import ( "github.com/aquasecurity/defsec/pkg/scan" "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicIp = rules.Register( +var CheckNoPublicIp = checks.Register( scan.Rule{ AVDID: "AVD-OCI-0001", Provider: providers.OracleProvider, diff --git a/rules/cloud/policies/oracle/compute/no_public_ip.tf.go b/checks/cloud/oracle/compute/no_public_ip.tf.go similarity index 100% rename from rules/cloud/policies/oracle/compute/no_public_ip.tf.go rename to checks/cloud/oracle/compute/no_public_ip.tf.go diff --git a/rules/cloud/policies/oracle/compute/no_public_ip_test.go b/checks/cloud/oracle/compute/no_public_ip_test.go similarity index 100% rename from rules/cloud/policies/oracle/compute/no_public_ip_test.go rename to checks/cloud/oracle/compute/no_public_ip_test.go diff --git a/rules/docker/README.md b/checks/docker/README.md similarity index 100% rename from rules/docker/README.md rename to checks/docker/README.md diff --git a/rules/docker/policies/add_instead_of_copy.rego b/checks/docker/add_instead_of_copy.rego similarity index 100% rename from rules/docker/policies/add_instead_of_copy.rego rename to checks/docker/add_instead_of_copy.rego diff --git a/rules/docker/policies/add_instead_of_copy_test.rego b/checks/docker/add_instead_of_copy_test.rego similarity index 100% rename from rules/docker/policies/add_instead_of_copy_test.rego rename to checks/docker/add_instead_of_copy_test.rego diff --git a/rules/docker/policies/apt_get_missing_no_install_recommends.rego b/checks/docker/apt_get_missing_no_install_recommends.rego similarity index 100% rename from rules/docker/policies/apt_get_missing_no_install_recommends.rego rename to checks/docker/apt_get_missing_no_install_recommends.rego diff --git a/rules/docker/policies/apt_get_missing_no_install_recommends_test.rego b/checks/docker/apt_get_missing_no_install_recommends_test.rego similarity index 100% rename from rules/docker/policies/apt_get_missing_no_install_recommends_test.rego rename to checks/docker/apt_get_missing_no_install_recommends_test.rego diff --git a/rules/docker/policies/apt_get_missing_yes_flag_to_avoid_manual_input.rego b/checks/docker/apt_get_missing_yes_flag_to_avoid_manual_input.rego similarity index 100% rename from rules/docker/policies/apt_get_missing_yes_flag_to_avoid_manual_input.rego rename to checks/docker/apt_get_missing_yes_flag_to_avoid_manual_input.rego diff --git a/rules/docker/policies/apt_get_missing_yes_flag_to_avoid_manual_input_test.rego b/checks/docker/apt_get_missing_yes_flag_to_avoid_manual_input_test.rego similarity index 100% rename from rules/docker/policies/apt_get_missing_yes_flag_to_avoid_manual_input_test.rego rename to checks/docker/apt_get_missing_yes_flag_to_avoid_manual_input_test.rego diff --git a/rules/docker/policies/copy_from_references_current_from_alias.rego b/checks/docker/copy_from_references_current_from_alias.rego similarity index 100% rename from rules/docker/policies/copy_from_references_current_from_alias.rego rename to checks/docker/copy_from_references_current_from_alias.rego diff --git a/rules/docker/policies/copy_from_references_current_from_alias_test.rego b/checks/docker/copy_from_references_current_from_alias_test.rego similarity index 100% rename from rules/docker/policies/copy_from_references_current_from_alias_test.rego rename to checks/docker/copy_from_references_current_from_alias_test.rego diff --git a/rules/docker/policies/copy_with_more_than_two_arguments_not_ending_with_slash.rego b/checks/docker/copy_with_more_than_two_arguments_not_ending_with_slash.rego similarity index 100% rename from rules/docker/policies/copy_with_more_than_two_arguments_not_ending_with_slash.rego rename to checks/docker/copy_with_more_than_two_arguments_not_ending_with_slash.rego diff --git a/rules/docker/policies/copy_with_more_than_two_arguments_not_ending_with_slash_test.rego b/checks/docker/copy_with_more_than_two_arguments_not_ending_with_slash_test.rego similarity index 100% rename from rules/docker/policies/copy_with_more_than_two_arguments_not_ending_with_slash_test.rego rename to checks/docker/copy_with_more_than_two_arguments_not_ending_with_slash_test.rego diff --git a/rules/docker/policies/latest_tag.rego b/checks/docker/latest_tag.rego similarity index 100% rename from rules/docker/policies/latest_tag.rego rename to checks/docker/latest_tag.rego diff --git a/rules/docker/policies/latest_tag_test.rego b/checks/docker/latest_tag_test.rego similarity index 100% rename from rules/docker/policies/latest_tag_test.rego rename to checks/docker/latest_tag_test.rego diff --git a/rules/docker/policies/maintainer_is_deprecated.rego b/checks/docker/maintainer_is_deprecated.rego similarity index 100% rename from rules/docker/policies/maintainer_is_deprecated.rego rename to checks/docker/maintainer_is_deprecated.rego diff --git a/rules/docker/policies/maintainer_is_deprecated_test.rego b/checks/docker/maintainer_is_deprecated_test.rego similarity index 100% rename from rules/docker/policies/maintainer_is_deprecated_test.rego rename to checks/docker/maintainer_is_deprecated_test.rego diff --git a/rules/docker/policies/missing_apk_no_cache.rego b/checks/docker/missing_apk_no_cache.rego similarity index 100% rename from rules/docker/policies/missing_apk_no_cache.rego rename to checks/docker/missing_apk_no_cache.rego diff --git a/rules/docker/policies/missing_apk_no_cache_test.rego b/checks/docker/missing_apk_no_cache_test.rego similarity index 100% rename from rules/docker/policies/missing_apk_no_cache_test.rego rename to checks/docker/missing_apk_no_cache_test.rego diff --git a/rules/docker/policies/missing_dnf_clean_all.rego b/checks/docker/missing_dnf_clean_all.rego similarity index 100% rename from rules/docker/policies/missing_dnf_clean_all.rego rename to checks/docker/missing_dnf_clean_all.rego diff --git a/rules/docker/policies/missing_dnf_clean_all_test.rego b/checks/docker/missing_dnf_clean_all_test.rego similarity index 100% rename from rules/docker/policies/missing_dnf_clean_all_test.rego rename to checks/docker/missing_dnf_clean_all_test.rego diff --git a/rules/docker/policies/missing_microdnf_clean_all.rego b/checks/docker/missing_microdnf_clean_all.rego similarity index 100% rename from rules/docker/policies/missing_microdnf_clean_all.rego rename to checks/docker/missing_microdnf_clean_all.rego diff --git a/rules/docker/policies/missing_microdnf_clean_all_test.rego b/checks/docker/missing_microdnf_clean_all_test.rego similarity index 100% rename from rules/docker/policies/missing_microdnf_clean_all_test.rego rename to checks/docker/missing_microdnf_clean_all_test.rego diff --git a/rules/docker/policies/missing_zypper_clean.rego b/checks/docker/missing_zypper_clean.rego similarity index 100% rename from rules/docker/policies/missing_zypper_clean.rego rename to checks/docker/missing_zypper_clean.rego diff --git a/rules/docker/policies/missing_zypper_clean_test.rego b/checks/docker/missing_zypper_clean_test.rego similarity index 100% rename from rules/docker/policies/missing_zypper_clean_test.rego rename to checks/docker/missing_zypper_clean_test.rego diff --git a/rules/docker/policies/multiple_cmd_instructions_listed.rego b/checks/docker/multiple_cmd_instructions_listed.rego similarity index 100% rename from rules/docker/policies/multiple_cmd_instructions_listed.rego rename to checks/docker/multiple_cmd_instructions_listed.rego diff --git a/rules/docker/policies/multiple_cmd_instructions_listed_test.rego b/checks/docker/multiple_cmd_instructions_listed_test.rego similarity index 100% rename from rules/docker/policies/multiple_cmd_instructions_listed_test.rego rename to checks/docker/multiple_cmd_instructions_listed_test.rego diff --git a/rules/docker/policies/multiple_entrypoint_instructions_listed.rego b/checks/docker/multiple_entrypoint_instructions_listed.rego similarity index 100% rename from rules/docker/policies/multiple_entrypoint_instructions_listed.rego rename to checks/docker/multiple_entrypoint_instructions_listed.rego diff --git a/rules/docker/policies/multiple_entrypoint_instructions_listed_test.rego b/checks/docker/multiple_entrypoint_instructions_listed_test.rego similarity index 100% rename from rules/docker/policies/multiple_entrypoint_instructions_listed_test.rego rename to checks/docker/multiple_entrypoint_instructions_listed_test.rego diff --git a/rules/docker/policies/multiple_healthcheck_instructions.rego b/checks/docker/multiple_healthcheck_instructions.rego similarity index 100% rename from rules/docker/policies/multiple_healthcheck_instructions.rego rename to checks/docker/multiple_healthcheck_instructions.rego diff --git a/rules/docker/policies/multiple_healthcheck_instructions_test.rego b/checks/docker/multiple_healthcheck_instructions_test.rego similarity index 100% rename from rules/docker/policies/multiple_healthcheck_instructions_test.rego rename to checks/docker/multiple_healthcheck_instructions_test.rego diff --git a/rules/docker/policies/no_healthcheck_instruction.rego b/checks/docker/no_healthcheck_instruction.rego similarity index 100% rename from rules/docker/policies/no_healthcheck_instruction.rego rename to checks/docker/no_healthcheck_instruction.rego diff --git a/rules/docker/policies/no_healthcheck_instruction_test.rego b/checks/docker/no_healthcheck_instruction_test.rego similarity index 100% rename from rules/docker/policies/no_healthcheck_instruction_test.rego rename to checks/docker/no_healthcheck_instruction_test.rego diff --git a/rules/docker/policies/port22.rego b/checks/docker/port22.rego similarity index 100% rename from rules/docker/policies/port22.rego rename to checks/docker/port22.rego diff --git a/rules/docker/policies/port22_test.rego b/checks/docker/port22_test.rego similarity index 100% rename from rules/docker/policies/port22_test.rego rename to checks/docker/port22_test.rego diff --git a/rules/docker/policies/root_user.rego b/checks/docker/root_user.rego similarity index 100% rename from rules/docker/policies/root_user.rego rename to checks/docker/root_user.rego diff --git a/rules/docker/policies/root_user_test.rego b/checks/docker/root_user_test.rego similarity index 100% rename from rules/docker/policies/root_user_test.rego rename to checks/docker/root_user_test.rego diff --git a/rules/docker/policies/run_apt_get_dist_upgrade.rego b/checks/docker/run_apt_get_dist_upgrade.rego similarity index 100% rename from rules/docker/policies/run_apt_get_dist_upgrade.rego rename to checks/docker/run_apt_get_dist_upgrade.rego diff --git a/rules/docker/policies/run_apt_get_dist_upgrade_test.rego b/checks/docker/run_apt_get_dist_upgrade_test.rego similarity index 100% rename from rules/docker/policies/run_apt_get_dist_upgrade_test.rego rename to checks/docker/run_apt_get_dist_upgrade_test.rego diff --git a/rules/docker/policies/run_command_cd_instead_of_workdir.rego b/checks/docker/run_command_cd_instead_of_workdir.rego similarity index 100% rename from rules/docker/policies/run_command_cd_instead_of_workdir.rego rename to checks/docker/run_command_cd_instead_of_workdir.rego diff --git a/rules/docker/policies/run_command_cd_instead_of_workdir_test.rego b/checks/docker/run_command_cd_instead_of_workdir_test.rego similarity index 100% rename from rules/docker/policies/run_command_cd_instead_of_workdir_test.rego rename to checks/docker/run_command_cd_instead_of_workdir_test.rego diff --git a/rules/docker/policies/run_using_sudo.rego b/checks/docker/run_using_sudo.rego similarity index 100% rename from rules/docker/policies/run_using_sudo.rego rename to checks/docker/run_using_sudo.rego diff --git a/rules/docker/policies/run_using_sudo_test.rego b/checks/docker/run_using_sudo_test.rego similarity index 100% rename from rules/docker/policies/run_using_sudo_test.rego rename to checks/docker/run_using_sudo_test.rego diff --git a/rules/docker/policies/run_using_wget_and_curl.rego b/checks/docker/run_using_wget_and_curl.rego similarity index 100% rename from rules/docker/policies/run_using_wget_and_curl.rego rename to checks/docker/run_using_wget_and_curl.rego diff --git a/rules/docker/policies/run_using_wget_and_curl_test.rego b/checks/docker/run_using_wget_and_curl_test.rego similarity index 100% rename from rules/docker/policies/run_using_wget_and_curl_test.rego rename to checks/docker/run_using_wget_and_curl_test.rego diff --git a/rules/docker/policies/same_alias_in_different_froms.rego b/checks/docker/same_alias_in_different_froms.rego similarity index 100% rename from rules/docker/policies/same_alias_in_different_froms.rego rename to checks/docker/same_alias_in_different_froms.rego diff --git a/rules/docker/policies/same_alias_in_different_froms_test.rego b/checks/docker/same_alias_in_different_froms_test.rego similarity index 100% rename from rules/docker/policies/same_alias_in_different_froms_test.rego rename to checks/docker/same_alias_in_different_froms_test.rego diff --git a/rules/docker/test/Dockerfile b/checks/docker/test/Dockerfile similarity index 100% rename from rules/docker/test/Dockerfile rename to checks/docker/test/Dockerfile diff --git a/rules/docker/policies/unix_ports_out_of_range.rego b/checks/docker/unix_ports_out_of_range.rego similarity index 100% rename from rules/docker/policies/unix_ports_out_of_range.rego rename to checks/docker/unix_ports_out_of_range.rego diff --git a/rules/docker/policies/unix_ports_out_of_range_test.rego b/checks/docker/unix_ports_out_of_range_test.rego similarity index 100% rename from rules/docker/policies/unix_ports_out_of_range_test.rego rename to checks/docker/unix_ports_out_of_range_test.rego diff --git a/rules/docker/policies/update_instruction_alone.rego b/checks/docker/update_instruction_alone.rego similarity index 100% rename from rules/docker/policies/update_instruction_alone.rego rename to checks/docker/update_instruction_alone.rego diff --git a/rules/docker/policies/update_instruction_alone_test.rego b/checks/docker/update_instruction_alone_test.rego similarity index 100% rename from rules/docker/policies/update_instruction_alone_test.rego rename to checks/docker/update_instruction_alone_test.rego diff --git a/rules/docker/policies/workdir_path_not_absolute.rego b/checks/docker/workdir_path_not_absolute.rego similarity index 100% rename from rules/docker/policies/workdir_path_not_absolute.rego rename to checks/docker/workdir_path_not_absolute.rego diff --git a/rules/docker/policies/workdir_path_not_absolute_test.rego b/checks/docker/workdir_path_not_absolute_test.rego similarity index 100% rename from rules/docker/policies/workdir_path_not_absolute_test.rego rename to checks/docker/workdir_path_not_absolute_test.rego diff --git a/rules/docker/policies/yum_clean_all_missing.rego b/checks/docker/yum_clean_all_missing.rego similarity index 100% rename from rules/docker/policies/yum_clean_all_missing.rego rename to checks/docker/yum_clean_all_missing.rego diff --git a/rules/docker/policies/yum_clean_all_missing_test.rego b/checks/docker/yum_clean_all_missing_test.rego similarity index 100% rename from rules/docker/policies/yum_clean_all_missing_test.rego rename to checks/docker/yum_clean_all_missing_test.rego diff --git a/rules/kubernetes/README.md b/checks/kubernetes/README.md similarity index 100% rename from rules/kubernetes/README.md rename to checks/kubernetes/README.md diff --git a/rules/kubernetes/policies/advanced/default_namespace_should_not_be_used.rego b/checks/kubernetes/advanced/default_namespace_should_not_be_used.rego similarity index 100% rename from rules/kubernetes/policies/advanced/default_namespace_should_not_be_used.rego rename to checks/kubernetes/advanced/default_namespace_should_not_be_used.rego diff --git a/rules/kubernetes/policies/advanced/default_namespace_should_not_be_used_test.rego b/checks/kubernetes/advanced/default_namespace_should_not_be_used_test.rego similarity index 100% rename from rules/kubernetes/policies/advanced/default_namespace_should_not_be_used_test.rego rename to checks/kubernetes/advanced/default_namespace_should_not_be_used_test.rego diff --git a/rules/kubernetes/policies/advanced/optional/capabilities_no_drop_at_least_one.rego b/checks/kubernetes/advanced/optional/capabilities_no_drop_at_least_one.rego similarity index 100% rename from rules/kubernetes/policies/advanced/optional/capabilities_no_drop_at_least_one.rego rename to checks/kubernetes/advanced/optional/capabilities_no_drop_at_least_one.rego diff --git a/rules/kubernetes/policies/advanced/optional/manages_etc_hosts.rego b/checks/kubernetes/advanced/optional/manages_etc_hosts.rego similarity index 100% rename from rules/kubernetes/policies/advanced/optional/manages_etc_hosts.rego rename to checks/kubernetes/advanced/optional/manages_etc_hosts.rego diff --git a/rules/kubernetes/policies/advanced/optional/use_limit_range.rego b/checks/kubernetes/advanced/optional/use_limit_range.rego similarity index 100% rename from rules/kubernetes/policies/advanced/optional/use_limit_range.rego rename to checks/kubernetes/advanced/optional/use_limit_range.rego diff --git a/rules/kubernetes/policies/advanced/optional/use_limit_range_test.rego b/checks/kubernetes/advanced/optional/use_limit_range_test.rego similarity index 100% rename from rules/kubernetes/policies/advanced/optional/use_limit_range_test.rego rename to checks/kubernetes/advanced/optional/use_limit_range_test.rego diff --git a/rules/kubernetes/policies/advanced/optional/use_resource_quota.rego b/checks/kubernetes/advanced/optional/use_resource_quota.rego similarity index 100% rename from rules/kubernetes/policies/advanced/optional/use_resource_quota.rego rename to checks/kubernetes/advanced/optional/use_resource_quota.rego diff --git a/rules/kubernetes/policies/advanced/optional/use_resource_quota_test.rego b/checks/kubernetes/advanced/optional/use_resource_quota_test.rego similarity index 100% rename from rules/kubernetes/policies/advanced/optional/use_resource_quota_test.rego rename to checks/kubernetes/advanced/optional/use_resource_quota_test.rego diff --git a/rules/kubernetes/policies/advanced/optional/uses_untrusted_azure_registry.rego b/checks/kubernetes/advanced/optional/uses_untrusted_azure_registry.rego similarity index 100% rename from rules/kubernetes/policies/advanced/optional/uses_untrusted_azure_registry.rego rename to checks/kubernetes/advanced/optional/uses_untrusted_azure_registry.rego diff --git a/rules/kubernetes/policies/advanced/optional/uses_untrusted_ecr_registry.rego b/checks/kubernetes/advanced/optional/uses_untrusted_ecr_registry.rego similarity index 100% rename from rules/kubernetes/policies/advanced/optional/uses_untrusted_ecr_registry.rego rename to checks/kubernetes/advanced/optional/uses_untrusted_ecr_registry.rego diff --git a/rules/kubernetes/policies/advanced/optional/uses_untrusted_gcr_registry.rego b/checks/kubernetes/advanced/optional/uses_untrusted_gcr_registry.rego similarity index 100% rename from rules/kubernetes/policies/advanced/optional/uses_untrusted_gcr_registry.rego rename to checks/kubernetes/advanced/optional/uses_untrusted_gcr_registry.rego diff --git a/rules/kubernetes/policies/advanced/optional/uses_untrusted_public_registries.rego b/checks/kubernetes/advanced/optional/uses_untrusted_public_registries.rego similarity index 100% rename from rules/kubernetes/policies/advanced/optional/uses_untrusted_public_registries.rego rename to checks/kubernetes/advanced/optional/uses_untrusted_public_registries.rego diff --git a/rules/kubernetes/policies/advanced/protect_core_components_namespace.rego b/checks/kubernetes/advanced/protect_core_components_namespace.rego similarity index 100% rename from rules/kubernetes/policies/advanced/protect_core_components_namespace.rego rename to checks/kubernetes/advanced/protect_core_components_namespace.rego diff --git a/rules/kubernetes/policies/advanced/protect_core_components_namespace_test.rego b/checks/kubernetes/advanced/protect_core_components_namespace_test.rego similarity index 100% rename from rules/kubernetes/policies/advanced/protect_core_components_namespace_test.rego rename to checks/kubernetes/advanced/protect_core_components_namespace_test.rego diff --git a/rules/kubernetes/policies/advanced/protecting_pod_service_account_tokens.rego b/checks/kubernetes/advanced/protecting_pod_service_account_tokens.rego similarity index 100% rename from rules/kubernetes/policies/advanced/protecting_pod_service_account_tokens.rego rename to checks/kubernetes/advanced/protecting_pod_service_account_tokens.rego diff --git a/rules/kubernetes/policies/advanced/protecting_pod_service_account_tokens_test.rego b/checks/kubernetes/advanced/protecting_pod_service_account_tokens_test.rego similarity index 100% rename from rules/kubernetes/policies/advanced/protecting_pod_service_account_tokens_test.rego rename to checks/kubernetes/advanced/protecting_pod_service_account_tokens_test.rego diff --git a/rules/kubernetes/policies/advanced/selector_usage_in_network_policies.rego b/checks/kubernetes/advanced/selector_usage_in_network_policies.rego similarity index 100% rename from rules/kubernetes/policies/advanced/selector_usage_in_network_policies.rego rename to checks/kubernetes/advanced/selector_usage_in_network_policies.rego diff --git a/rules/kubernetes/policies/advanced/selector_usage_in_network_policies_test.rego b/checks/kubernetes/advanced/selector_usage_in_network_policies_test.rego similarity index 100% rename from rules/kubernetes/policies/advanced/selector_usage_in_network_policies_test.rego rename to checks/kubernetes/advanced/selector_usage_in_network_policies_test.rego diff --git a/rules/kubernetes/policies/aquacommercial/configMap_with_secrets.rego b/checks/kubernetes/aquacommercial/configMap_with_secrets.rego similarity index 100% rename from rules/kubernetes/policies/aquacommercial/configMap_with_secrets.rego rename to checks/kubernetes/aquacommercial/configMap_with_secrets.rego diff --git a/rules/kubernetes/policies/aquacommercial/configMap_with_secrets_test.rego b/checks/kubernetes/aquacommercial/configMap_with_secrets_test.rego similarity index 100% rename from rules/kubernetes/policies/aquacommercial/configMap_with_secrets_test.rego rename to checks/kubernetes/aquacommercial/configMap_with_secrets_test.rego diff --git a/rules/kubernetes/policies/aquacommercial/configMap_with_sensitive_test.rego b/checks/kubernetes/aquacommercial/configMap_with_sensitive_test.rego similarity index 100% rename from rules/kubernetes/policies/aquacommercial/configMap_with_sensitive_test.rego rename to checks/kubernetes/aquacommercial/configMap_with_sensitive_test.rego diff --git a/rules/kubernetes/policies/aquacommercial/configmap_with_sensitive.rego b/checks/kubernetes/aquacommercial/configmap_with_sensitive.rego similarity index 100% rename from rules/kubernetes/policies/aquacommercial/configmap_with_sensitive.rego rename to checks/kubernetes/aquacommercial/configmap_with_sensitive.rego diff --git a/rules/kubernetes/policies/aquacommercial/service_with_externalip.rego b/checks/kubernetes/aquacommercial/service_with_externalip.rego similarity index 100% rename from rules/kubernetes/policies/aquacommercial/service_with_externalip.rego rename to checks/kubernetes/aquacommercial/service_with_externalip.rego diff --git a/rules/kubernetes/policies/aquacommercial/service_with_externalip_test.rego b/checks/kubernetes/aquacommercial/service_with_externalip_test.rego similarity index 100% rename from rules/kubernetes/policies/aquacommercial/service_with_externalip_test.rego rename to checks/kubernetes/aquacommercial/service_with_externalip_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/admin_conf_ownership.rego b/checks/kubernetes/cisbenchmarks/apiserver/admin_conf_ownership.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/admin_conf_ownership.rego rename to checks/kubernetes/cisbenchmarks/apiserver/admin_conf_ownership.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/admin_conf_ownership_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/admin_conf_ownership_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/admin_conf_ownership_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/admin_conf_ownership_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/admin_conf_permission.rego b/checks/kubernetes/cisbenchmarks/apiserver/admin_conf_permission.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/admin_conf_permission.rego rename to checks/kubernetes/cisbenchmarks/apiserver/admin_conf_permission.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/admin_conf_permission_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/admin_conf_permission_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/admin_conf_permission_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/admin_conf_permission_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/always_admit_plugin.rego b/checks/kubernetes/cisbenchmarks/apiserver/always_admit_plugin.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/always_admit_plugin.rego rename to checks/kubernetes/cisbenchmarks/apiserver/always_admit_plugin.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/always_admit_plugin_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/always_admit_plugin_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/always_admit_plugin_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/always_admit_plugin_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/always_pull_images_plugin.rego b/checks/kubernetes/cisbenchmarks/apiserver/always_pull_images_plugin.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/always_pull_images_plugin.rego rename to checks/kubernetes/cisbenchmarks/apiserver/always_pull_images_plugin.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/always_pull_images_plugin_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/always_pull_images_plugin_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/always_pull_images_plugin_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/always_pull_images_plugin_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/anonymous_auth.rego b/checks/kubernetes/cisbenchmarks/apiserver/anonymous_auth.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/anonymous_auth.rego rename to checks/kubernetes/cisbenchmarks/apiserver/anonymous_auth.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/anonymous_auth_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/anonymous_auth_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/anonymous_auth_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/anonymous_auth_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/audit_log_maxage.rego b/checks/kubernetes/cisbenchmarks/apiserver/audit_log_maxage.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/audit_log_maxage.rego rename to checks/kubernetes/cisbenchmarks/apiserver/audit_log_maxage.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/audit_log_maxage_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/audit_log_maxage_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/audit_log_maxage_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/audit_log_maxage_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/audit_log_maxbackup.rego b/checks/kubernetes/cisbenchmarks/apiserver/audit_log_maxbackup.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/audit_log_maxbackup.rego rename to checks/kubernetes/cisbenchmarks/apiserver/audit_log_maxbackup.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/audit_log_maxbackup_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/audit_log_maxbackup_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/audit_log_maxbackup_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/audit_log_maxbackup_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/audit_log_maxsize.rego b/checks/kubernetes/cisbenchmarks/apiserver/audit_log_maxsize.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/audit_log_maxsize.rego rename to checks/kubernetes/cisbenchmarks/apiserver/audit_log_maxsize.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/audit_log_maxsize_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/audit_log_maxsize_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/audit_log_maxsize_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/audit_log_maxsize_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/audit_log_path.rego b/checks/kubernetes/cisbenchmarks/apiserver/audit_log_path.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/audit_log_path.rego rename to checks/kubernetes/cisbenchmarks/apiserver/audit_log_path.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/audit_log_path_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/audit_log_path_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/audit_log_path_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/audit_log_path_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/authorization_mode.rego b/checks/kubernetes/cisbenchmarks/apiserver/authorization_mode.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/authorization_mode.rego rename to checks/kubernetes/cisbenchmarks/apiserver/authorization_mode.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/authorization_mode_includes_node.rego b/checks/kubernetes/cisbenchmarks/apiserver/authorization_mode_includes_node.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/authorization_mode_includes_node.rego rename to checks/kubernetes/cisbenchmarks/apiserver/authorization_mode_includes_node.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/authorization_mode_includes_node_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/authorization_mode_includes_node_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/authorization_mode_includes_node_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/authorization_mode_includes_node_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/authorization_mode_includes_rbac.rego b/checks/kubernetes/cisbenchmarks/apiserver/authorization_mode_includes_rbac.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/authorization_mode_includes_rbac.rego rename to checks/kubernetes/cisbenchmarks/apiserver/authorization_mode_includes_rbac.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/authorization_mode_includes_rbac_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/authorization_mode_includes_rbac_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/authorization_mode_includes_rbac_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/authorization_mode_includes_rbac_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/authorization_mode_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/authorization_mode_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/authorization_mode_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/authorization_mode_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/client_ca_file.rego b/checks/kubernetes/cisbenchmarks/apiserver/client_ca_file.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/client_ca_file.rego rename to checks/kubernetes/cisbenchmarks/apiserver/client_ca_file.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/client_ca_file_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/client_ca_file_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/client_ca_file_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/client_ca_file_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/deny_service_external_ips_plugin.rego b/checks/kubernetes/cisbenchmarks/apiserver/deny_service_external_ips_plugin.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/deny_service_external_ips_plugin.rego rename to checks/kubernetes/cisbenchmarks/apiserver/deny_service_external_ips_plugin.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/deny_service_external_ips_plugin_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/deny_service_external_ips_plugin_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/deny_service_external_ips_plugin_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/deny_service_external_ips_plugin_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/encryption_provider_config.rego b/checks/kubernetes/cisbenchmarks/apiserver/encryption_provider_config.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/encryption_provider_config.rego rename to checks/kubernetes/cisbenchmarks/apiserver/encryption_provider_config.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/encryption_provider_config_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/encryption_provider_config_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/encryption_provider_config_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/encryption_provider_config_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/etcd_cafile.rego b/checks/kubernetes/cisbenchmarks/apiserver/etcd_cafile.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/etcd_cafile.rego rename to checks/kubernetes/cisbenchmarks/apiserver/etcd_cafile.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/etcd_cafile_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/etcd_cafile_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/etcd_cafile_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/etcd_cafile_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/etcd_certfile_and_keyfile.rego b/checks/kubernetes/cisbenchmarks/apiserver/etcd_certfile_and_keyfile.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/etcd_certfile_and_keyfile.rego rename to checks/kubernetes/cisbenchmarks/apiserver/etcd_certfile_and_keyfile.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/etcd_certfile_and_keyfile_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/etcd_certfile_and_keyfile_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/etcd_certfile_and_keyfile_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/etcd_certfile_and_keyfile_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/event_rate_limit_plugin.rego b/checks/kubernetes/cisbenchmarks/apiserver/event_rate_limit_plugin.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/event_rate_limit_plugin.rego rename to checks/kubernetes/cisbenchmarks/apiserver/event_rate_limit_plugin.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/event_rate_limit_plugin_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/event_rate_limit_plugin_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/event_rate_limit_plugin_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/event_rate_limit_plugin_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/kubelet_certificate_authority.rego b/checks/kubernetes/cisbenchmarks/apiserver/kubelet_certificate_authority.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/kubelet_certificate_authority.rego rename to checks/kubernetes/cisbenchmarks/apiserver/kubelet_certificate_authority.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/kubelet_certificate_authority_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/kubelet_certificate_authority_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/kubelet_certificate_authority_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/kubelet_certificate_authority_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/kubelet_client_certificate_and_key.rego b/checks/kubernetes/cisbenchmarks/apiserver/kubelet_client_certificate_and_key.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/kubelet_client_certificate_and_key.rego rename to checks/kubernetes/cisbenchmarks/apiserver/kubelet_client_certificate_and_key.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/kubelet_client_certificate_and_key_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/kubelet_client_certificate_and_key_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/kubelet_client_certificate_and_key_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/kubelet_client_certificate_and_key_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/kubelet_https.rego b/checks/kubernetes/cisbenchmarks/apiserver/kubelet_https.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/kubelet_https.rego rename to checks/kubernetes/cisbenchmarks/apiserver/kubelet_https.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/kubelet_https_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/kubelet_https_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/kubelet_https_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/kubelet_https_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/kubernetes_pki_cert_permission.rego b/checks/kubernetes/cisbenchmarks/apiserver/kubernetes_pki_cert_permission.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/kubernetes_pki_cert_permission.rego rename to checks/kubernetes/cisbenchmarks/apiserver/kubernetes_pki_cert_permission.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/kubernetes_pki_cert_permission_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/kubernetes_pki_cert_permission_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/kubernetes_pki_cert_permission_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/kubernetes_pki_cert_permission_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/kubernetes_pki_directory_ownership.rego b/checks/kubernetes/cisbenchmarks/apiserver/kubernetes_pki_directory_ownership.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/kubernetes_pki_directory_ownership.rego rename to checks/kubernetes/cisbenchmarks/apiserver/kubernetes_pki_directory_ownership.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/kubernetes_pki_directory_ownership_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/kubernetes_pki_directory_ownership_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/kubernetes_pki_directory_ownership_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/kubernetes_pki_directory_ownership_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/kubernetes_pki_key_permission.rego b/checks/kubernetes/cisbenchmarks/apiserver/kubernetes_pki_key_permission.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/kubernetes_pki_key_permission.rego rename to checks/kubernetes/cisbenchmarks/apiserver/kubernetes_pki_key_permission.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/kubernetes_pki_key_permission_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/kubernetes_pki_key_permission_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/kubernetes_pki_key_permission_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/kubernetes_pki_key_permission_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/namespace_lifecycle_plugin.rego b/checks/kubernetes/cisbenchmarks/apiserver/namespace_lifecycle_plugin.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/namespace_lifecycle_plugin.rego rename to checks/kubernetes/cisbenchmarks/apiserver/namespace_lifecycle_plugin.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/namespace_lifecycle_plugin_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/namespace_lifecycle_plugin_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/namespace_lifecycle_plugin_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/namespace_lifecycle_plugin_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/node_restriction_plugin.rego b/checks/kubernetes/cisbenchmarks/apiserver/node_restriction_plugin.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/node_restriction_plugin.rego rename to checks/kubernetes/cisbenchmarks/apiserver/node_restriction_plugin.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/node_restriction_plugin_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/node_restriction_plugin_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/node_restriction_plugin_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/node_restriction_plugin_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/pod_spec_ownership.rego b/checks/kubernetes/cisbenchmarks/apiserver/pod_spec_ownership.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/pod_spec_ownership.rego rename to checks/kubernetes/cisbenchmarks/apiserver/pod_spec_ownership.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/pod_spec_permission.rego b/checks/kubernetes/cisbenchmarks/apiserver/pod_spec_permission.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/pod_spec_permission.rego rename to checks/kubernetes/cisbenchmarks/apiserver/pod_spec_permission.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/pod_spec_permission_ownership_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/pod_spec_permission_ownership_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/pod_spec_permission_ownership_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/pod_spec_permission_ownership_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/pod_spec_permission_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/pod_spec_permission_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/pod_spec_permission_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/pod_spec_permission_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/profiling.rego b/checks/kubernetes/cisbenchmarks/apiserver/profiling.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/profiling.rego rename to checks/kubernetes/cisbenchmarks/apiserver/profiling.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/profiling_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/profiling_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/profiling_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/profiling_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/secure_port.rego b/checks/kubernetes/cisbenchmarks/apiserver/secure_port.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/secure_port.rego rename to checks/kubernetes/cisbenchmarks/apiserver/secure_port.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/secure_port_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/secure_port_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/secure_port_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/secure_port_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/security_context_deny_plugin.rego b/checks/kubernetes/cisbenchmarks/apiserver/security_context_deny_plugin.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/security_context_deny_plugin.rego rename to checks/kubernetes/cisbenchmarks/apiserver/security_context_deny_plugin.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/security_context_deny_plugin_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/security_context_deny_plugin_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/security_context_deny_plugin_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/security_context_deny_plugin_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/service_account_key_file.rego b/checks/kubernetes/cisbenchmarks/apiserver/service_account_key_file.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/service_account_key_file.rego rename to checks/kubernetes/cisbenchmarks/apiserver/service_account_key_file.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/service_account_key_file_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/service_account_key_file_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/service_account_key_file_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/service_account_key_file_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/service_account_lookup.rego b/checks/kubernetes/cisbenchmarks/apiserver/service_account_lookup.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/service_account_lookup.rego rename to checks/kubernetes/cisbenchmarks/apiserver/service_account_lookup.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/service_account_lookup_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/service_account_lookup_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/service_account_lookup_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/service_account_lookup_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/service_account_plugin.rego b/checks/kubernetes/cisbenchmarks/apiserver/service_account_plugin.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/service_account_plugin.rego rename to checks/kubernetes/cisbenchmarks/apiserver/service_account_plugin.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/service_account_plugin_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/service_account_plugin_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/service_account_plugin_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/service_account_plugin_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/tls_cert_file_and_private_key_file.rego b/checks/kubernetes/cisbenchmarks/apiserver/tls_cert_file_and_private_key_file.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/tls_cert_file_and_private_key_file.rego rename to checks/kubernetes/cisbenchmarks/apiserver/tls_cert_file_and_private_key_file.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/tls_cert_file_and_private_key_file_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/tls_cert_file_and_private_key_file_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/tls_cert_file_and_private_key_file_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/tls_cert_file_and_private_key_file_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/token_auth_file.rego b/checks/kubernetes/cisbenchmarks/apiserver/token_auth_file.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/token_auth_file.rego rename to checks/kubernetes/cisbenchmarks/apiserver/token_auth_file.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/apiserver/token_auth_file_test.rego b/checks/kubernetes/cisbenchmarks/apiserver/token_auth_file_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/apiserver/token_auth_file_test.rego rename to checks/kubernetes/cisbenchmarks/apiserver/token_auth_file_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/cni/pod_spec_ownership.rego b/checks/kubernetes/cisbenchmarks/cni/pod_spec_ownership.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/cni/pod_spec_ownership.rego rename to checks/kubernetes/cisbenchmarks/cni/pod_spec_ownership.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/cni/pod_spec_permission.rego b/checks/kubernetes/cisbenchmarks/cni/pod_spec_permission.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/cni/pod_spec_permission.rego rename to checks/kubernetes/cisbenchmarks/cni/pod_spec_permission.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/cni/pod_spec_permission_ownership_test.rego b/checks/kubernetes/cisbenchmarks/cni/pod_spec_permission_ownership_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/cni/pod_spec_permission_ownership_test.rego rename to checks/kubernetes/cisbenchmarks/cni/pod_spec_permission_ownership_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/cni/pod_spec_permission_test.rego b/checks/kubernetes/cisbenchmarks/cni/pod_spec_permission_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/cni/pod_spec_permission_test.rego rename to checks/kubernetes/cisbenchmarks/cni/pod_spec_permission_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/controllermamager/bind_address.rego b/checks/kubernetes/cisbenchmarks/controllermamager/bind_address.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/controllermamager/bind_address.rego rename to checks/kubernetes/cisbenchmarks/controllermamager/bind_address.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/controllermamager/bind_address_test.rego b/checks/kubernetes/cisbenchmarks/controllermamager/bind_address_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/controllermamager/bind_address_test.rego rename to checks/kubernetes/cisbenchmarks/controllermamager/bind_address_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/controllermamager/controller_manager_conf_ownership.rego b/checks/kubernetes/cisbenchmarks/controllermamager/controller_manager_conf_ownership.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/controllermamager/controller_manager_conf_ownership.rego rename to checks/kubernetes/cisbenchmarks/controllermamager/controller_manager_conf_ownership.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/controllermamager/controller_manager_conf_ownership_test.rego b/checks/kubernetes/cisbenchmarks/controllermamager/controller_manager_conf_ownership_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/controllermamager/controller_manager_conf_ownership_test.rego rename to checks/kubernetes/cisbenchmarks/controllermamager/controller_manager_conf_ownership_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/controllermamager/controller_manager_conf_permission.rego b/checks/kubernetes/cisbenchmarks/controllermamager/controller_manager_conf_permission.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/controllermamager/controller_manager_conf_permission.rego rename to checks/kubernetes/cisbenchmarks/controllermamager/controller_manager_conf_permission.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/controllermamager/controller_manager_conf_permission_test.rego b/checks/kubernetes/cisbenchmarks/controllermamager/controller_manager_conf_permission_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/controllermamager/controller_manager_conf_permission_test.rego rename to checks/kubernetes/cisbenchmarks/controllermamager/controller_manager_conf_permission_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/controllermamager/pod_spec_ownership.rego b/checks/kubernetes/cisbenchmarks/controllermamager/pod_spec_ownership.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/controllermamager/pod_spec_ownership.rego rename to checks/kubernetes/cisbenchmarks/controllermamager/pod_spec_ownership.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/controllermamager/pod_spec_permission.rego b/checks/kubernetes/cisbenchmarks/controllermamager/pod_spec_permission.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/controllermamager/pod_spec_permission.rego rename to checks/kubernetes/cisbenchmarks/controllermamager/pod_spec_permission.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/controllermamager/pod_spec_permission_ownership_test.rego b/checks/kubernetes/cisbenchmarks/controllermamager/pod_spec_permission_ownership_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/controllermamager/pod_spec_permission_ownership_test.rego rename to checks/kubernetes/cisbenchmarks/controllermamager/pod_spec_permission_ownership_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/controllermamager/pod_spec_permission_test.rego b/checks/kubernetes/cisbenchmarks/controllermamager/pod_spec_permission_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/controllermamager/pod_spec_permission_test.rego rename to checks/kubernetes/cisbenchmarks/controllermamager/pod_spec_permission_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/controllermamager/profiling.rego b/checks/kubernetes/cisbenchmarks/controllermamager/profiling.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/controllermamager/profiling.rego rename to checks/kubernetes/cisbenchmarks/controllermamager/profiling.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/controllermamager/profiling_test.rego b/checks/kubernetes/cisbenchmarks/controllermamager/profiling_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/controllermamager/profiling_test.rego rename to checks/kubernetes/cisbenchmarks/controllermamager/profiling_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/controllermamager/root_ca_file.rego b/checks/kubernetes/cisbenchmarks/controllermamager/root_ca_file.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/controllermamager/root_ca_file.rego rename to checks/kubernetes/cisbenchmarks/controllermamager/root_ca_file.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/controllermamager/root_ca_file_test.rego b/checks/kubernetes/cisbenchmarks/controllermamager/root_ca_file_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/controllermamager/root_ca_file_test.rego rename to checks/kubernetes/cisbenchmarks/controllermamager/root_ca_file_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/controllermamager/rotate_kubelet_server_certificate.rego b/checks/kubernetes/cisbenchmarks/controllermamager/rotate_kubelet_server_certificate.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/controllermamager/rotate_kubelet_server_certificate.rego rename to checks/kubernetes/cisbenchmarks/controllermamager/rotate_kubelet_server_certificate.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/controllermamager/rotate_kubelet_server_certificate_test.rego b/checks/kubernetes/cisbenchmarks/controllermamager/rotate_kubelet_server_certificate_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/controllermamager/rotate_kubelet_server_certificate_test.rego rename to checks/kubernetes/cisbenchmarks/controllermamager/rotate_kubelet_server_certificate_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/controllermamager/service_account_private_key_file.rego b/checks/kubernetes/cisbenchmarks/controllermamager/service_account_private_key_file.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/controllermamager/service_account_private_key_file.rego rename to checks/kubernetes/cisbenchmarks/controllermamager/service_account_private_key_file.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/controllermamager/service_account_private_key_file_test.rego b/checks/kubernetes/cisbenchmarks/controllermamager/service_account_private_key_file_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/controllermamager/service_account_private_key_file_test.rego rename to checks/kubernetes/cisbenchmarks/controllermamager/service_account_private_key_file_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/controllermamager/terminated_pod_gc_threshold.rego b/checks/kubernetes/cisbenchmarks/controllermamager/terminated_pod_gc_threshold.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/controllermamager/terminated_pod_gc_threshold.rego rename to checks/kubernetes/cisbenchmarks/controllermamager/terminated_pod_gc_threshold.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/controllermamager/terminated_pod_gc_threshold_test.rego b/checks/kubernetes/cisbenchmarks/controllermamager/terminated_pod_gc_threshold_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/controllermamager/terminated_pod_gc_threshold_test.rego rename to checks/kubernetes/cisbenchmarks/controllermamager/terminated_pod_gc_threshold_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/controllermamager/use_service_account_credentials.rego b/checks/kubernetes/cisbenchmarks/controllermamager/use_service_account_credentials.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/controllermamager/use_service_account_credentials.rego rename to checks/kubernetes/cisbenchmarks/controllermamager/use_service_account_credentials.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/controllermamager/use_service_account_credentials_test.rego b/checks/kubernetes/cisbenchmarks/controllermamager/use_service_account_credentials_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/controllermamager/use_service_account_credentials_test.rego rename to checks/kubernetes/cisbenchmarks/controllermamager/use_service_account_credentials_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/etcd/auto_tls.rego b/checks/kubernetes/cisbenchmarks/etcd/auto_tls.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/etcd/auto_tls.rego rename to checks/kubernetes/cisbenchmarks/etcd/auto_tls.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/etcd/auto_tls_test.rego b/checks/kubernetes/cisbenchmarks/etcd/auto_tls_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/etcd/auto_tls_test.rego rename to checks/kubernetes/cisbenchmarks/etcd/auto_tls_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/etcd/cert_file_and_key_file.rego b/checks/kubernetes/cisbenchmarks/etcd/cert_file_and_key_file.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/etcd/cert_file_and_key_file.rego rename to checks/kubernetes/cisbenchmarks/etcd/cert_file_and_key_file.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/etcd/cert_file_and_key_file_test.rego b/checks/kubernetes/cisbenchmarks/etcd/cert_file_and_key_file_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/etcd/cert_file_and_key_file_test.rego rename to checks/kubernetes/cisbenchmarks/etcd/cert_file_and_key_file_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/etcd/client_cert_auth.rego b/checks/kubernetes/cisbenchmarks/etcd/client_cert_auth.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/etcd/client_cert_auth.rego rename to checks/kubernetes/cisbenchmarks/etcd/client_cert_auth.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/etcd/client_cert_auth_test.rego b/checks/kubernetes/cisbenchmarks/etcd/client_cert_auth_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/etcd/client_cert_auth_test.rego rename to checks/kubernetes/cisbenchmarks/etcd/client_cert_auth_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/etcd/data_directory_ownership.rego b/checks/kubernetes/cisbenchmarks/etcd/data_directory_ownership.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/etcd/data_directory_ownership.rego rename to checks/kubernetes/cisbenchmarks/etcd/data_directory_ownership.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/etcd/data_directory_ownership_test.rego b/checks/kubernetes/cisbenchmarks/etcd/data_directory_ownership_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/etcd/data_directory_ownership_test.rego rename to checks/kubernetes/cisbenchmarks/etcd/data_directory_ownership_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/etcd/data_directory_permission.rego b/checks/kubernetes/cisbenchmarks/etcd/data_directory_permission.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/etcd/data_directory_permission.rego rename to checks/kubernetes/cisbenchmarks/etcd/data_directory_permission.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/etcd/data_directory_permission_test.rego b/checks/kubernetes/cisbenchmarks/etcd/data_directory_permission_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/etcd/data_directory_permission_test.rego rename to checks/kubernetes/cisbenchmarks/etcd/data_directory_permission_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/etcd/peer_auto_tls.rego b/checks/kubernetes/cisbenchmarks/etcd/peer_auto_tls.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/etcd/peer_auto_tls.rego rename to checks/kubernetes/cisbenchmarks/etcd/peer_auto_tls.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/etcd/peer_auto_tls_test.rego b/checks/kubernetes/cisbenchmarks/etcd/peer_auto_tls_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/etcd/peer_auto_tls_test.rego rename to checks/kubernetes/cisbenchmarks/etcd/peer_auto_tls_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/etcd/peer_cert_file_and_key_file.rego b/checks/kubernetes/cisbenchmarks/etcd/peer_cert_file_and_key_file.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/etcd/peer_cert_file_and_key_file.rego rename to checks/kubernetes/cisbenchmarks/etcd/peer_cert_file_and_key_file.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/etcd/peer_cert_file_and_key_file_test.rego b/checks/kubernetes/cisbenchmarks/etcd/peer_cert_file_and_key_file_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/etcd/peer_cert_file_and_key_file_test.rego rename to checks/kubernetes/cisbenchmarks/etcd/peer_cert_file_and_key_file_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/etcd/peer_client_cert_auth.rego b/checks/kubernetes/cisbenchmarks/etcd/peer_client_cert_auth.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/etcd/peer_client_cert_auth.rego rename to checks/kubernetes/cisbenchmarks/etcd/peer_client_cert_auth.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/etcd/peer_client_cert_auth_test.rego b/checks/kubernetes/cisbenchmarks/etcd/peer_client_cert_auth_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/etcd/peer_client_cert_auth_test.rego rename to checks/kubernetes/cisbenchmarks/etcd/peer_client_cert_auth_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/etcd/pod_spec_ownership.rego b/checks/kubernetes/cisbenchmarks/etcd/pod_spec_ownership.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/etcd/pod_spec_ownership.rego rename to checks/kubernetes/cisbenchmarks/etcd/pod_spec_ownership.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/etcd/pod_spec_permission.rego b/checks/kubernetes/cisbenchmarks/etcd/pod_spec_permission.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/etcd/pod_spec_permission.rego rename to checks/kubernetes/cisbenchmarks/etcd/pod_spec_permission.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/etcd/pod_spec_permission_ownership_test.rego b/checks/kubernetes/cisbenchmarks/etcd/pod_spec_permission_ownership_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/etcd/pod_spec_permission_ownership_test.rego rename to checks/kubernetes/cisbenchmarks/etcd/pod_spec_permission_ownership_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/etcd/pod_spec_permission_test.rego b/checks/kubernetes/cisbenchmarks/etcd/pod_spec_permission_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/etcd/pod_spec_permission_test.rego rename to checks/kubernetes/cisbenchmarks/etcd/pod_spec_permission_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/certificate_authorities_file_ownership.rego b/checks/kubernetes/cisbenchmarks/kubelet/certificate_authorities_file_ownership.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/certificate_authorities_file_ownership.rego rename to checks/kubernetes/cisbenchmarks/kubelet/certificate_authorities_file_ownership.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/certificate_authorities_file_ownership_test.rego b/checks/kubernetes/cisbenchmarks/kubelet/certificate_authorities_file_ownership_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/certificate_authorities_file_ownership_test.rego rename to checks/kubernetes/cisbenchmarks/kubelet/certificate_authorities_file_ownership_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/certificate_authorities_file_permission.rego b/checks/kubernetes/cisbenchmarks/kubelet/certificate_authorities_file_permission.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/certificate_authorities_file_permission.rego rename to checks/kubernetes/cisbenchmarks/kubelet/certificate_authorities_file_permission.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/certificate_authorities_file_permission_test.rego b/checks/kubernetes/cisbenchmarks/kubelet/certificate_authorities_file_permission_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/certificate_authorities_file_permission_test.rego rename to checks/kubernetes/cisbenchmarks/kubelet/certificate_authorities_file_permission_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_anonymous_auth_argument.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_anonymous_auth_argument.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_anonymous_auth_argument.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_anonymous_auth_argument.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_anonymous_auth_argument_test.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_anonymous_auth_argument_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_anonymous_auth_argument_test.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_anonymous_auth_argument_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_authorization_mode_argument.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_authorization_mode_argument.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_authorization_mode_argument.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_authorization_mode_argument.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_authorization_mode_argument_test.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_authorization_mode_argument_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_authorization_mode_argument_test.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_authorization_mode_argument_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_client_ca_file_argument.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_client_ca_file_argument.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_client_ca_file_argument.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_client_ca_file_argument.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_client_ca_file_argument_test.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_client_ca_file_argument_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_client_ca_file_argument_test.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_client_ca_file_argument_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_config_file_ownership.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_config_file_ownership.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_config_file_ownership.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_config_file_ownership.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_config_file_ownership_test.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_config_file_ownership_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_config_file_ownership_test.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_config_file_ownership_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_config_file_permission.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_config_file_permission.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_config_file_permission.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_config_file_permission.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_config_file_permission_test.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_config_file_permission_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_config_file_permission_test.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_config_file_permission_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_config_yaml_ownership.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_config_yaml_ownership.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_config_yaml_ownership.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_config_yaml_ownership.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_config_yaml_ownership_test.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_config_yaml_ownership_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_config_yaml_ownership_test.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_config_yaml_ownership_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_config_yaml_permission.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_config_yaml_permission.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_config_yaml_permission.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_config_yaml_permission.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_config_yaml_permission_test.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_config_yaml_permission_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_config_yaml_permission_test.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_config_yaml_permission_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_event_qps.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_event_qps.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_event_qps.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_event_qps.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_event_qps_test.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_event_qps_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_event_qps_test.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_event_qps_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_hostname_override.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_hostname_override.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_hostname_override.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_hostname_override.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_hostname_override_test.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_hostname_override_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_hostname_override_test.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_hostname_override_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_make_iptables_util_chains.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_make_iptables_util_chains.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_make_iptables_util_chains.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_make_iptables_util_chains.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_make_iptables_util_chains_test.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_make_iptables_util_chains_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_make_iptables_util_chains_test.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_make_iptables_util_chains_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_only_use_strong_cryptographic.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_only_use_strong_cryptographic.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_only_use_strong_cryptographic.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_only_use_strong_cryptographic.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_only_use_strong_cryptographic_test.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_only_use_strong_cryptographic_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_only_use_strong_cryptographic_test.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_only_use_strong_cryptographic_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_protect_kernel_defaults.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_protect_kernel_defaults.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_protect_kernel_defaults.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_protect_kernel_defaults.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_protect_kernel_defaults_test.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_protect_kernel_defaults_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_protect_kernel_defaults_test.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_protect_kernel_defaults_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_read_only_port_argument.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_read_only_port_argument.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_read_only_port_argument.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_read_only_port_argument.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_read_only_port_argument_test.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_read_only_port_argument_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_read_only_port_argument_test.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_read_only_port_argument_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_rotate_certificates.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_rotate_certificates.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_rotate_certificates.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_rotate_certificates.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_rotate_certificates_test.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_rotate_certificates_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_rotate_certificates_test.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_rotate_certificates_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_rotate_kubelet_server_certificate.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_rotate_kubelet_server_certificate.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_rotate_kubelet_server_certificate.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_rotate_kubelet_server_certificate.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_rotate_kubelet_server_certificate_test.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_rotate_kubelet_server_certificate_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_rotate_kubelet_server_certificate_test.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_rotate_kubelet_server_certificate_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_streaming_connection_argument.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_streaming_connection_argument.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_streaming_connection_argument.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_streaming_connection_argument.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_streaming_connection_argument_test.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_streaming_connection_argument_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_streaming_connection_argument_test.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_streaming_connection_argument_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_tls_cert_file.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_tls_cert_file.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_tls_cert_file.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_tls_cert_file.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_tls_cert_file_test.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_tls_cert_file_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_tls_cert_file_test.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_tls_cert_file_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_tls_key_file.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_tls_key_file.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_tls_key_file.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_tls_key_file.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_tls_key_file_test.rego b/checks/kubernetes/cisbenchmarks/kubelet/kubelet_tls_key_file_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kubelet_tls_key_file_test.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kubelet_tls_key_file_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kublet_service_file_ownership.rego b/checks/kubernetes/cisbenchmarks/kubelet/kublet_service_file_ownership.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kublet_service_file_ownership.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kublet_service_file_ownership.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kublet_service_file_ownership_test.rego b/checks/kubernetes/cisbenchmarks/kubelet/kublet_service_file_ownership_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kublet_service_file_ownership_test.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kublet_service_file_ownership_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kublet_service_file_permission.rego b/checks/kubernetes/cisbenchmarks/kubelet/kublet_service_file_permission.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kublet_service_file_permission.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kublet_service_file_permission.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/kublet_service_file_permission_test.rego b/checks/kubernetes/cisbenchmarks/kubelet/kublet_service_file_permission_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/kublet_service_file_permission_test.rego rename to checks/kubernetes/cisbenchmarks/kubelet/kublet_service_file_permission_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/proxy_kube_config_file_ownership.rego b/checks/kubernetes/cisbenchmarks/kubelet/proxy_kube_config_file_ownership.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/proxy_kube_config_file_ownership.rego rename to checks/kubernetes/cisbenchmarks/kubelet/proxy_kube_config_file_ownership.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/proxy_kube_config_file_ownership_test.rego b/checks/kubernetes/cisbenchmarks/kubelet/proxy_kube_config_file_ownership_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/proxy_kube_config_file_ownership_test.rego rename to checks/kubernetes/cisbenchmarks/kubelet/proxy_kube_config_file_ownership_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/proxy_kube_config_file_permission.rego b/checks/kubernetes/cisbenchmarks/kubelet/proxy_kube_config_file_permission.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/proxy_kube_config_file_permission.rego rename to checks/kubernetes/cisbenchmarks/kubelet/proxy_kube_config_file_permission.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/kubelet/proxy_kube_config_file_permission_test.rego b/checks/kubernetes/cisbenchmarks/kubelet/proxy_kube_config_file_permission_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/kubelet/proxy_kube_config_file_permission_test.rego rename to checks/kubernetes/cisbenchmarks/kubelet/proxy_kube_config_file_permission_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/scheduler/bind_address.rego b/checks/kubernetes/cisbenchmarks/scheduler/bind_address.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/scheduler/bind_address.rego rename to checks/kubernetes/cisbenchmarks/scheduler/bind_address.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/scheduler/bind_address_test.rego b/checks/kubernetes/cisbenchmarks/scheduler/bind_address_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/scheduler/bind_address_test.rego rename to checks/kubernetes/cisbenchmarks/scheduler/bind_address_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/scheduler/pod_spec_ownership.rego b/checks/kubernetes/cisbenchmarks/scheduler/pod_spec_ownership.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/scheduler/pod_spec_ownership.rego rename to checks/kubernetes/cisbenchmarks/scheduler/pod_spec_ownership.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/scheduler/pod_spec_permission.rego b/checks/kubernetes/cisbenchmarks/scheduler/pod_spec_permission.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/scheduler/pod_spec_permission.rego rename to checks/kubernetes/cisbenchmarks/scheduler/pod_spec_permission.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/scheduler/pod_spec_permission_ownership_test.rego b/checks/kubernetes/cisbenchmarks/scheduler/pod_spec_permission_ownership_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/scheduler/pod_spec_permission_ownership_test.rego rename to checks/kubernetes/cisbenchmarks/scheduler/pod_spec_permission_ownership_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/scheduler/pod_spec_permission_test.rego b/checks/kubernetes/cisbenchmarks/scheduler/pod_spec_permission_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/scheduler/pod_spec_permission_test.rego rename to checks/kubernetes/cisbenchmarks/scheduler/pod_spec_permission_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/scheduler/profiling.rego b/checks/kubernetes/cisbenchmarks/scheduler/profiling.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/scheduler/profiling.rego rename to checks/kubernetes/cisbenchmarks/scheduler/profiling.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/scheduler/profiling_test.rego b/checks/kubernetes/cisbenchmarks/scheduler/profiling_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/scheduler/profiling_test.rego rename to checks/kubernetes/cisbenchmarks/scheduler/profiling_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/scheduler/scheduler_conf_ownership.rego b/checks/kubernetes/cisbenchmarks/scheduler/scheduler_conf_ownership.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/scheduler/scheduler_conf_ownership.rego rename to checks/kubernetes/cisbenchmarks/scheduler/scheduler_conf_ownership.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/scheduler/scheduler_conf_ownership_test.rego b/checks/kubernetes/cisbenchmarks/scheduler/scheduler_conf_ownership_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/scheduler/scheduler_conf_ownership_test.rego rename to checks/kubernetes/cisbenchmarks/scheduler/scheduler_conf_ownership_test.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/scheduler/scheduler_conf_permission.rego b/checks/kubernetes/cisbenchmarks/scheduler/scheduler_conf_permission.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/scheduler/scheduler_conf_permission.rego rename to checks/kubernetes/cisbenchmarks/scheduler/scheduler_conf_permission.rego diff --git a/rules/kubernetes/policies/cisbenchmarks/scheduler/scheduler_conf_permission_test.rego b/checks/kubernetes/cisbenchmarks/scheduler/scheduler_conf_permission_test.rego similarity index 100% rename from rules/kubernetes/policies/cisbenchmarks/scheduler/scheduler_conf_permission_test.rego rename to checks/kubernetes/cisbenchmarks/scheduler/scheduler_conf_permission_test.rego diff --git a/rules/kubernetes/policies/dynamic/outdated_api.rego b/checks/kubernetes/dynamic/outdated_api.rego similarity index 100% rename from rules/kubernetes/policies/dynamic/outdated_api.rego rename to checks/kubernetes/dynamic/outdated_api.rego diff --git a/rules/kubernetes/policies/dynamic/outdated_api_test.rego b/checks/kubernetes/dynamic/outdated_api_test.rego similarity index 100% rename from rules/kubernetes/policies/dynamic/outdated_api_test.rego rename to checks/kubernetes/dynamic/outdated_api_test.rego diff --git a/rules/kubernetes/policies/general/CPU_not_limited.rego b/checks/kubernetes/general/CPU_not_limited.rego similarity index 100% rename from rules/kubernetes/policies/general/CPU_not_limited.rego rename to checks/kubernetes/general/CPU_not_limited.rego diff --git a/rules/kubernetes/policies/general/CPU_not_limited_test.rego b/checks/kubernetes/general/CPU_not_limited_test.rego similarity index 100% rename from rules/kubernetes/policies/general/CPU_not_limited_test.rego rename to checks/kubernetes/general/CPU_not_limited_test.rego diff --git a/rules/kubernetes/policies/general/CPU_requests_not_specified.rego b/checks/kubernetes/general/CPU_requests_not_specified.rego similarity index 100% rename from rules/kubernetes/policies/general/CPU_requests_not_specified.rego rename to checks/kubernetes/general/CPU_requests_not_specified.rego diff --git a/rules/kubernetes/policies/general/CPU_requests_not_specified_test.rego b/checks/kubernetes/general/CPU_requests_not_specified_test.rego similarity index 100% rename from rules/kubernetes/policies/general/CPU_requests_not_specified_test.rego rename to checks/kubernetes/general/CPU_requests_not_specified_test.rego diff --git a/rules/kubernetes/policies/general/SYS_ADMIN_capability.rego b/checks/kubernetes/general/SYS_ADMIN_capability.rego similarity index 100% rename from rules/kubernetes/policies/general/SYS_ADMIN_capability.rego rename to checks/kubernetes/general/SYS_ADMIN_capability.rego diff --git a/rules/kubernetes/policies/general/SYS_ADMIN_capability_test.rego b/checks/kubernetes/general/SYS_ADMIN_capability_test.rego similarity index 100% rename from rules/kubernetes/policies/general/SYS_ADMIN_capability_test.rego rename to checks/kubernetes/general/SYS_ADMIN_capability_test.rego diff --git a/rules/kubernetes/policies/general/SYS_MODULE_capability.rego b/checks/kubernetes/general/SYS_MODULE_capability.rego similarity index 100% rename from rules/kubernetes/policies/general/SYS_MODULE_capability.rego rename to checks/kubernetes/general/SYS_MODULE_capability.rego diff --git a/rules/kubernetes/policies/general/SYS_MODULE_capability_test.rego b/checks/kubernetes/general/SYS_MODULE_capability_test.rego similarity index 100% rename from rules/kubernetes/policies/general/SYS_MODULE_capability_test.rego rename to checks/kubernetes/general/SYS_MODULE_capability_test.rego diff --git a/rules/kubernetes/policies/general/allowing_create_role_binding_and_associate_privileged_clusterrole.rego b/checks/kubernetes/general/allowing_create_role_binding_and_associate_privileged_clusterrole.rego similarity index 100% rename from rules/kubernetes/policies/general/allowing_create_role_binding_and_associate_privileged_clusterrole.rego rename to checks/kubernetes/general/allowing_create_role_binding_and_associate_privileged_clusterrole.rego diff --git a/rules/kubernetes/policies/general/allowing_create_role_binding_and_associate_privileged_clusterrole_test.rego b/checks/kubernetes/general/allowing_create_role_binding_and_associate_privileged_clusterrole_test.rego similarity index 100% rename from rules/kubernetes/policies/general/allowing_create_role_binding_and_associate_privileged_clusterrole_test.rego rename to checks/kubernetes/general/allowing_create_role_binding_and_associate_privileged_clusterrole_test.rego diff --git a/rules/kubernetes/policies/general/allowing_create_role_clusterrolebinding_and_associate_privileged_clusterrole.rego b/checks/kubernetes/general/allowing_create_role_clusterrolebinding_and_associate_privileged_clusterrole.rego similarity index 100% rename from rules/kubernetes/policies/general/allowing_create_role_clusterrolebinding_and_associate_privileged_clusterrole.rego rename to checks/kubernetes/general/allowing_create_role_clusterrolebinding_and_associate_privileged_clusterrole.rego diff --git a/rules/kubernetes/policies/general/allowing_create_role_clusterrolebinding_and_associate_privileged_clusterrole_test.rego b/checks/kubernetes/general/allowing_create_role_clusterrolebinding_and_associate_privileged_clusterrole_test.rego similarity index 100% rename from rules/kubernetes/policies/general/allowing_create_role_clusterrolebinding_and_associate_privileged_clusterrole_test.rego rename to checks/kubernetes/general/allowing_create_role_clusterrolebinding_and_associate_privileged_clusterrole_test.rego diff --git a/rules/kubernetes/policies/general/allowing_to_update_a_malicious_pod.rego b/checks/kubernetes/general/allowing_to_update_a_malicious_pod.rego similarity index 100% rename from rules/kubernetes/policies/general/allowing_to_update_a_malicious_pod.rego rename to checks/kubernetes/general/allowing_to_update_a_malicious_pod.rego diff --git a/rules/kubernetes/policies/general/allowing_to_update_a_malicious_pod_test.rego b/checks/kubernetes/general/allowing_to_update_a_malicious_pod_test.rego similarity index 100% rename from rules/kubernetes/policies/general/allowing_to_update_a_malicious_pod_test.rego rename to checks/kubernetes/general/allowing_to_update_a_malicious_pod_test.rego diff --git a/rules/kubernetes/policies/general/allowing_users_rolebinding_add_other_users_rolebindings.rego b/checks/kubernetes/general/allowing_users_rolebinding_add_other_users_rolebindings.rego similarity index 100% rename from rules/kubernetes/policies/general/allowing_users_rolebinding_add_other_users_rolebindings.rego rename to checks/kubernetes/general/allowing_users_rolebinding_add_other_users_rolebindings.rego diff --git a/rules/kubernetes/policies/general/allowing_users_rolebinding_add_other_users_rolebindings_test.rego b/checks/kubernetes/general/allowing_users_rolebinding_add_other_users_rolebindings_test.rego similarity index 100% rename from rules/kubernetes/policies/general/allowing_users_rolebinding_add_other_users_rolebindings_test.rego rename to checks/kubernetes/general/allowing_users_rolebinding_add_other_users_rolebindings_test.rego diff --git a/rules/kubernetes/policies/general/anonymous_user_bind.rego b/checks/kubernetes/general/anonymous_user_bind.rego similarity index 100% rename from rules/kubernetes/policies/general/anonymous_user_bind.rego rename to checks/kubernetes/general/anonymous_user_bind.rego diff --git a/rules/kubernetes/policies/general/anonymous_user_bind_test.rego b/checks/kubernetes/general/anonymous_user_bind_test.rego similarity index 100% rename from rules/kubernetes/policies/general/anonymous_user_bind_test.rego rename to checks/kubernetes/general/anonymous_user_bind_test.rego diff --git a/rules/kubernetes/policies/general/any_any.rego b/checks/kubernetes/general/any_any.rego similarity index 100% rename from rules/kubernetes/policies/general/any_any.rego rename to checks/kubernetes/general/any_any.rego diff --git a/rules/kubernetes/policies/general/any_any_test.rego b/checks/kubernetes/general/any_any_test.rego similarity index 100% rename from rules/kubernetes/policies/general/any_any_test.rego rename to checks/kubernetes/general/any_any_test.rego diff --git a/rules/kubernetes/policies/general/any_verb.rego b/checks/kubernetes/general/any_verb.rego similarity index 100% rename from rules/kubernetes/policies/general/any_verb.rego rename to checks/kubernetes/general/any_verb.rego diff --git a/rules/kubernetes/policies/general/any_verb_test.rego b/checks/kubernetes/general/any_verb_test.rego similarity index 100% rename from rules/kubernetes/policies/general/any_verb_test.rego rename to checks/kubernetes/general/any_verb_test.rego diff --git a/rules/kubernetes/policies/general/attaching_pod_view_logs_realtime.rego b/checks/kubernetes/general/attaching_pod_view_logs_realtime.rego similarity index 100% rename from rules/kubernetes/policies/general/attaching_pod_view_logs_realtime.rego rename to checks/kubernetes/general/attaching_pod_view_logs_realtime.rego diff --git a/rules/kubernetes/policies/general/attaching_pod_view_logs_realtime_test.rego b/checks/kubernetes/general/attaching_pod_view_logs_realtime_test.rego similarity index 100% rename from rules/kubernetes/policies/general/attaching_pod_view_logs_realtime_test.rego rename to checks/kubernetes/general/attaching_pod_view_logs_realtime_test.rego diff --git a/rules/kubernetes/policies/general/capabilities_no_drop_all.rego b/checks/kubernetes/general/capabilities_no_drop_all.rego similarity index 100% rename from rules/kubernetes/policies/general/capabilities_no_drop_all.rego rename to checks/kubernetes/general/capabilities_no_drop_all.rego diff --git a/rules/kubernetes/policies/general/capabilities_no_drop_all_test.rego b/checks/kubernetes/general/capabilities_no_drop_all_test.rego similarity index 100% rename from rules/kubernetes/policies/general/capabilities_no_drop_all_test.rego rename to checks/kubernetes/general/capabilities_no_drop_all_test.rego diff --git a/rules/kubernetes/policies/general/default_security_context.rego b/checks/kubernetes/general/default_security_context.rego similarity index 100% rename from rules/kubernetes/policies/general/default_security_context.rego rename to checks/kubernetes/general/default_security_context.rego diff --git a/rules/kubernetes/policies/general/default_security_context_test.rego b/checks/kubernetes/general/default_security_context_test.rego similarity index 100% rename from rules/kubernetes/policies/general/default_security_context_test.rego rename to checks/kubernetes/general/default_security_context_test.rego diff --git a/rules/kubernetes/policies/general/delete_pod_logs.rego b/checks/kubernetes/general/delete_pod_logs.rego similarity index 100% rename from rules/kubernetes/policies/general/delete_pod_logs.rego rename to checks/kubernetes/general/delete_pod_logs.rego diff --git a/rules/kubernetes/policies/general/delete_pod_logs_test.rego b/checks/kubernetes/general/delete_pod_logs_test.rego similarity index 100% rename from rules/kubernetes/policies/general/delete_pod_logs_test.rego rename to checks/kubernetes/general/delete_pod_logs_test.rego diff --git a/rules/kubernetes/policies/general/file_system_not_read_only.rego b/checks/kubernetes/general/file_system_not_read_only.rego similarity index 100% rename from rules/kubernetes/policies/general/file_system_not_read_only.rego rename to checks/kubernetes/general/file_system_not_read_only.rego diff --git a/rules/kubernetes/policies/general/file_system_not_read_only_test.rego b/checks/kubernetes/general/file_system_not_read_only_test.rego similarity index 100% rename from rules/kubernetes/policies/general/file_system_not_read_only_test.rego rename to checks/kubernetes/general/file_system_not_read_only_test.rego diff --git a/rules/kubernetes/policies/general/get_shell_on_pod.rego b/checks/kubernetes/general/get_shell_on_pod.rego similarity index 100% rename from rules/kubernetes/policies/general/get_shell_on_pod.rego rename to checks/kubernetes/general/get_shell_on_pod.rego diff --git a/rules/kubernetes/policies/general/get_shell_on_pod_test.rego b/checks/kubernetes/general/get_shell_on_pod_test.rego similarity index 100% rename from rules/kubernetes/policies/general/get_shell_on_pod_test.rego rename to checks/kubernetes/general/get_shell_on_pod_test.rego diff --git a/rules/kubernetes/policies/general/impersonate_privileged_groups.rego b/checks/kubernetes/general/impersonate_privileged_groups.rego similarity index 100% rename from rules/kubernetes/policies/general/impersonate_privileged_groups.rego rename to checks/kubernetes/general/impersonate_privileged_groups.rego diff --git a/rules/kubernetes/policies/general/impersonate_privileged_groups_test.rego b/checks/kubernetes/general/impersonate_privileged_groups_test.rego similarity index 100% rename from rules/kubernetes/policies/general/impersonate_privileged_groups_test.rego rename to checks/kubernetes/general/impersonate_privileged_groups_test.rego diff --git a/rules/kubernetes/policies/general/manage_all_resources.rego b/checks/kubernetes/general/manage_all_resources.rego similarity index 100% rename from rules/kubernetes/policies/general/manage_all_resources.rego rename to checks/kubernetes/general/manage_all_resources.rego diff --git a/rules/kubernetes/policies/general/manage_all_resources_at_namespace.rego b/checks/kubernetes/general/manage_all_resources_at_namespace.rego similarity index 100% rename from rules/kubernetes/policies/general/manage_all_resources_at_namespace.rego rename to checks/kubernetes/general/manage_all_resources_at_namespace.rego diff --git a/rules/kubernetes/policies/general/manage_all_resources_at_the_namespace_test.rego b/checks/kubernetes/general/manage_all_resources_at_the_namespace_test.rego similarity index 100% rename from rules/kubernetes/policies/general/manage_all_resources_at_the_namespace_test.rego rename to checks/kubernetes/general/manage_all_resources_at_the_namespace_test.rego diff --git a/rules/kubernetes/policies/general/manage_all_resources_test.rego b/checks/kubernetes/general/manage_all_resources_test.rego similarity index 100% rename from rules/kubernetes/policies/general/manage_all_resources_test.rego rename to checks/kubernetes/general/manage_all_resources_test.rego diff --git a/rules/kubernetes/policies/general/manage_configmaps.rego b/checks/kubernetes/general/manage_configmaps.rego similarity index 100% rename from rules/kubernetes/policies/general/manage_configmaps.rego rename to checks/kubernetes/general/manage_configmaps.rego diff --git a/rules/kubernetes/policies/general/manage_configmaps_test.rego b/checks/kubernetes/general/manage_configmaps_test.rego similarity index 100% rename from rules/kubernetes/policies/general/manage_configmaps_test.rego rename to checks/kubernetes/general/manage_configmaps_test.rego diff --git a/rules/kubernetes/policies/general/manage_eks_iam_auth_configmap.rego b/checks/kubernetes/general/manage_eks_iam_auth_configmap.rego similarity index 100% rename from rules/kubernetes/policies/general/manage_eks_iam_auth_configmap.rego rename to checks/kubernetes/general/manage_eks_iam_auth_configmap.rego diff --git a/rules/kubernetes/policies/general/manage_eks_iam_auth_configmap_test.rego b/checks/kubernetes/general/manage_eks_iam_auth_configmap_test.rego similarity index 100% rename from rules/kubernetes/policies/general/manage_eks_iam_auth_configmap_test.rego rename to checks/kubernetes/general/manage_eks_iam_auth_configmap_test.rego diff --git a/rules/kubernetes/policies/general/manage_kubernetes_networking.rego b/checks/kubernetes/general/manage_kubernetes_networking.rego similarity index 100% rename from rules/kubernetes/policies/general/manage_kubernetes_networking.rego rename to checks/kubernetes/general/manage_kubernetes_networking.rego diff --git a/rules/kubernetes/policies/general/manage_kubernetes_networking_test.rego b/checks/kubernetes/general/manage_kubernetes_networking_test.rego similarity index 100% rename from rules/kubernetes/policies/general/manage_kubernetes_networking_test.rego rename to checks/kubernetes/general/manage_kubernetes_networking_test.rego diff --git a/rules/kubernetes/policies/general/manage_kubernetes_rbac_resources.rego b/checks/kubernetes/general/manage_kubernetes_rbac_resources.rego similarity index 100% rename from rules/kubernetes/policies/general/manage_kubernetes_rbac_resources.rego rename to checks/kubernetes/general/manage_kubernetes_rbac_resources.rego diff --git a/rules/kubernetes/policies/general/manage_kubernetes_rbac_resources_test.rego b/checks/kubernetes/general/manage_kubernetes_rbac_resources_test.rego similarity index 100% rename from rules/kubernetes/policies/general/manage_kubernetes_rbac_resources_test.rego rename to checks/kubernetes/general/manage_kubernetes_rbac_resources_test.rego diff --git a/rules/kubernetes/policies/general/manage_namespace_secrets.rego b/checks/kubernetes/general/manage_namespace_secrets.rego similarity index 100% rename from rules/kubernetes/policies/general/manage_namespace_secrets.rego rename to checks/kubernetes/general/manage_namespace_secrets.rego diff --git a/rules/kubernetes/policies/general/manage_namespace_secrets_test.rego b/checks/kubernetes/general/manage_namespace_secrets_test.rego similarity index 100% rename from rules/kubernetes/policies/general/manage_namespace_secrets_test.rego rename to checks/kubernetes/general/manage_namespace_secrets_test.rego diff --git a/rules/kubernetes/policies/general/manage_secrets.rego b/checks/kubernetes/general/manage_secrets.rego similarity index 100% rename from rules/kubernetes/policies/general/manage_secrets.rego rename to checks/kubernetes/general/manage_secrets.rego diff --git a/rules/kubernetes/policies/general/manage_secrets_test.rego b/checks/kubernetes/general/manage_secrets_test.rego similarity index 100% rename from rules/kubernetes/policies/general/manage_secrets_test.rego rename to checks/kubernetes/general/manage_secrets_test.rego diff --git a/rules/kubernetes/policies/general/manage_webhook_configurations.rego b/checks/kubernetes/general/manage_webhook_configurations.rego similarity index 100% rename from rules/kubernetes/policies/general/manage_webhook_configurations.rego rename to checks/kubernetes/general/manage_webhook_configurations.rego diff --git a/rules/kubernetes/policies/general/manage_webhook_configurations_test.rego b/checks/kubernetes/general/manage_webhook_configurations_test.rego similarity index 100% rename from rules/kubernetes/policies/general/manage_webhook_configurations_test.rego rename to checks/kubernetes/general/manage_webhook_configurations_test.rego diff --git a/rules/kubernetes/policies/general/memory_not_limited.rego b/checks/kubernetes/general/memory_not_limited.rego similarity index 100% rename from rules/kubernetes/policies/general/memory_not_limited.rego rename to checks/kubernetes/general/memory_not_limited.rego diff --git a/rules/kubernetes/policies/general/memory_not_limited_test.rego b/checks/kubernetes/general/memory_not_limited_test.rego similarity index 100% rename from rules/kubernetes/policies/general/memory_not_limited_test.rego rename to checks/kubernetes/general/memory_not_limited_test.rego diff --git a/rules/kubernetes/policies/general/memory_requests_not_specified.rego b/checks/kubernetes/general/memory_requests_not_specified.rego similarity index 100% rename from rules/kubernetes/policies/general/memory_requests_not_specified.rego rename to checks/kubernetes/general/memory_requests_not_specified.rego diff --git a/rules/kubernetes/policies/general/memory_requests_not_specified_test.rego b/checks/kubernetes/general/memory_requests_not_specified_test.rego similarity index 100% rename from rules/kubernetes/policies/general/memory_requests_not_specified_test.rego rename to checks/kubernetes/general/memory_requests_not_specified_test.rego diff --git a/rules/kubernetes/policies/general/mounts_docker_socket.rego b/checks/kubernetes/general/mounts_docker_socket.rego similarity index 100% rename from rules/kubernetes/policies/general/mounts_docker_socket.rego rename to checks/kubernetes/general/mounts_docker_socket.rego diff --git a/rules/kubernetes/policies/general/mounts_docker_socket_test.rego b/checks/kubernetes/general/mounts_docker_socket_test.rego similarity index 100% rename from rules/kubernetes/policies/general/mounts_docker_socket_test.rego rename to checks/kubernetes/general/mounts_docker_socket_test.rego diff --git a/rules/kubernetes/policies/general/net_raw_capability.rego b/checks/kubernetes/general/net_raw_capability.rego similarity index 100% rename from rules/kubernetes/policies/general/net_raw_capability.rego rename to checks/kubernetes/general/net_raw_capability.rego diff --git a/rules/kubernetes/policies/general/net_raw_capability_test.rego b/checks/kubernetes/general/net_raw_capability_test.rego similarity index 100% rename from rules/kubernetes/policies/general/net_raw_capability_test.rego rename to checks/kubernetes/general/net_raw_capability_test.rego diff --git a/rules/kubernetes/policies/general/privilege_escalation_from_node_proxy.rego b/checks/kubernetes/general/privilege_escalation_from_node_proxy.rego similarity index 100% rename from rules/kubernetes/policies/general/privilege_escalation_from_node_proxy.rego rename to checks/kubernetes/general/privilege_escalation_from_node_proxy.rego diff --git a/rules/kubernetes/policies/general/privilege_escalation_from_node_proxy_test.rego b/checks/kubernetes/general/privilege_escalation_from_node_proxy_test.rego similarity index 100% rename from rules/kubernetes/policies/general/privilege_escalation_from_node_proxy_test.rego rename to checks/kubernetes/general/privilege_escalation_from_node_proxy_test.rego diff --git a/rules/kubernetes/policies/general/runs_with_GID_le_10000.rego b/checks/kubernetes/general/runs_with_GID_le_10000.rego similarity index 100% rename from rules/kubernetes/policies/general/runs_with_GID_le_10000.rego rename to checks/kubernetes/general/runs_with_GID_le_10000.rego diff --git a/rules/kubernetes/policies/general/runs_with_GID_le_10000_test.rego b/checks/kubernetes/general/runs_with_GID_le_10000_test.rego similarity index 100% rename from rules/kubernetes/policies/general/runs_with_GID_le_10000_test.rego rename to checks/kubernetes/general/runs_with_GID_le_10000_test.rego diff --git a/rules/kubernetes/policies/general/runs_with_UID_le_10000.rego b/checks/kubernetes/general/runs_with_UID_le_10000.rego similarity index 100% rename from rules/kubernetes/policies/general/runs_with_UID_le_10000.rego rename to checks/kubernetes/general/runs_with_UID_le_10000.rego diff --git a/rules/kubernetes/policies/general/runs_with_UID_le_10000_test.rego b/checks/kubernetes/general/runs_with_UID_le_10000_test.rego similarity index 100% rename from rules/kubernetes/policies/general/runs_with_UID_le_10000_test.rego rename to checks/kubernetes/general/runs_with_UID_le_10000_test.rego diff --git a/rules/kubernetes/policies/general/runs_with_a_root_primary_or_supplementary_GID.rego b/checks/kubernetes/general/runs_with_a_root_primary_or_supplementary_GID.rego similarity index 100% rename from rules/kubernetes/policies/general/runs_with_a_root_primary_or_supplementary_GID.rego rename to checks/kubernetes/general/runs_with_a_root_primary_or_supplementary_GID.rego diff --git a/rules/kubernetes/policies/general/runs_with_a_root_primary_or_supplementary_GID_test.rego b/checks/kubernetes/general/runs_with_a_root_primary_or_supplementary_GID_test.rego similarity index 100% rename from rules/kubernetes/policies/general/runs_with_a_root_primary_or_supplementary_GID_test.rego rename to checks/kubernetes/general/runs_with_a_root_primary_or_supplementary_GID_test.rego diff --git a/rules/kubernetes/policies/general/tiller_is_deployed.rego b/checks/kubernetes/general/tiller_is_deployed.rego similarity index 100% rename from rules/kubernetes/policies/general/tiller_is_deployed.rego rename to checks/kubernetes/general/tiller_is_deployed.rego diff --git a/rules/kubernetes/policies/general/tiller_is_deployed_test.rego b/checks/kubernetes/general/tiller_is_deployed_test.rego similarity index 100% rename from rules/kubernetes/policies/general/tiller_is_deployed_test.rego rename to checks/kubernetes/general/tiller_is_deployed_test.rego diff --git a/rules/kubernetes/policies/general/uses_image_tag_latest.rego b/checks/kubernetes/general/uses_image_tag_latest.rego similarity index 100% rename from rules/kubernetes/policies/general/uses_image_tag_latest.rego rename to checks/kubernetes/general/uses_image_tag_latest.rego diff --git a/rules/kubernetes/policies/general/uses_image_tag_latest_test.rego b/checks/kubernetes/general/uses_image_tag_latest_test.rego similarity index 100% rename from rules/kubernetes/policies/general/uses_image_tag_latest_test.rego rename to checks/kubernetes/general/uses_image_tag_latest_test.rego diff --git a/rules/kubernetes/network/no_public_egress.go b/checks/kubernetes/network/no_public_egress.go similarity index 94% rename from rules/kubernetes/network/no_public_egress.go rename to checks/kubernetes/network/no_public_egress.go index d604dc6e..e304b9f4 100755 --- a/rules/kubernetes/network/no_public_egress.go +++ b/checks/kubernetes/network/no_public_egress.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/trivy-policies/internal/cidr" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicEgress = rules.Register( +var CheckNoPublicEgress = checks.Register( scan.Rule{ AVDID: "AVD-KUBE-0002", Provider: providers.KubernetesProvider, diff --git a/rules/kubernetes/network/no_public_egress.tf.go b/checks/kubernetes/network/no_public_egress.tf.go similarity index 100% rename from rules/kubernetes/network/no_public_egress.tf.go rename to checks/kubernetes/network/no_public_egress.tf.go diff --git a/rules/kubernetes/network/no_public_egress_test.go b/checks/kubernetes/network/no_public_egress_test.go similarity index 100% rename from rules/kubernetes/network/no_public_egress_test.go rename to checks/kubernetes/network/no_public_egress_test.go diff --git a/rules/kubernetes/network/no_public_ingress.go b/checks/kubernetes/network/no_public_ingress.go similarity index 94% rename from rules/kubernetes/network/no_public_ingress.go rename to checks/kubernetes/network/no_public_ingress.go index 41dd8b89..957c82ec 100755 --- a/rules/kubernetes/network/no_public_ingress.go +++ b/checks/kubernetes/network/no_public_ingress.go @@ -6,10 +6,10 @@ import ( "github.com/aquasecurity/defsec/pkg/severity" "github.com/aquasecurity/defsec/pkg/state" "github.com/aquasecurity/trivy-policies/internal/cidr" - "github.com/aquasecurity/trivy-policies/pkg/rules" + "github.com/aquasecurity/trivy-policies/pkg/checks" ) -var CheckNoPublicIngress = rules.Register( +var CheckNoPublicIngress = checks.Register( scan.Rule{ AVDID: "AVD-KUBE-0001", Provider: providers.KubernetesProvider, diff --git a/rules/kubernetes/network/no_public_ingress.tf.go b/checks/kubernetes/network/no_public_ingress.tf.go similarity index 100% rename from rules/kubernetes/network/no_public_ingress.tf.go rename to checks/kubernetes/network/no_public_ingress.tf.go diff --git a/rules/kubernetes/network/no_public_ingress_test.go b/checks/kubernetes/network/no_public_ingress_test.go similarity index 100% rename from rules/kubernetes/network/no_public_ingress_test.go rename to checks/kubernetes/network/no_public_ingress_test.go diff --git a/rules/kubernetes/policies/pss/baseline/10_windows_host_process.rego b/checks/kubernetes/pss/baseline/10_windows_host_process.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/10_windows_host_process.rego rename to checks/kubernetes/pss/baseline/10_windows_host_process.rego diff --git a/rules/kubernetes/policies/pss/baseline/10_windows_host_process_test.rego b/checks/kubernetes/pss/baseline/10_windows_host_process_test.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/10_windows_host_process_test.rego rename to checks/kubernetes/pss/baseline/10_windows_host_process_test.rego diff --git a/rules/kubernetes/policies/pss/baseline/11_seccomp_profile_unconfined.rego b/checks/kubernetes/pss/baseline/11_seccomp_profile_unconfined.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/11_seccomp_profile_unconfined.rego rename to checks/kubernetes/pss/baseline/11_seccomp_profile_unconfined.rego diff --git a/rules/kubernetes/policies/pss/baseline/11_seccomp_profile_unconfined_test.rego b/checks/kubernetes/pss/baseline/11_seccomp_profile_unconfined_test.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/11_seccomp_profile_unconfined_test.rego rename to checks/kubernetes/pss/baseline/11_seccomp_profile_unconfined_test.rego diff --git a/rules/kubernetes/policies/pss/baseline/12_privileged_ports_binding.rego b/checks/kubernetes/pss/baseline/12_privileged_ports_binding.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/12_privileged_ports_binding.rego rename to checks/kubernetes/pss/baseline/12_privileged_ports_binding.rego diff --git a/rules/kubernetes/policies/pss/baseline/12_privileged_ports_binding_test.rego b/checks/kubernetes/pss/baseline/12_privileged_ports_binding_test.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/12_privileged_ports_binding_test.rego rename to checks/kubernetes/pss/baseline/12_privileged_ports_binding_test.rego diff --git a/rules/kubernetes/policies/pss/baseline/1_host_ipc.rego b/checks/kubernetes/pss/baseline/1_host_ipc.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/1_host_ipc.rego rename to checks/kubernetes/pss/baseline/1_host_ipc.rego diff --git a/rules/kubernetes/policies/pss/baseline/1_host_ipc_test.rego b/checks/kubernetes/pss/baseline/1_host_ipc_test.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/1_host_ipc_test.rego rename to checks/kubernetes/pss/baseline/1_host_ipc_test.rego diff --git a/rules/kubernetes/policies/pss/baseline/1_host_network.rego b/checks/kubernetes/pss/baseline/1_host_network.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/1_host_network.rego rename to checks/kubernetes/pss/baseline/1_host_network.rego diff --git a/rules/kubernetes/policies/pss/baseline/1_host_network_test.rego b/checks/kubernetes/pss/baseline/1_host_network_test.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/1_host_network_test.rego rename to checks/kubernetes/pss/baseline/1_host_network_test.rego diff --git a/rules/kubernetes/policies/pss/baseline/1_host_pid.rego b/checks/kubernetes/pss/baseline/1_host_pid.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/1_host_pid.rego rename to checks/kubernetes/pss/baseline/1_host_pid.rego diff --git a/rules/kubernetes/policies/pss/baseline/1_host_pid_test.rego b/checks/kubernetes/pss/baseline/1_host_pid_test.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/1_host_pid_test.rego rename to checks/kubernetes/pss/baseline/1_host_pid_test.rego diff --git a/rules/kubernetes/policies/pss/baseline/2_privileged.rego b/checks/kubernetes/pss/baseline/2_privileged.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/2_privileged.rego rename to checks/kubernetes/pss/baseline/2_privileged.rego diff --git a/rules/kubernetes/policies/pss/baseline/2_privileged_test.rego b/checks/kubernetes/pss/baseline/2_privileged_test.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/2_privileged_test.rego rename to checks/kubernetes/pss/baseline/2_privileged_test.rego diff --git a/rules/kubernetes/policies/pss/baseline/3_specific_capabilities_added.rego b/checks/kubernetes/pss/baseline/3_specific_capabilities_added.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/3_specific_capabilities_added.rego rename to checks/kubernetes/pss/baseline/3_specific_capabilities_added.rego diff --git a/rules/kubernetes/policies/pss/baseline/3_specific_capabilities_added_test.rego b/checks/kubernetes/pss/baseline/3_specific_capabilities_added_test.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/3_specific_capabilities_added_test.rego rename to checks/kubernetes/pss/baseline/3_specific_capabilities_added_test.rego diff --git a/rules/kubernetes/policies/pss/baseline/4_hostpath_volumes_mounted.rego b/checks/kubernetes/pss/baseline/4_hostpath_volumes_mounted.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/4_hostpath_volumes_mounted.rego rename to checks/kubernetes/pss/baseline/4_hostpath_volumes_mounted.rego diff --git a/rules/kubernetes/policies/pss/baseline/4_hostpath_volumes_mounted_test.rego b/checks/kubernetes/pss/baseline/4_hostpath_volumes_mounted_test.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/4_hostpath_volumes_mounted_test.rego rename to checks/kubernetes/pss/baseline/4_hostpath_volumes_mounted_test.rego diff --git a/rules/kubernetes/policies/pss/baseline/5_access_to_host_ports.rego b/checks/kubernetes/pss/baseline/5_access_to_host_ports.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/5_access_to_host_ports.rego rename to checks/kubernetes/pss/baseline/5_access_to_host_ports.rego diff --git a/rules/kubernetes/policies/pss/baseline/5_access_to_host_ports_test.rego b/checks/kubernetes/pss/baseline/5_access_to_host_ports_test.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/5_access_to_host_ports_test.rego rename to checks/kubernetes/pss/baseline/5_access_to_host_ports_test.rego diff --git a/rules/kubernetes/policies/pss/baseline/6_apparmor_policy_disabled.rego b/checks/kubernetes/pss/baseline/6_apparmor_policy_disabled.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/6_apparmor_policy_disabled.rego rename to checks/kubernetes/pss/baseline/6_apparmor_policy_disabled.rego diff --git a/rules/kubernetes/policies/pss/baseline/6_apparmor_policy_disabled_test.rego b/checks/kubernetes/pss/baseline/6_apparmor_policy_disabled_test.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/6_apparmor_policy_disabled_test.rego rename to checks/kubernetes/pss/baseline/6_apparmor_policy_disabled_test.rego diff --git a/rules/kubernetes/policies/pss/baseline/7_selinux_custom_options_set.rego b/checks/kubernetes/pss/baseline/7_selinux_custom_options_set.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/7_selinux_custom_options_set.rego rename to checks/kubernetes/pss/baseline/7_selinux_custom_options_set.rego diff --git a/rules/kubernetes/policies/pss/baseline/7_selinux_custom_options_set_test.rego b/checks/kubernetes/pss/baseline/7_selinux_custom_options_set_test.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/7_selinux_custom_options_set_test.rego rename to checks/kubernetes/pss/baseline/7_selinux_custom_options_set_test.rego diff --git a/rules/kubernetes/policies/pss/baseline/8_non_default_proc_masks_set.rego b/checks/kubernetes/pss/baseline/8_non_default_proc_masks_set.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/8_non_default_proc_masks_set.rego rename to checks/kubernetes/pss/baseline/8_non_default_proc_masks_set.rego diff --git a/rules/kubernetes/policies/pss/baseline/8_non_default_proc_masks_set_test.rego b/checks/kubernetes/pss/baseline/8_non_default_proc_masks_set_test.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/8_non_default_proc_masks_set_test.rego rename to checks/kubernetes/pss/baseline/8_non_default_proc_masks_set_test.rego diff --git a/rules/kubernetes/policies/pss/baseline/9_unsafe_sysctl_options_set.rego b/checks/kubernetes/pss/baseline/9_unsafe_sysctl_options_set.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/9_unsafe_sysctl_options_set.rego rename to checks/kubernetes/pss/baseline/9_unsafe_sysctl_options_set.rego diff --git a/rules/kubernetes/policies/pss/baseline/9_unsafe_sysctl_options_set_test.rego b/checks/kubernetes/pss/baseline/9_unsafe_sysctl_options_set_test.rego similarity index 100% rename from rules/kubernetes/policies/pss/baseline/9_unsafe_sysctl_options_set_test.rego rename to checks/kubernetes/pss/baseline/9_unsafe_sysctl_options_set_test.rego diff --git a/rules/kubernetes/policies/pss/restricted/1_non_core_volume_types.rego b/checks/kubernetes/pss/restricted/1_non_core_volume_types.rego similarity index 100% rename from rules/kubernetes/policies/pss/restricted/1_non_core_volume_types.rego rename to checks/kubernetes/pss/restricted/1_non_core_volume_types.rego diff --git a/rules/kubernetes/policies/pss/restricted/1_non_core_volume_types_test.rego b/checks/kubernetes/pss/restricted/1_non_core_volume_types_test.rego similarity index 100% rename from rules/kubernetes/policies/pss/restricted/1_non_core_volume_types_test.rego rename to checks/kubernetes/pss/restricted/1_non_core_volume_types_test.rego diff --git a/rules/kubernetes/policies/pss/restricted/2_can_elevate_its_own_privileges.rego b/checks/kubernetes/pss/restricted/2_can_elevate_its_own_privileges.rego similarity index 100% rename from rules/kubernetes/policies/pss/restricted/2_can_elevate_its_own_privileges.rego rename to checks/kubernetes/pss/restricted/2_can_elevate_its_own_privileges.rego diff --git a/rules/kubernetes/policies/pss/restricted/2_can_elevate_its_own_privileges_test.rego b/checks/kubernetes/pss/restricted/2_can_elevate_its_own_privileges_test.rego similarity index 100% rename from rules/kubernetes/policies/pss/restricted/2_can_elevate_its_own_privileges_test.rego rename to checks/kubernetes/pss/restricted/2_can_elevate_its_own_privileges_test.rego diff --git a/rules/kubernetes/policies/pss/restricted/3_runs_as_root.rego b/checks/kubernetes/pss/restricted/3_runs_as_root.rego similarity index 100% rename from rules/kubernetes/policies/pss/restricted/3_runs_as_root.rego rename to checks/kubernetes/pss/restricted/3_runs_as_root.rego diff --git a/rules/kubernetes/policies/pss/restricted/3_runs_as_root_test.rego b/checks/kubernetes/pss/restricted/3_runs_as_root_test.rego similarity index 100% rename from rules/kubernetes/policies/pss/restricted/3_runs_as_root_test.rego rename to checks/kubernetes/pss/restricted/3_runs_as_root_test.rego diff --git a/rules/kubernetes/policies/pss/restricted/4_runs_with_a_root_uid.rego b/checks/kubernetes/pss/restricted/4_runs_with_a_root_uid.rego similarity index 100% rename from rules/kubernetes/policies/pss/restricted/4_runs_with_a_root_uid.rego rename to checks/kubernetes/pss/restricted/4_runs_with_a_root_uid.rego diff --git a/rules/kubernetes/policies/pss/restricted/4_runs_with_a_root_uid_test.rego b/checks/kubernetes/pss/restricted/4_runs_with_a_root_uid_test.rego similarity index 100% rename from rules/kubernetes/policies/pss/restricted/4_runs_with_a_root_uid_test.rego rename to checks/kubernetes/pss/restricted/4_runs_with_a_root_uid_test.rego diff --git a/rules/kubernetes/policies/pss/restricted/5_runtime_default_seccomp_profile_not_set.rego b/checks/kubernetes/pss/restricted/5_runtime_default_seccomp_profile_not_set.rego similarity index 100% rename from rules/kubernetes/policies/pss/restricted/5_runtime_default_seccomp_profile_not_set.rego rename to checks/kubernetes/pss/restricted/5_runtime_default_seccomp_profile_not_set.rego diff --git a/rules/kubernetes/policies/pss/restricted/5_runtime_default_seccomp_profile_not_set_test.rego b/checks/kubernetes/pss/restricted/5_runtime_default_seccomp_profile_not_set_test.rego similarity index 100% rename from rules/kubernetes/policies/pss/restricted/5_runtime_default_seccomp_profile_not_set_test.rego rename to checks/kubernetes/pss/restricted/5_runtime_default_seccomp_profile_not_set_test.rego diff --git a/rules/kubernetes/policies/pss/restricted/6_drop_all_capabilities_only_add_net_bind_service.rego b/checks/kubernetes/pss/restricted/6_drop_all_capabilities_only_add_net_bind_service.rego similarity index 100% rename from rules/kubernetes/policies/pss/restricted/6_drop_all_capabilities_only_add_net_bind_service.rego rename to checks/kubernetes/pss/restricted/6_drop_all_capabilities_only_add_net_bind_service.rego diff --git a/rules/kubernetes/policies/pss/restricted/6_drop_all_capabilities_only_add_net_bind_service_test.rego b/checks/kubernetes/pss/restricted/6_drop_all_capabilities_only_add_net_bind_service_test.rego similarity index 100% rename from rules/kubernetes/policies/pss/restricted/6_drop_all_capabilities_only_add_net_bind_service_test.rego rename to checks/kubernetes/pss/restricted/6_drop_all_capabilities_only_add_net_bind_service_test.rego diff --git a/rules/kubernetes/policies/pss/restricted/7_Kubernetes_resource_with_disallowed_volumes_mounted.rego b/checks/kubernetes/pss/restricted/7_Kubernetes_resource_with_disallowed_volumes_mounted.rego similarity index 100% rename from rules/kubernetes/policies/pss/restricted/7_Kubernetes_resource_with_disallowed_volumes_mounted.rego rename to checks/kubernetes/pss/restricted/7_Kubernetes_resource_with_disallowed_volumes_mounted.rego diff --git a/rules/kubernetes/policies/pss/restricted/7_Kubernetes_resource_with_disallowed_volumes_mounted_test.rego b/checks/kubernetes/pss/restricted/7_Kubernetes_resource_with_disallowed_volumes_mounted_test.rego similarity index 100% rename from rules/kubernetes/policies/pss/restricted/7_Kubernetes_resource_with_disallowed_volumes_mounted_test.rego rename to checks/kubernetes/pss/restricted/7_Kubernetes_resource_with_disallowed_volumes_mounted_test.rego diff --git a/rules/kubernetes/policies/rolebinding/cluster_admin_role_is_only_used_where_required.rego b/checks/kubernetes/rolebinding/cluster_admin_role_is_only_used_where_required.rego similarity index 100% rename from rules/kubernetes/policies/rolebinding/cluster_admin_role_is_only_used_where_required.rego rename to checks/kubernetes/rolebinding/cluster_admin_role_is_only_used_where_required.rego diff --git a/rules/kubernetes/policies/rolebinding/cluster_admin_role_is_only_used_where_required_test.rego b/checks/kubernetes/rolebinding/cluster_admin_role_is_only_used_where_required_test.rego similarity index 100% rename from rules/kubernetes/policies/rolebinding/cluster_admin_role_is_only_used_where_required_test.rego rename to checks/kubernetes/rolebinding/cluster_admin_role_is_only_used_where_required_test.rego diff --git a/rules/specs/compliance/aws-cis-1.2.yaml b/checks/specs/compliance/aws-cis-1.2.yaml similarity index 100% rename from rules/specs/compliance/aws-cis-1.2.yaml rename to checks/specs/compliance/aws-cis-1.2.yaml diff --git a/rules/specs/compliance/aws-cis-1.4.yaml b/checks/specs/compliance/aws-cis-1.4.yaml similarity index 100% rename from rules/specs/compliance/aws-cis-1.4.yaml rename to checks/specs/compliance/aws-cis-1.4.yaml diff --git a/rules/specs/compliance/docker-cis.yaml b/checks/specs/compliance/docker-cis.yaml similarity index 100% rename from rules/specs/compliance/docker-cis.yaml rename to checks/specs/compliance/docker-cis.yaml diff --git a/rules/specs/compliance/k8s-cis-1.23.yaml b/checks/specs/compliance/k8s-cis-1.23.yaml similarity index 100% rename from rules/specs/compliance/k8s-cis-1.23.yaml rename to checks/specs/compliance/k8s-cis-1.23.yaml diff --git a/rules/specs/compliance/k8s-nsa-1.0.yaml b/checks/specs/compliance/k8s-nsa-1.0.yaml similarity index 100% rename from rules/specs/compliance/k8s-nsa-1.0.yaml rename to checks/specs/compliance/k8s-nsa-1.0.yaml diff --git a/rules/specs/compliance/k8s-pss-baseline.yaml b/checks/specs/compliance/k8s-pss-baseline.yaml similarity index 100% rename from rules/specs/compliance/k8s-pss-baseline.yaml rename to checks/specs/compliance/k8s-pss-baseline.yaml diff --git a/rules/specs/compliance/k8s-pss-restricted.yaml b/checks/specs/compliance/k8s-pss-restricted.yaml similarity index 100% rename from rules/specs/compliance/k8s-pss-restricted.yaml rename to checks/specs/compliance/k8s-pss-restricted.yaml diff --git a/rules/specs/loader.go b/checks/specs/loader.go similarity index 100% rename from rules/specs/loader.go rename to checks/specs/loader.go diff --git a/rules/specs/loader_test.go b/checks/specs/loader_test.go similarity index 100% rename from rules/specs/loader_test.go rename to checks/specs/loader_test.go diff --git a/embed.go b/embed.go new file mode 100644 index 00000000..3dbd6c37 --- /dev/null +++ b/embed.go @@ -0,0 +1,11 @@ +package trivy_policies + +import ( + "embed" +) + +//go:embed checks/* +var EmbeddedChecksFileSystem embed.FS + +//go:embed lib/* +var EmbeddedLibraryFileSystem embed.FS diff --git a/rules/embed_test.go b/embed_test.go similarity index 82% rename from rules/embed_test.go rename to embed_test.go index 462d028c..0219e62e 100644 --- a/rules/embed_test.go +++ b/embed_test.go @@ -1,4 +1,4 @@ -package rules +package trivy_policies import ( "testing" @@ -8,7 +8,7 @@ import ( ) func Test_EmbeddingPolicies(t *testing.T) { - entries, err := EmbeddedPolicyFileSystem.ReadDir(".") + entries, err := EmbeddedChecksFileSystem.ReadDir(".") require.NoError(t, err) assert.Greater(t, len(entries), 0) } diff --git a/go.mod b/go.mod index 76416050..eb149f4d 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,6 @@ require ( github.com/aquasecurity/defsec v0.93.2-0.20231121210951-9b3cc255faff github.com/docker/docker v24.0.7+incompatible github.com/liamg/iamgo v0.0.9 - github.com/liamg/memoryfs v1.6.0 github.com/owenrumney/squealer v1.2.1 github.com/stretchr/testify v1.8.4 github.com/testcontainers/testcontainers-go v0.26.0 @@ -18,17 +17,13 @@ require ( github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Microsoft/hcsshim v0.11.1 // indirect - github.com/OneOfOne/xxhash v1.2.8 // indirect github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95 // indirect github.com/acomagu/bufpipe v1.0.4 // indirect github.com/agext/levenshtein v1.2.3 // indirect - github.com/agnivade/levenshtein v1.1.1 // indirect github.com/alecthomas/chroma v0.10.0 // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect - github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cloudflare/circl v1.3.3 // indirect github.com/containerd/containerd v1.7.7 // indirect github.com/containerd/log v0.1.0 // indirect @@ -42,16 +37,12 @@ require ( github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.4.1 // indirect github.com/go-git/go-git/v5 v5.8.1 // indirect - github.com/go-ini/ini v1.67.0 // indirect - github.com/go-logr/logr v1.2.4 // indirect - github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect - github.com/gobwas/glob v0.2.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/uuid v1.3.1 // indirect - github.com/gorilla/mux v1.8.0 // indirect github.com/hashicorp/hcl/v2 v2.18.1 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect @@ -59,14 +50,11 @@ require ( github.com/liamg/jfather v0.0.7 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/magiconair/properties v1.8.7 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect github.com/moby/term v0.5.0 // indirect github.com/morikuni/aec v1.0.0 // indirect - github.com/open-policy-agent/opa v0.58.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc5 // indirect github.com/opencontainers/runc v1.1.5 // indirect @@ -74,33 +62,22 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/prometheus/client_golang v1.16.0 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect - github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect + github.com/rogpeppe/go-internal v1.10.0 // indirect github.com/sergi/go-diff v1.2.0 // indirect github.com/shirou/gopsutil/v3 v3.23.9 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/skeema/knownhosts v1.2.0 // indirect - github.com/tchap/go-patricia/v2 v2.3.1 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect - github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect - github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect - github.com/yashtewari/glob-intersection v0.2.0 // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect github.com/zclconf/go-cty v1.13.0 // indirect - go.opentelemetry.io/otel v1.19.0 // indirect - go.opentelemetry.io/otel/metric v1.19.0 // indirect - go.opentelemetry.io/otel/sdk v1.19.0 // indirect - go.opentelemetry.io/otel/trace v1.19.0 // indirect golang.org/x/crypto v0.14.0 // indirect golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect golang.org/x/mod v0.13.0 // indirect golang.org/x/net v0.17.0 // indirect + golang.org/x/sync v0.4.0 // indirect golang.org/x/sys v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/tools v0.13.0 // indirect @@ -109,5 +86,4 @@ require ( google.golang.org/protobuf v1.31.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/go.sum b/go.sum index 68a03455..7a9cb0d8 100644 --- a/go.sum +++ b/go.sum @@ -9,16 +9,12 @@ github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migc github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Microsoft/hcsshim v0.11.1 h1:hJ3s7GbWlGK4YVV92sO88BQSyF4ZLVy7/awqOlPxFbA= github.com/Microsoft/hcsshim v0.11.1/go.mod h1:nFJmaO4Zr5Y7eADdFOpYswDDlNVbvcIJJNJLECr5JQg= -github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8= -github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95 h1:KLq8BE0KwCL+mmXnjLWEAOYO+2l2AE4YMmqG1ZpZHBs= github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= -github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= -github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek= github.com/alecthomas/chroma v0.10.0/go.mod h1:jtJATyUxlIORhUOFNA9NZDWGAQ8wpxQQqNSB4rjA/1s= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= @@ -28,18 +24,10 @@ github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= github.com/aquasecurity/defsec v0.93.2-0.20231121210951-9b3cc255faff h1:P9ISna6RaiMyoxDcROR4v68/OGnnrGC1AE60l/c6Y8M= github.com/aquasecurity/defsec v0.93.2-0.20231121210951-9b3cc255faff/go.mod h1:djPPxDAf6seSulvNiZn7jelIddA9wdWRvfWarso3U3c= -github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q= -github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= -github.com/bytecodealliance/wasmtime-go/v3 v3.0.2 h1:3uZCA/BLTIu+DqCfguByNMJa2HVHpXvjfy0Dy7g6fuA= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= @@ -59,10 +47,6 @@ github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxG github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgraph-io/badger/v3 v3.2103.5 h1:ylPa6qzbjYRQMU6jokoj4wzcaweHylt//CH0AKt0akg= -github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= -github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g= -github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E= github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= @@ -74,13 +58,9 @@ github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5Xh github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819 h1:RIB4cRk+lBqKK3Oy0r2gRX4ui7tuhiZq2SuTtTCi0/0= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= -github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= -github.com/foxcpp/go-mockdns v1.0.0 h1:7jBqxd3WDWwi/6WhDvacvH1XsN3rOLXyHM1uhvIx6FI= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= @@ -90,41 +70,26 @@ github.com/go-git/go-billy/v5 v5.4.1/go.mod h1:vjbugF6Fz7JIflbVpl1hJsGjSHNltrSw4 github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20230305113008-0c11038e723f h1:Pz0DHeFij3XFhoBRGUDPzSJ+w2UcK5/0JvF8DRI58r8= github.com/go-git/go-git/v5 v5.8.1 h1:Zo79E4p7TRk0xoRgMq0RShiTHGKcKI4+DI6BfJc/Q+A= github.com/go-git/go-git/v5 v5.8.1/go.mod h1:FHFuoD6yGz5OSKEBK+aWN9Oah0q54Jxl0abmj6GnqAo= -github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A= -github.com/go-ini/ini v1.67.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= -github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= -github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/google/flatbuffers v1.12.1 h1:MVlul7pQNoDzWRLTw5imwYsl+usrS1TXG2H4jg6ImGw= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= github.com/hashicorp/hcl/v2 v2.18.1 h1:6nxnOJFku1EuSawSD81fuviYUV8DxFr3fp2dUi3ZYSo= github.com/hashicorp/hcl/v2 v2.18.1/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= @@ -148,20 +113,14 @@ github.com/liamg/iamgo v0.0.9/go.mod h1:Kk6ZxBF/GQqG9nnaUjIi6jf+WXNpeOTyhwc6gngu github.com/liamg/jfather v0.0.7 h1:Xf78zS263yfT+xr2VSo6+kyAy4ROlCacRqJG7s5jt4k= github.com/liamg/jfather v0.0.7/go.mod h1:xXBGiBoiZ6tmHhfy5Jzw8sugzajwYdi6VosIpB3/cPM= github.com/liamg/memoryfs v1.6.0 h1:jAFec2HI1PgMTem5gR7UT8zi9u4BfG5jorCRlLH06W8= -github.com/liamg/memoryfs v1.6.0/go.mod h1:z7mfqXFQS8eSeBBsFjYLlxYRMRyiPktytvYCYTb3BSk= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A= github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/miekg/dns v1.1.43 h1:JKfpVSCB84vrAmHzyrsxB5NAr5kLoMXZArPSw7Qlgyg= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= @@ -173,8 +132,6 @@ github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/open-policy-agent/opa v0.58.0 h1:S5qvevW8JoFizU7Hp66R/Y1SOXol0aCdFYVkzIqIpUo= -github.com/open-policy-agent/opa v0.58.0/go.mod h1:EGWBwvmyt50YURNvL8X4W5hXdlKeNhAHn3QXsetmYcc= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= @@ -193,17 +150,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= -github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= @@ -232,8 +180,6 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/tchap/go-patricia/v2 v2.3.1 h1:6rQp39lgIYZ+MHmdEq4xzuk1t7OdC35z/xm0BGhTkes= -github.com/tchap/go-patricia/v2 v2.3.1/go.mod h1:VZRHKAb53DLaG+nA9EaYYiaEx6YztwDlLElMsnSHD4k= github.com/testcontainers/testcontainers-go v0.26.0 h1:uqcYdoOHBy1ca7gKODfBd9uTHVK3a7UL848z09MVZ0c= github.com/testcontainers/testcontainers-go v0.26.0/go.mod h1:ICriE9bLX5CLxL9OFQ2N+2N+f+803LNJ1utJb1+Inx0= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= @@ -245,12 +191,6 @@ github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYp github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= -github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= -github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/yashtewari/glob-intersection v0.2.0 h1:8iuHdN88yYuCzCdjt0gDe+6bAhUwBeEWqThExu54RFg= -github.com/yashtewari/glob-intersection v0.2.0/go.mod h1:LK7pIC3piUjovexikBbJ26Yml7g8xa5bsjfx2v1fwok= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= @@ -258,19 +198,6 @@ github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFi github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zclconf/go-cty v1.13.0 h1:It5dfKTTZHe9aeppbNOda3mN7Ag7sg6QkBNm6TkyFa0= github.com/zclconf/go-cty v1.13.0/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 h1:x8Z78aZx8cOF0+Kkazoc7lwUNMGy0LrzEMxTm4BbTxg= -go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= -go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 h1:3d+S281UTjM+AbF31XSOYn1qXn3BgIdWl8HNEpx08Jk= -go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= -go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= -go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= -go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= -go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= -go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= -go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -301,13 +228,13 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= +golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -364,8 +291,6 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d h1:VBu5YqKPv6XiJ199exd8Br+Aetz+o08F+PLMnwJQHAY= -google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d h1:DoPTO70H+bcDXcd39vOqb2viZxgqeBeSGtZ55yZU4/Q= google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= @@ -389,5 +314,3 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= -sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= -sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/rules/docker/lib/docker.rego b/lib/docker/docker.rego similarity index 100% rename from rules/docker/lib/docker.rego rename to lib/docker/docker.rego diff --git a/rules/kubernetes/lib/kubernetes.rego b/lib/kubernetes/kubernetes.rego similarity index 100% rename from rules/kubernetes/lib/kubernetes.rego rename to lib/kubernetes/kubernetes.rego diff --git a/rules/kubernetes/lib/kubernetes_test.rego b/lib/kubernetes/kubernetes_test.rego similarity index 100% rename from rules/kubernetes/lib/kubernetes_test.rego rename to lib/kubernetes/kubernetes_test.rego diff --git a/rules/kubernetes/lib/utils.rego b/lib/kubernetes/utils.rego similarity index 100% rename from rules/kubernetes/lib/utils.rego rename to lib/kubernetes/utils.rego diff --git a/pkg/rules/rules.go b/pkg/checks/checks.go similarity index 94% rename from pkg/rules/rules.go rename to pkg/checks/checks.go index dd6b9a5f..189c8e87 100644 --- a/pkg/rules/rules.go +++ b/pkg/checks/checks.go @@ -1,4 +1,4 @@ -package rules +package checks import ( "github.com/aquasecurity/defsec/pkg/scan" diff --git a/pkg/spec/spec.go b/pkg/spec/spec.go index da5830f2..1b94afc4 100644 --- a/pkg/spec/spec.go +++ b/pkg/spec/spec.go @@ -1,7 +1,7 @@ package spec import ( - "github.com/aquasecurity/trivy-policies/rules/specs" + "github.com/aquasecurity/trivy-policies/checks/specs" ) // Loader access compliance specs diff --git a/rules/docker/policies/README.md b/rules/docker/policies/README.md deleted file mode 100644 index 4d9a95dc..00000000 --- a/rules/docker/policies/README.md +++ /dev/null @@ -1 +0,0 @@ -Collection of docker policies diff --git a/rules/embed.go b/rules/embed.go deleted file mode 100644 index bf457bcb..00000000 --- a/rules/embed.go +++ /dev/null @@ -1,11 +0,0 @@ -package rules - -import ( - "embed" -) - -//go:embed */policies -var EmbeddedPolicyFileSystem embed.FS - -//go:embed */lib -var EmbeddedLibraryFileSystem embed.FS diff --git a/test/bundle_test.go b/test/bundle_test.go deleted file mode 100644 index 0adfcb85..00000000 --- a/test/bundle_test.go +++ /dev/null @@ -1,117 +0,0 @@ -package test - -import ( - "archive/tar" - "bytes" - "compress/gzip" - "encoding/json" - "errors" - "io" - "os" - "os/exec" - "runtime" - "testing" - - "github.com/stretchr/testify/assert" - - "github.com/liamg/memoryfs" - - "github.com/stretchr/testify/require" -) - -type manifest struct { - Revision string `json:"revision"` - Roots []string `json:"roots"` -} - -func Test_ManifestValidity(t *testing.T) { - if runtime.GOOS == "windows" { - t.Skip("Skipping on windows as it doesn't build a bundle on Windows anyway") - } - - _ = os.RemoveAll("../bundle") - _ = os.Remove("../bundle.tar.gz") - defer func() { - _ = os.RemoveAll("../bundle") - _ = os.Remove("../bundle.tar.gz") - }() - - f, err := os.Open("../rules/.manifest") - require.NoError(t, err) - - var m manifest - require.NoError(t, json.NewDecoder(f).Decode(&m)) - - require.Equal(t, "[GITHUB_SHA]", m.Revision) - require.Len(t, m.Roots, 1) - require.Equal(t, "", m.Roots[0]) - - cmd := exec.Command("scripts/bundle.sh") - cmd.Env = append(os.Environ(), "GITHUB_REF=refs/tags/v1.2.3") - cmd.Dir = ".." - require.NoError(t, cmd.Run()) - - archive, err := os.Open("../bundle.tar.gz") - require.NoError(t, err) - - gz, err := gzip.NewReader(archive) - require.NoError(t, err) - - tarReader := tar.NewReader(gz) - - mfs := memoryfs.New() - - for { - header, err := tarReader.Next() - if errors.Is(err, io.EOF) { - break - } - require.NoError(t, err) - - switch header.Typeflag { - case tar.TypeDir: - require.NoError(t, mfs.MkdirAll(header.Name, 0755)) - case tar.TypeReg: - buffer := bytes.NewBuffer([]byte{}) - _, err = io.CopyN(buffer, tarReader, header.Size) - require.NoError(t, err) - require.NoError(t, mfs.WriteFile(header.Name, buffer.Bytes(), 0644)) - default: - t.Fatalf("unknown type in %s: 0x%X", header.Name, header.Typeflag) - } - } - - mf, err := mfs.Open(".manifest") - require.NoError(t, err) - - var m2 manifest - require.NoError(t, json.NewDecoder(mf).Decode(&m2)) - assert.Equal(t, "1.2.3", m2.Revision) - assert.Len(t, m2.Roots, 1) - assert.Equal(t, "", m2.Roots[0]) - - policies, err := mfs.ReadDir("./policies") - require.NoError(t, err) - - entries, err := os.ReadDir("../rules") - require.NoError(t, err) - - var expectedDirs []string - for _, entry := range entries { - if entry.IsDir() { - expectedDirs = append(expectedDirs, entry.Name()) - } - } - - for _, expected := range expectedDirs { - var found bool - for _, policyDir := range policies { - if policyDir.Name() == expected { - found = true - break - } - } - assert.True(t, found, "expected to find policy dir for %s", expected) - } - -} diff --git a/test/docker_test.go b/test/docker_test.go deleted file mode 100644 index d5896eee..00000000 --- a/test/docker_test.go +++ /dev/null @@ -1,126 +0,0 @@ -package test - -// TODO: bring this test back -//func addFilesToMemFS(memfs *memoryfs.FS, typePolicy bool, folderName string) error { -// base := filepath.Base(folderName) -// if err := memfs.MkdirAll(base, 0o700); err != nil { -// return err -// } -// err := filepath.Walk(filepath.FromSlash(folderName), -// func(fpath string, info os.FileInfo, err error) error { -// if err != nil { -// return err -// } -// if info.IsDir() { -// return nil -// } -// if typePolicy && !rego.IsRegoFile(info.Name()) { -// return nil -// } -// data, err := os.ReadFile(fpath) -// if err != nil { -// return err -// } -// fileName := getFileName(fpath, info, typePolicy) -// if err := memfs.WriteFile(path.Join(base, fileName), data, 0o644); err != nil { -// return err -// } -// return nil -// }) -// -// if err != nil { -// return err -// } -// return nil -//} - -// TODO: bring this test back -//func Test_Docker_RegoPoliciesFromDisk(t *testing.T) { -// t.Parallel() -// -// entries, err := os.ReadDir("./testdata/dockerfile") -// require.NoError(t, err) -// -// policiesPath, err := filepath.Abs("../rules") -// require.NoError(t, err) -// scanner := dockerfile.NewScanner( -// options.ScannerWithPolicyDirs(filepath.Base(policiesPath)), -// ) -// memfs := memoryfs.New() -// // add policies -// err = addFilesToMemFS(memfs, true, policiesPath) -// require.NoError(t, err) -// -// // add test data -// testDataPath, err := filepath.Abs("./testdata/dockerfile") -// require.NoError(t, err) -// err = addFilesToMemFS(memfs, false, testDataPath) -// require.NoError(t, err) -// -// results, err := scanner.ScanFS(context.TODO(), memfs, filepath.Base(testDataPath)) -// require.NoError(t, err) -// -// for _, entry := range entries { -// if !entry.IsDir() { -// continue -// } -// t.Run(entry.Name(), func(t *testing.T) { -// require.NoError(t, err) -// t.Run(entry.Name(), func(t *testing.T) { -// var matched int -// for _, result := range results { -// if result.Rule().HasID(entry.Name()) && result.Status() == scan.StatusFailed { -// if result.Description() != "Specify at least 1 USER command in Dockerfile with non-root user as argument" { -// assert.Greater(t, result.Range().GetStartLine(), 0) -// assert.Greater(t, result.Range().GetEndLine(), 0) -// } -// if !strings.HasSuffix(result.Range().GetFilename(), entry.Name()) { -// continue -// } -// matched++ -// } -// } -// assert.Equal(t, 1, matched, "Rule should be matched once") -// }) -// -// }) -// } -//} - -// TODO: bring this test back -//func Test_Docker_RegoPoliciesEmbedded(t *testing.T) { -// t.Parallel() -// -// entries, err := os.ReadDir("./testdata/dockerfile") -// require.NoError(t, err) -// -// scanner := dockerfile.NewScanner(options.ScannerWithEmbeddedPolicies(true), options.ScannerWithEmbeddedLibraries(true)) -// srcFS := os.DirFS("../") -// -// results, err := scanner.ScanFS(context.TODO(), srcFS, "test/testdata/dockerfile") -// require.NoError(t, err) -// -// for _, entry := range entries { -// if !entry.IsDir() { -// continue -// } -// t.Run(entry.Name(), func(t *testing.T) { -// require.NoError(t, err) -// t.Run(entry.Name(), func(t *testing.T) { -// var matched bool -// for _, result := range results { -// if result.Rule().HasID(entry.Name()) && result.Status() == scan.StatusFailed { -// if result.Description() != "Specify at least 1 USER command in Dockerfile with non-root user as argument" { -// assert.Greater(t, result.Range().GetStartLine(), 0) -// assert.Greater(t, result.Range().GetEndLine(), 0) -// } -// assert.Equal(t, fmt.Sprintf("test/testdata/dockerfile/%s/Dockerfile.denied", entry.Name()), result.Range().GetFilename()) -// matched = true -// } -// } -// assert.True(t, matched) -// }) -// -// }) -// } -//} diff --git a/test/rules_test.go b/test/rules_test.go deleted file mode 100644 index a8fc8bbf..00000000 --- a/test/rules_test.go +++ /dev/null @@ -1,46 +0,0 @@ -package test - -import ( - "fmt" - "os" - "path/filepath" - "strings" - "testing" - - "github.com/aquasecurity/defsec/pkg/framework" - "github.com/aquasecurity/defsec/pkg/rules" - "github.com/stretchr/testify/require" -) - -func TestAVDIDs(t *testing.T) { - existing := make(map[string]struct{}) - for _, rule := range rules.GetRegistered(framework.ALL) { - t.Run(rule.LongID(), func(t *testing.T) { - if rule.GetRule().AVDID == "" { - t.Errorf("Rule has no AVD ID: %#v", rule) - return - } - if _, ok := existing[rule.GetRule().AVDID]; ok { - t.Errorf("Rule detected with duplicate AVD ID: %s", rule.GetRule().AVDID) - } - }) - existing[rule.GetRule().AVDID] = struct{}{} - } -} - -func TestRulesAgainstExampleCode(t *testing.T) { - for _, rule := range rules.GetRegistered(framework.ALL) { - testName := fmt.Sprintf("%s/%s", rule.GetRule().AVDID, rule.LongID()) - t.Run(testName, func(t *testing.T) { - rule := rule - t.Parallel() - - t.Run("avd docs", func(t *testing.T) { - provider := strings.ToLower(rule.GetRule().Provider.ConstName()) - service := strings.ToLower(strings.ReplaceAll(rule.GetRule().Service, "-", "")) - _, err := os.Stat(filepath.Join("..", "avd_docs", provider, service, rule.GetRule().AVDID, "docs.md")) - require.NoError(t, err) - }) - }) - } -}