Skip to content

Commit

Permalink
fix(checks): add aliases to Rego checks
Browse files Browse the repository at this point in the history
Signed-off-by: Nikita Pivkin <[email protected]>
  • Loading branch information
nikpivkin authored and simar7 committed Oct 10, 2024
1 parent f7972d6 commit 201dd53
Show file tree
Hide file tree
Showing 32 changed files with 64 additions and 4 deletions.
2 changes: 2 additions & 0 deletions checks/cloud/aws/ec2/add_description_to_security_group.rego
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# custom:
# id: AVD-AWS-0099
# avd_id: AVD-AWS-0099
# aliases:
# - aws-vpc-add-description-to-security-group
# provider: aws
# service: ec2
# severity: LOW
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# custom:
# id: AVD-AWS-0124
# avd_id: AVD-AWS-0124
# aliases:
# - aws-vpc-add-description-to-security-group-rule
# provider: aws
# service: ec2
# severity: LOW
Expand Down
2 changes: 2 additions & 0 deletions checks/cloud/aws/ec2/as_enable_at_rest_encryption.rego
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# custom:
# id: AVD-AWS-0008
# avd_id: AVD-AWS-0008
# aliases:
# - aws-autoscaling-enable-at-rest-encryption
# provider: aws
# service: ec2
# severity: HIGH
Expand Down
2 changes: 2 additions & 0 deletions checks/cloud/aws/ec2/as_enforce_http_token_imds.rego
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# custom:
# id: AVD-AWS-0130
# avd_id: AVD-AWS-0130
# aliases:
# - aws-autoscaling-enforce-http-token-imds
# provider: aws
# service: ec2
# severity: HIGH
Expand Down
2 changes: 2 additions & 0 deletions checks/cloud/aws/ec2/as_no_secrets_in_user_data.rego
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# custom:
# id: AVD-AWS-0129
# avd_id: AVD-AWS-0129
# aliases:
# - aws-autoscaling-no-secrets-in-user-data
# provider: aws
# service: ec2
# severity: CRITICAL
Expand Down
2 changes: 2 additions & 0 deletions checks/cloud/aws/ec2/enable_volume_encryption.rego
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# custom:
# id: AVD-AWS-0026
# avd_id: AVD-AWS-0026
# aliases:
# - aws-ebs-enable-volume-encryption
# provider: aws
# service: ec2
# severity: HIGH
Expand Down
2 changes: 2 additions & 0 deletions checks/cloud/aws/ec2/encryption_customer_key.rego
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# custom:
# id: AVD-AWS-0027
# avd_id: AVD-AWS-0027
# aliases:
# - aws-ebs-encryption-customer-key
# provider: aws
# service: ec2
# severity: LOW
Expand Down
2 changes: 2 additions & 0 deletions checks/cloud/aws/ec2/no_default_vpc.rego
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# custom:
# id: AVD-AWS-0101
# avd_id: AVD-AWS-0101
# aliases:
# - aws-vpc-no-default-vpc
# provider: aws
# service: ec2
# severity: HIGH
Expand Down
2 changes: 2 additions & 0 deletions checks/cloud/aws/ec2/no_excessive_port_access.rego
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# custom:
# id: AVD-AWS-0102
# avd_id: AVD-AWS-0102
# aliases:
# - aws-vpc-no-excessive-port-access
# provider: aws
# service: ec2
# severity: CRITICAL
Expand Down
2 changes: 2 additions & 0 deletions checks/cloud/aws/ec2/no_public_egress_sgr.rego
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# custom:
# id: AVD-AWS-0104
# avd_id: AVD-AWS-0104
# aliases:
# - aws-vpc-no-public-egress-sgr
# provider: aws
# service: ec2
# severity: CRITICAL
Expand Down
2 changes: 2 additions & 0 deletions checks/cloud/aws/ec2/no_public_ingress_acl.rego
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# custom:
# id: AVD-AWS-0105
# avd_id: AVD-AWS-0105
# aliases:
# - aws-vpc-no-public-ingress-acl
# provider: aws
# service: ec2
# severity: MEDIUM
Expand Down
2 changes: 2 additions & 0 deletions checks/cloud/aws/ec2/no_public_ip_subnet.rego
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# custom:
# id: AVD-AWS-0164
# avd_id: AVD-AWS-0164
# aliases:
# - aws-vpc-no-public-ingress-sgr
# provider: aws
# service: ec2
# severity: HIGH
Expand Down
2 changes: 2 additions & 0 deletions checks/cloud/aws/ec2/no_secrets_in_user_data.rego
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# custom:
# id: AVD-AWS-0029
# avd_id: AVD-AWS-0029
# aliases:
# - aws-autoscaling-no-public-ip
# provider: aws
# service: ec2
# severity: CRITICAL
Expand Down
2 changes: 2 additions & 0 deletions checks/cloud/aws/ec2/no_sensitive_info.rego
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
# custom:
# id: AVD-AWS-0122
# avd_id: AVD-AWS-0122
# aliases:
# - aws-autoscaling-no-sensitive-info
# provider: aws
# service: ec2
# severity: HIGH
Expand Down
2 changes: 2 additions & 0 deletions checks/cloud/aws/ec2/require_vpc_flow_logs_for_all_vpcs.rego
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# custom:
# id: AVD-AWS-0178
# avd_id: AVD-AWS-0178
# aliases:
# - aws-autoscaling-enable-at-rest-encryption
# provider: aws
# service: ec2
# severity: MEDIUM
Expand Down
6 changes: 2 additions & 4 deletions checks/cloud/aws/iam/enforce_group_mfa.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ import (

var CheckEnforceGroupMFA = rules.Register(
scan.Rule{
AVDID: "AVD-AWS-0123",
Aliases: []string{
"aws-iam-enforce-mfa",
},
AVDID: "AVD-AWS-0123",
Aliases: []string{"aws-iam-enforce-mfa"},
Provider: providers.AWSProvider,
Service: "iam",
ShortCode: "enforce-group-mfa",
Expand Down
2 changes: 2 additions & 0 deletions checks/cloud/aws/iam/enforce_group_mfa.rego
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# custom:
# id: AVD-AWS-0123
# avd_id: AVD-AWS-0123
# aliases:
# - aws-iam-enforce-mfa
# provider: aws
# service: iam
# severity: MEDIUM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# custom:
# id: AVD-NIF-0002
# avd_id: AVD-NIF-0002
# aliases:
# - nifcloud-computing-add-description-to-security-group
# provider: nifcloud
# service: computing
# severity: LOW
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# custom:
# id: AVD-NIF-0003
# avd_id: AVD-NIF-0003
# aliases:
# - nifcloud-computing-add-description-to-security-group-rule
# provider: nifcloud
# service: computing
# severity: LOW
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# custom:
# id: AVD-NIF-0004
# avd_id: AVD-NIF-0004
# aliases:
# - nifcloud-computing-add-security-group-to-instance
# provider: nifcloud
# service: computing
# severity: CRITICAL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# custom:
# id: AVD-NIF-0005
# avd_id: AVD-NIF-0005
# aliases:
# - nifcloud-computing-no-common-private-instance
# provider: nifcloud
# service: computing
# severity: LOW
Expand Down
2 changes: 2 additions & 0 deletions checks/cloud/nifcloud/computing/no_public_ingress_sgr.rego
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# custom:
# id: AVD-NIF-0001
# avd_id: AVD-NIF-0001
# aliases:
# - nifcloud-computing-no-public-ingress-sgr
# provider: nifcloud
# service: computing
# severity: CRITICAL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# custom:
# id: AVD-NIF-0015
# avd_id: AVD-NIF-0015
# aliases:
# - nifcloud-nas-add-description-to-nas-security-group
# provider: nifcloud
# service: nas
# severity: LOW
Expand Down
2 changes: 2 additions & 0 deletions checks/cloud/nifcloud/nas/no_common_private_nas_instance.rego
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# custom:
# id: AVD-NIF-0013
# avd_id: AVD-NIF-0013
# aliases:
# - nifcloud-nas-no-common-private-nas-instance
# provider: nifcloud
# service: nas
# severity: LOW
Expand Down
2 changes: 2 additions & 0 deletions checks/cloud/nifcloud/nas/no_public_ingress_nas_sgr.rego
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# custom:
# id: AVD-NIF-0014
# avd_id: AVD-NIF-0014
# aliases:
# - nifcloud-nas-no-public-ingress-nas-sgr
# provider: nifcloud
# service: nas
# severity: CRITICAL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# custom:
# id: AVD-NIF-0016
# avd_id: AVD-NIF-0016
# aliases:
# - nifcloud-computing-add-security-group-to-router
# provider: nifcloud
# service: network
# severity: CRITICAL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# custom:
# id: AVD-NIF-0018
# avd_id: AVD-NIF-0018
# aliases:
# - nifcloud-computing-add-security-group-to-vpn-gateway
# provider: nifcloud
# service: network
# severity: CRITICAL
Expand Down
2 changes: 2 additions & 0 deletions checks/cloud/nifcloud/network/no_common_private_elb.rego
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# custom:
# id: AVD-NIF-0019
# avd_id: AVD-NIF-0019
# aliases:
# - nifcloud-network-no-common-private-elb
# provider: nifcloud
# service: network
# severity: LOW
Expand Down
2 changes: 2 additions & 0 deletions checks/cloud/nifcloud/network/no_common_private_router.rego
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# custom:
# id: AVD-NIF-0017
# avd_id: AVD-NIF-0017
# aliases:
# - nifcloud-network-no-common-private-router
# provider: nifcloud
# service: network
# severity: LOW
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# custom:
# id: AVD-NIF-0012
# avd_id: AVD-NIF-0012
# aliases:
# - nifcloud-rdb-add-description-to-db-security-group
# provider: nifcloud
# service: rdb
# severity: LOW
Expand Down
2 changes: 2 additions & 0 deletions checks/cloud/nifcloud/rdb/no_common_private_db_instance.rego
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# custom:
# id: AVD-NIF-0010
# avd_id: AVD-NIF-0010
# aliases:
# - nifcloud-rdb-no-common-private-db-instance
# provider: nifcloud
# service: rdb
# severity: LOW
Expand Down
2 changes: 2 additions & 0 deletions checks/cloud/nifcloud/rdb/no_public_ingress_db_sgr.rego
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# custom:
# id: AVD-NIF-0011
# avd_id: AVD-NIF-0011
# aliases:
# - nifcloud-rdb-no-public-ingress-db-sgr
# provider: nifcloud
# service: rdb
# severity: CRITICAL
Expand Down

0 comments on commit 201dd53

Please sign in to comment.