feat: Add PCI DSS 4.0 compliance pack - #2166
Conversation
|
@dontirun is this project still working? |
|
@vumdao Yes. I'll be able to look at this closer to the end of the month |
dontirun
left a comment
There was a problem hiding this comment.
I went through the guidance and here are all the rules that are listed. The missing ones need to be added along with updates to control IDs to use the proper IDs
| AWS Config Rule | Should Include in Pack | Control IDs | Description |
|---|---|---|---|
| access-keys-rotated | FALSE | 2.2, 8.2.4 | The credentials are audited for authorized devices, users, and processes by ensuring IAM access keys are rotated as specified by the organizational policy. Changing the access keys on a regular schedule is a security best practice. It shortens the period an access key is active and reduces the business impact if the keys are compromised. This rule requires an access key rotation value (Config Default: 90). The actual value should reflect your organization's policies. |
| account-part-of-organizations | FALSE | 2.2 | Centralized management of AWS accounts within AWS Organizations helps to ensure that accounts are compliant. The lack of centralized account governance may lead to inconsistent account configurations, which may expose resources and sensitive data. |
| acm-certificate-expiration-check | FALSE | 4.1 | Ensure network integrity is protected by ensuring X509 certificates are issued by AWS ACM. These certificates must be valid and unexpired. This rule requires a value for daysToExpiration (AWS Foundational Security Best Practices value: 90). The actual value should reflect your organization's policies. |
| alb-desync-mode-check | TRUE | 1.3, 6.6, 2.2.3 | To assist in protecting applications for HTTP Desync vulnerabilities, ensure HTTP Desync mitigation mode is enabled on your application load balancers. HTTP Desync issues can lead to request smuggling and make your applications vulnerable to request queue or cache poisoning. Desync mitigation modes are monitor, defensive, and strictest. Defensive is the default mode. |
| alb-http-drop-invalid-header-enabled | TRUE | 1.3 | Ensure that your Elastic Load Balancers (ELB) are configured to drop http headers. Because sensitive data can exist, enable encryption in transit to help protect that data. |
| alb-http-to-https-redirection-check | TRUE | 2.3, 4.1, 8.2.1 | To help protect data in transit, ensure that your Application Load Balancer automatically redirects unencrypted HTTP requests to HTTPS. Because sensitive data can exist, enable encryption in transit to help protect that data. |
| alb-waf-enabled | TRUE | 6.6 | Ensure AWS WAF is enabled on Elastic Load Balancers (ELB) to help protect web applications. A WAF helps to protect your web applications or APIs against common web exploits. These web exploits may affect availability, compromise security, or consume excessive resources within your environment. |
| api-gw-associated-with-waf | TRUE | 6.6 | AWS WAF enables you to configure a set of rules (called a web access control list (web ACL)) that allow, block, or count web requests based on customizable web security rules and conditions that you define. Ensure your Amazon API Gateway stage is associated with a WAF Web ACL to protect it from malicious attacks |
| api-gw-execution-logging-enabled | TRUE | 10.1, 10.2.1, 10.2.4, 10.2.7, 10.3.1 | API Gateway logging displays detailed views of users who accessed the API and the way they accessed the API. This insight enables visibility of user activities. |
| api-gw-ssl-enabled | TRUE | 2.3, 4.1, 8.2.1 | Ensure Amazon API Gateway REST API stages are configured with SSL certificates to allow backend systems to authenticate that requests originate from API Gateway. |
| autoscaling-launch-config-public-ip-disabled | TRUE | 1.3, 2.2, 1.3.6, 2.2.2 | If you configure your Network Interfaces with a public IP address, then the associated resources to those Network Interfaces are reachable from the internet. EC2 resources should not be publicly accessible, as this may allow unintended access to your applications or servers. |
| backup-plan-min-frequency-and-min-retention-check | TRUE | 3.1, 10.7, 10.5.3 | To help with data back-up processes, ensure your AWS Backup plan is set for a minimum frequency and retention. AWS Backup is a fully managed backup service with a policy-based backup solution. This solution simplifies your backup management and enables you to meet your business and regulatory backup compliance requirements. This rule allows you to set the requiredFrequencyValue (Config default: 1), requiredRetentionDays (Config default: 35) and requiredFrequencyUnit (Config default: days) parameters. The actual value should reflect your organizations requirements. |
| backup-recovery-point-encrypted | TRUE | 3.4 | Ensure that encryption is enabled for your AWS Backup recovery points. Because sensitive data can exist at rest, enable encryption at rest to help protect that data. |
| backup-recovery-point-minimum-retention-check | TRUE | 3.1 | To help with data back-up processes, ensure your AWS Backup recovery points have a minimum retention period set. AWS Backup is a fully managed backup service with a policy-based backup solution. This solution simplifies your backup management and enables you to meet your business and regulatory backup compliance requirements. This rule allows you to set the requiredRetentionDays (config default: 35) parameter. The actual value should reflect your organizations requirements. |
| cloud-trail-cloud-watch-logs-enabled | TRUE | 2.2, 10.5.3 | Use Amazon CloudWatch to centrally collect and manage log event activity. Inclusion of AWS CloudTrail data provides details of API call activity within your AWS account. |
| cloudtrail-enabled | FALSE | 10.1, 10.2.1, 10.2.2, 10.2.3, 10.2.4, 10.2.5, 10.2.6, 10.2.7, 10.3.1 | AWS CloudTrail can help in non-repudiation by recording AWS Management Console actions and API calls. You can identify the users and AWS accounts that called an AWS service, the source IP address where the calls generated, and the timings of the calls. Details of captured data are seen within AWS CloudTrail Record Contents. |
| cloud-trail-encryption-enabled | TRUE | 2.2, 3.4, 10.5, 10.5.2 | Because sensitive data may exist and to help protect data at rest, ensure encryption is enabled for your AWS CloudTrail trails. |
| cloud-trail-log-file-validation-enabled | TRUE | 2.2, 11.5, 10.5.5 | Utilize AWS CloudTrail log file validation to check the integrity of CloudTrail logs. Log file validation helps determine if a log file was modified or deleted or unchanged after CloudTrail delivered it. This feature is built using industry standard algorithms: SHA-256 for hashing and SHA-256 with RSA for digital signing. This makes it computationally infeasible to modify, delete or forge CloudTrail log files without detection. |
| cloudtrail-s3-dataevents-enabled | FALSE | 2.2, 10.1, 10.2.1, 10.2.3, 10.2.4, 10.3.1 | The collection of Simple Storage Service (Amazon S3) data events helps in detecting any anomalous activity. The details include AWS account information that accessed an Amazon S3 bucket, IP address, and time of event. |
| cloudwatch-log-group-encrypted | TRUE | 3.4 | To help protect sensitive data at rest, ensure encryption is enabled for your Amazon CloudWatch Log Groups. |
| cmk-backing-key-rotation-enabled | TRUE | 2.2, 3.6.4 | Enable key rotation to ensure that keys are rotated after they have reached the end of their crypto period. |
| codebuild-project-environment-privileged-check | TRUE | 8.2.1 | To assist with implementing the principle of least privilege, ensure your Amazon CodeBuild project environment does not have privileged mode enabled. This setting should be disabled to prevent unintended access to Docker APIs as well as the container’s underlying hardware. |
| codebuild-project-logging-enabled | TRUE | 10.1, 10.2.1, 10.2.2, 10.2.3, 10.2.4, 10.2.5, 10.3.1 | Ensure AWS CodeBuild project logging is enabled so that your build output logs are sent to either Amazon CloudWatch or Amazon Simple Storage Service (Amazon S3). Build output logs provide detailed information about your build project. |
| dms-replication-not-public | TRUE | 1.3, 1.3.6, 2.2.2 | Manage access to the AWS Cloud by ensuring DMS replication instances cannot be publicly accessed. DMS replication instances can contain sensitive information and access control is required for such accounts. |
| ebs-snapshot-public-restorable-check | TRUE | 1.3, 1.3.6, 2.2.2 | Manage access to the AWS Cloud by ensuring EBS snapshots are not publicly restorable. EBS volume snapshots can contain sensitive information and access control is required for such accounts. |
| ec2-ebs-encryption-by-default | TRUE | 2.2, 3.4, 8.2.1 | To help protect data at rest, ensure that encryption is enabled for your Amazon Elastic Block Store (Amazon EBS) volumes. Because sensitive data can exist at rest in these volumes, enable encryption at rest to help protect that data. |
| ec2-instance-managed-by-systems-manager | TRUE | 2.4 | An inventory of the software platforms and applications within the organization is possible by managing Amazon Elastic Compute Cloud (Amazon EC2) instances with AWS Systems Manager. Use AWS Systems Manager to provide detailed system configurations, operating system patch levels, services name and type, software installations, application name, publisher and version, and other details about your environment. |
| ec2-instance-multiple-eni-check | TRUE | 2.2 | This rule checks if your Amazon Elastic Compute Cloud (Amazon EC2) instances have multiple ENIs. Having multiple ENIs can cause dual-homed instances, meaning instances that have multiple subnets. This can add network security complexity and introduce unintended network paths and access. |
| ec2-instance-no-public-ip | TRUE | 1.3, 1.3.6, 2.2.2 | Manage access to the AWS Cloud by ensuring Amazon Elastic Compute Cloud (Amazon EC2) instances cannot be publicly accessed. Amazon EC2 instances can contain sensitive information and access control is required for such accounts. |
| ec2-instances-in-vpc | TRUE | 1.3, 1.3.6, 2.2.2 | Deploy Amazon Elastic Compute Cloud (Amazon EC2) instances within an Amazon Virtual Private Cloud (Amazon VPC) to enable secure communication between an instance and other services within the amazon VPC, without requiring an internet gateway, NAT device, or VPN connection. All traffic remains securely within the AWS Cloud. Because of their logical isolation, domains that reside within an Amazon VPC have an extra layer of security when compared to domains that use public endpoints. Assign Amazon EC2 instances to an Amazon VPC to properly manage access. |
| ec2-managedinstance-association-compliance-status-check | FALSE | 2.2, 6.2 | Use AWS Systems Manager Associations to help with inventory of software platforms and applications within an organization. AWS Systems Manager assigns a configuration state to your managed instances and allows you to set baselines of operating system patch levels, software installations, application configurations, and other details about your environment. |
| ec2-managedinstance-patch-compliance-status-check | FALSE | 2.2, 6.2 | Enable this rule to help with identification and documentation of Amazon Elastic Compute Cloud (Amazon EC2) vulnerabilities. The rule checks if Amazon EC2 instance patch compliance in AWS Systems Manager as required by your organization's policies and procedures. |
| ec2-security-group-attached-to-eni-periodic | FALSE | 2.2, 2.4 | This rule ensures the security groups are attached to an Amazon Elastic Compute Cloud (Amazon EC2) instance or to an ENI. This rule helps monitoring unused security groups in the inventory and the management of your environment. |
| ecr-private-image-scanning-enabled | TRUE | 11.2.3, 6.3.2 | Amazon Elastic Container Repository (ECR) image scanning assists in identifying software vulnerabilities in your container images. Enabling image scanning on ECR repositories adds a layer of verification for the integrity and safety of the images being stored. |
| ecs-containers-nonprivileged | TRUE | 7.1.1, 7.2.1, 7.2.2 | To assist with implementing the principle of least privilege, Amazon Elastic Container Service (Amazon ECS) task definitions should not have elevated privilege enabled. When this parameter is true, the container is given elevated privileges on the host container instance (similar to the root user). |
| ecs-containers-readonly-access | TRUE | 7.1.1, 7.2.1, 7.2.2 | Enabling read only access to Amazon Elastic Container Service (ECS) containers can assist in adhering to the principal of least privilege. This option can reduces attack vectors as the container instance’s filesystem cannot be modified unless it has explicit read-write permissions. |
| ecs-fargate-latest-platform-version | TRUE | 6.2 | Security updates and patches are deployed automatically for your AWS Fargate tasks. If a security issue is found that affects an AWS Fargate platform version, AWS patches the platform version. To assist in patch management of your Amazon Elastic Container Service (ECS) tasks running AWS Fargate, update your services standalone tasks to use the most recent platform version. |
| ecs-no-environment-secrets | TRUE | 8.2.1 | As a security best practice, pass sensitive information to containers as environment variables. You can securely inject data into your Amazon Elastic Container Service (ECS) containers by referencing values stored in AWS Systems Manager Parameter Store or AWS Secrets Manager in the container definition of an Amazon ECS task definition. Then, you can expose your sensitive information as environment variables or in the log configuration of a container. |
| ecs-task-definition-nonroot-user | TRUE | 7.1.1 | To assist with implementing the principle of least privilege, ensure that a non-root user is designated for access to your Amazon Elastic Container Service (Amazon ECS) task definitions. |
| efs-access-point-enforce-root-directory | TRUE | 7.1.1, 7.2.1, 7.2.2 | Enforcing a root directory for an Amazon Elastic File System (Amazon EFS) access point helps restrict data access by ensuring that users of the access point can only reach files of the specified subdirectory. |
| efs-access-point-enforce-user-identity | TRUE | 7.1.1, 7.2.1, 7.2.2 | To assist with implementing the principle of least privilege, ensure user enforcement is enabled for your Amazon Elastic File System (Amazon EFS) .When enabled, Amazon EFS replaces the NFS client's user and group IDs with the identity configured on the access point for all file system operations and only grants access to this enforced user identity. |
| efs-encrypted-check | TRUE | 3.4, 8.2.1 | Because sensitive data can exist and to help protect data at rest, ensure encryption is enabled for your Amazon Elastic File System (EFS). |
| eip-attached | TRUE | 2.4 | This rule ensures Elastic IPs allocated to a Amazon Virtual Private Cloud (Amazon VPC) are attached to Amazon Elastic Compute Cloud (Amazon EC2) instances or in-use Elastic Network Interfaces. This rule helps monitor unused EIPs in your environment. |
| elasticache-redis-cluster-automatic-backup-check | TRUE | 3.1 | When automatic backups are enabled, Amazon ElastiCache creates a backup of the cluster on a daily basis. The backup can be retained for a number of days as specified by your organization. Automatic backups can help guard against data loss. If a failure occurs, you can create a new cluster, which restores your data from the most recent backup. |
| elastic-beanstalk-managed-updates-enabled | TRUE | 6.2 | Enabling managed platform updates for an Amazon Elastic Beanstalk environment ensures that the latest available platform fixes, updates, and features for the environment are installed. Keeping up to date with patch installation is a best practice in securing systems. |
| elasticsearch-encrypted-at-rest | TRUE | 8.2.1 | Because sensitive data can exist and to help protect data at rest, ensure encryption is enabled for your Amazon OpenSearch Service (OpenSearch Service) domains. |
| elasticsearch-in-vpc-only | TRUE | 1.3, 1.3.6 | Manage access to the AWS Cloud by ensuring Amazon OpenSearch Service (OpenSearch Service) Domains are within an Amazon Virtual Private Cloud (Amazon VPC). An OpenSearch Service domain within an Amazon VPC enables secure communication between OpenSearch Service and other services within the Amazon VPC without the need for an internet gateway, NAT device, or VPN connection. |
| elasticsearch-logs-to-cloudwatch | TRUE | 10.1, 10.2.1, 10.2.2, 10.2.3, 10.2.4, 10.2.5, 10.2.7, 10.3.1 | Ensure Amazon OpenSearch Service domains have error logs enabled and streamed to Amazon CloudWatch Logs for retention and response. Domain error logs can assist with security and access audits, and can help to diagnose availability issues. |
| elasticsearch-node-to-node-encryption-check | TRUE | 4.1 | Ensure node-to-node encryption for Amazon OpenSearch Service is enabled. Node-to-node encryption enables TLS 1.2 encryption for all communications within the Amazon Virtual Private Cloud (Amazon VPC). Because sensitive data can exist, enable encryption in transit to help protect that data. |
| elb-logging-enabled | TRUE | 10.1, 10.3.1 | Elastic Load Balancing activity is a central point of communication within an environment. Ensure ELB logging is enabled. The collected data provides detailed information about requests sent to the ELB. Each log contains information such as the time the request was received, the client's IP address, latencies, request paths, and server responses. |
| elb-tls-https-listeners-only | TRUE | 2.3, 4.1, 8.2.1 | Ensure that your Elastic Load Balancers (ELBs) are configured with SSL or HTTPS listeners. Because sensitive data can exist, enable encryption in transit to help protect that data. |
| elbv2-acm-certificate-required | TRUE | 4.1 | Because sensitive data can exist and to help protect data at transit, ensure encryption is enabled for your Elastic Load Balancing. Use AWS Certificate Manager to manage, provision and deploy public and private SSL/TLS certificates with AWS services and internal resources. |
| emr-kerberos-enabled | TRUE | 7.1.1, 7.2.1, 7.2.2 | The access permissions and authorizations can be managed and incorporated with the principles of least privilege and separation of duties, by enabling Kerberos for Amazon EMR clusters. In Kerberos, the services and the users that need to authenticate are known as principals. The principals exist within a Kerberos realm. Within the realm, a Kerberos server is known as the key distribution center (KDC). It provides a means for the principals to authenticate. The KDC authenticates by issuing tickets for authentication. The KDC maintains a database of the principals within its realm, their passwords, and other administrative information about each principal. |
| emr-master-no-public-ip | TRUE | 1.3, 2.2.2 | Manage access to the AWS Cloud by ensuring Amazon EMR cluster master nodes cannot be publicly accessed. Amazon EMR cluster master nodes can contain sensitive information and access control is required for such accounts. |
| encrypted-volumes | TRUE | 2.2, 3.4, 8.2.1 | Because sensitive data can exist and to help protect data at rest, ensure encryption is enabled for your Amazon Elastic Block Store (Amazon EBS) volumes. |
| guardduty-enabled-centralized | FALSE | 11.4 | Amazon GuardDuty can help to monitor and detect potential cybersecurity events by using threat intelligence feeds. These include lists of malicious IPs and machine learning to identify unexpected, unauthorized, and malicious activity within your AWS Cloud environment. |
| iam-customer-policy-blocked-kms-actions | FALSE | 3.5.2, 7.1.1, 7.1.2, 7.2.1, 7.2.2 | AWS Identity and Access Management (IAM) can help you incorporate the principles of least privilege and separation of duties with access permissions and authorizations, restricting policies from containing blocked actions on all AWS Key Management Service keys. Having more privileges than needed to complete a task may violate the principle of least privilege and separation of duties. This rule allows you to set the blockedActionsPatterns parameter. (AWS Foundational Security Best Practices value: kms:Decrypt, kms:ReEncryptFrom). The actual values should reflect your organization's policies |
| iam-group-has-users-check | TRUE | 7.1.1, 7.1.2, 7.2.1, 7.2.2 | AWS Identity and Access Management (IAM) can help you incorporate the principles of least privilege and separation of duties with access permissions and authorizations, by ensuring that IAM groups have at least one user. Placing users in groups based on their associated permissions or job function is one way to incorporate least privilege. |
| iam-inline-policy-blocked-kms-actions | FALSE | 3.5.2, 7.1.1, 7.1.2, 7.2.1, 7.2.2 | Ensure an AWS Identity and Access Management (IAM) user, IAM role or IAM group does not have an inline policy to allow blocked actions on all AWS Key Management Service keys. AWS recommends to use managed policies instead of inline policies. The managed policies allow reusability, versioning, rolling back, and delegating permissions management. This rule allows you to set the blockedActionsPatterns parameter. (AWS Foundational Security Best Practices value: kms:Decrypt, kms:ReEncryptFrom). The actual values should reflect your organization's policies. |
| iam-no-inline-policy-check | TRUE | 2.2, 7.1.1, 7.1.2, 7.2.1, 7.2.2 | Ensure an AWS Identity and Access Management (IAM) user, IAM role or IAM group does not have an inline policy to control access to systems and assets. AWS recommends to use managed policies instead of inline policies. The managed policies allow reusability, versioning and rolling back, and delegating permissions management. |
| iam-password-policy | FALSE | 8.2.3, 8.2.4, 8.2.5 | The identities and the credentials are issued, managed, and verified based on an organizational IAM password policy. They meet or exceed requirements as stated by NIST SP 800-63 and the AWS Foundational Security Best Practices standard for password strength. This rule allows you to optionally set RequireUppercaseCharacters (PCI DSS default: false), RequireLowercaseCharacters (PCI DSS default: true), RequireSymbols (PCI DSS default: false), RequireNumbers (PCI DSS default: true), MinimumPasswordLength (PCI DSS default: 7), PasswordReusePrevention (PCI DSS default: 4), and MaxPasswordAge (PCI DSS default: 90) for your IAM Password Policy. The actual values should reflect your organization's policies. |
| iam-policy-no-statements-with-admin-access | TRUE | 2.2, 7.1.1, 7.1.2, 7.2.1, 7.2.2 | AWS Identity and Access Management (IAM) can help you incorporate the principles of least privilege and separation of duties with access permissions and authorizations, restricting policies from containing "Effect": "Allow" with "Action": "*" over "Resource": "*". Allowing users to have more privileges than needed to complete a task may violate the principle of least privilege and separation of duties. |
| iam-policy-no-statements-with-full-access | TRUE | 7.1.1, 7.1.2, 7.2.1, 7.2.2 | Ensure IAM Actions are restricted to only those actions that are needed. Allowing users to have more privileges than needed to complete a task may violate the principle of least privilege and separation of duties. |
| iam-root-access-key-check | FALSE | 2.2, 7.1.1, 7.1.2, 7.2.1, 7.2.2, 8.1.1 | Access to systems and assets can be controlled by checking that the root user does not have access keys attached to their AWS Identity and Access Management (IAM) role. Ensure that the root access keys are deleted. Instead, create and use role-based AWS accounts to help to incorporate the principle of least functionality. |
| iam-user-group-membership-check | TRUE | 2.2, 7.1.1, 7.1.2, 7.2.1, 7.2.2 | AWS Identity and Access Management (IAM) can help you restrict access permissions and authorizations, by ensuring users are members of at least one group. Allowing users more privileges than needed to complete a task may violate the principle of least privilege and separation of duties. |
| iam-user-mfa-enabled | FALSE | 8.3.1, 8.3.2 | Enable this rule to restrict access to resources in the AWS Cloud. This rule ensures multi-factor authentication (MFA) is enabled for all users. MFA adds an extra layer of protection on top of a user name and password. Reduce the incidents of compromised accounts by requiring MFA for users. |
| iam-user-no-policies-check | FALSE | 2.2, 7.1.1, 7.1.2, 7.2.1, 7.2.2 | This rule ensures AWS Identity and Access Management (IAM) policies are attached only to groups or roles to control access to systems and assets. Assigning privileges at the group or the role level helps to reduce opportunity for an identity to receive or retain excessive privileges. |
| iam-user-unused-credentials-check | FALSE | 2.2, 8.1.4 | AWS Identity and Access Management (IAM) can help you with access permissions and authorizations by checking for IAM passwords and access keys that are not used for a specified time period. If these unused credentials are identified, you should disable and/or remove the credentials, as this may violate the principle of least privilege. This rule requires you to set a value to the maxCredentialUsageAge (Config Default: 90). The actual value should reflect your organization's policies. |
| kms-cmk-not-scheduled-for-deletion | TRUE | 3.6.5, 3.6.7 | To help protect data at rest, ensure necessary customer master keys (CMKs) are not scheduled for deletion in AWS Key Management Service (AWS KMS). Because key deletion is necessary at times, this rule can assist in checking for all keys scheduled for deletion, in case a key was scheduled unintentionally. |
| lambda-function-public-access-prohibited | TRUE | 1.3, 2.2.2 | Manage access to resources in the AWS Cloud by ensuring AWS Lambda functions cannot be publicly accessed. Public access can potentially lead to degradation of availability of resources. |
| lambda-inside-vpc | TRUE | 1.3, 2.2.2 | Deploy AWS Lambda functions within an Amazon Virtual Private Cloud (Amazon VPC) for a secure communication between a function and other services within the Amazon VPC. With this configuration, there is no requirement for an internet gateway, NAT device, or VPN connection. All the traffic remains securely within the AWS Cloud. Because of their logical isolation, domains that reside within an Amazon VPC have an extra layer of security when compared to domains that use public endpoints. To properly manage access, AWS Lambda functions should be assigned to a VPC. |
| mfa-enabled-for-iam-console-access | FALSE | 2.2, 8.3.1, 8.3.2 | Manage access to resources in the AWS Cloud by ensuring that MFA is enabled for all AWS Identity and Access Management (IAM) users that have a console password. MFA adds an extra layer of protection on top of a user name and password. By requiring MFA for users, you can reduce incidents of compromised accounts and keep sensitive data from being accessed by unauthorized users. |
| multi-region-cloudtrail-enabled | FALSE | 2.2, 10.1, 10.2.1, 10.2.2, 10.2.3, 10.2.4, 10.2.5, 10.2.6, 10.2.7, 10.3.1 | AWS CloudTrail records AWS Management Console actions and API calls. You can identify which users and accounts called AWS, the source IP address from where the calls were made, and when the calls occurred. CloudTrail will deliver log files from all AWS Regions to your S3 bucket if MULTI_REGION_CLOUD_TRAIL_ENABLED is enabled. Additionally, when AWS launches a new Region, CloudTrail will create the same trail in the new Region. As a result, you will receive log files containing API activity for the new Region without taking any action. |
| netfw-policy-rule-group-associated | TRUE | 11.4, 1.3.6 | An AWS Network Firewall policy defines how your firewall monitors and handles traffic in an Amazon VPC. You configure stateless and stateful rule groups to filter packets and traffic flows, and you define default traffic handling. |
| netfw-stateless-rule-group-not-empty | TRUE | 1.3, 1.3.6 | An AWS Network Firewall rule group contains rules that define how your firewall processes traffic in your VPC. An empty stateless rule group when present in a firewall policy does not process traffic. |
| no-unrestricted-route-to-igw | TRUE | 1.3, 2.2.2 | Ensure Amazon EC2 route tables do not have unrestricted routes to an internet gateway. Removing or limiting the access to the internet for workloads within Amazon VPCs can reduce unintended access within your environment. |
| opensearch-access-control-enabled | TRUE | 7.1.1, 7.2.1, 7.2.2 | Ensure fine-grained access control is enabled on your Amazon OpenSearch Service domains. Fine-grained access control provides enhanced authorization mechanisms to achieve least-privileged access to Amazon OpenSearch Service domains. It allows for role-based access control to the domain, as well as index, document, and field-level security, support for OpenSearch Service dashboards multi-tenancy, and HTTP basic authentication for OpenSearch Service and Kibana. |
| opensearch-audit-logging-enabled | TRUE | 10.1, 10.2.1, 10.2.2, 10.2.3, 10.2.4, 10.2.5, 10.2.7, 10.3.1 | Ensure audit logging is enabled on your Amazon OpenSearch Service domains. Audit logging allows you to track user activity on your OpenSearch domains, including authentication successes and failures, requests to OpenSearch, index changes, and incoming search queries. |
| opensearch-encrypted-at-rest | TRUE | 8.2.1 | Because sensitive data can exist and to help protect data at rest, ensure encryption is enabled for your Amazon OpenSearch Service domains. |
| opensearch-https-required | TRUE | 2.3, 4.1 | Because sensitive data can exist and to help protect data in transit, ensure HTTPS is enabled for connections to your Amazon OpenSearch Service domains. |
| opensearch-in-vpc-only | TRUE | 1.3, 1.3.6 | Manage access to the AWS Cloud by ensuring Amazon OpenSearch Service domains are within an Amazon Virtual Private Cloud (Amazon VPC). An Amazon OpenSearch Service domain within an Amazon VPC enables secure communication between Amazon OpenSearch Service and other services within the Amazon VPC without the need for an internet gateway, NAT device, or VPN connection. |
| opensearch-logs-to-cloudwatch | TRUE | 10.1, 10.2.1, 10.2.2, 10.2.3, 10.2.4, 10.2.5, 10.2.7, 10.3.1 | Ensure Amazon OpenSearch Service domains have error logs enabled and streamed to Amazon CloudWatch Logs for retention and response. OpenSearch Service error logs can assist with security and access audits, and can help to diagnose availability issues. |
| opensearch-node-to-node-encryption-check | TRUE | 4.1 | Ensure node-to-node encryption for Amazon OpenSearch Service is enabled. Node-to-node encryption enables TLS 1.2 encryption for all communications within the Amazon Virtual Private Cloud (Amazon VPC). Because sensitive data can exist, enable encryption in transit to help protect that data. |
| rds-automatic-minor-version-upgrade-enabled | TRUE | 6.2 | Enable automatic minor version upgrades on your Amazon Relational Database Service (RDS) instances to ensure the latest minor version updates to the Relational Database Management System (RDBMS) are installed, which may include security patches and bug fixes. |
| rds-cluster-default-admin-check | TRUE | 2.1 | As default usernames are public knowledge, changing default usernames can assist in reducing the attack surface for your Amazon Relational Database Service (Amazon RDS) database cluster(s). |
| rds-instance-default-admin-check | TRUE | 2.1 | As default usernames are public knowledge, changing default usernames can assist in reducing the attack surface for your Amazon Relational Database Service (Amazon RDS) database instance(s). |
| rds-instance-public-access-check | TRUE | 1.3, 1.3.6, 2.2.2 | Manage access to resources in the AWS Cloud by ensuring that Amazon Relational Database Service (Amazon RDS) instances are not public. Amazon RDS database instances can contain sensitive information, and principles and access control is required for such accounts. |
| rds-logging-enabled | TRUE | 10.1, 10.2.1, 10.2.2, 10.2.3, 10.2.4, 10.2.5, 10.2.6, 10.2.7, 10.3.1 | To help with logging and monitoring within your environment, ensure Amazon Relational Database Service (Amazon RDS) logging is enabled. With Amazon RDS logging, you can capture events such as connections, disconnections, queries, or tables queried. |
| rds-snapshot-encrypted | FALSE | 3.4, 8.2.1 | Ensure that encryption is enabled for your Amazon Relational Database Service (Amazon RDS) snapshots. Because sensitive data can exist at rest, enable encryption at rest to help protect that data. |
| rds-snapshots-public-prohibited | FALSE | 1.3, 1.3.6, 2.2.2 | Manage access to resources in the AWS Cloud by ensuring that Amazon Relational Database Service (Amazon RDS) instances are not public. Amazon RDS database instances can contain sensitive information and principles and access control is required for such accounts. |
| rds-storage-encrypted | TRUE | 3.4, 8.2.1 | To help protect data at rest, ensure that encryption is enabled for your Amazon Relational Database Service (Amazon RDS) instances. Because sensitive data can exist at rest in Amazon RDS instances, enable encryption at rest to help protect that data. |
| redshift-cluster-configuration-check | TRUE | 3.4, 10.1, 10.2.1, 10.2.2, 10.2.3, 10.2.4, 10.2.5, 10.3.1, 8.2.1 | To protect data at rest, ensure that encryption is enabled for your Amazon Redshift clusters. You must also ensure that required configurations are deployed on Amazon Redshift clusters. The audit logging should be enabled to provide information about connections and user activities in the database. This rule requires that a value is set for clusterDbEncrypted (Config Default : TRUE), and loggingEnabled (Config Default: TRUE). The actual values should reflect your organization's policies. |
| redshift-cluster-maintenancesettings-check | TRUE | 6.2 | This rule ensures that Amazon Redshift clusters have the preferred settings for your organization. Specifically, that they have preferred maintenance windows and automated snapshot retention periods for the database. This rule requires you to set the allowVersionUpgrade. The default is true. It also lets you optionally set the preferredMaintenanceWindow (the default is sat:16:00-sat:16:30), and the automatedSnapshotRetentionPeriod (the default is 1). The actual values should reflect your organization's policies. |
| redshift-cluster-public-access-check | TRUE | 1.3, 1.3.6, 2.2.2 | Manage access to resources in the AWS Cloud by ensuring that Amazon Redshift clusters are not public. Amazon Redshift clusters can contain sensitive information and principles and access control is required for such accounts. |
| redshift-default-admin-check | TRUE | 2.1 | As default usernames are public knowledge, changing default usernames can assist in reducing the attack surface for your Amazon Redshift cluster(s). |
| redshift-default-db-name-check | TRUE | 2.1 | Default names are public knowledge and should be changed upon configuration. Changing the default database name of your Amazon Redshift cluster can assist in reducing the attack surface for your Redshift cluster. |
| redshift-require-tls-ssl | TRUE | 2.3, 4.1 | Ensure that your Amazon Redshift clusters require TLS/SSL encryption to connect to SQL clients. Because sensitive data can exist, enable encryption in transit to help protect that data. |
| restricted-common-ports | FALSE | 1.3, 2.2, 1.3.6, 2.2.2 | Manage access to resources in the AWS Cloud by ensuring common ports are restricted on Amazon Elastic Compute Cloud (Amazon EC2) security groups. Not restricting access to ports to trusted sources can lead to attacks against the availability, integrity and confidentiality of systems. This rule allows you to optionally set blockedPort1 - blockedPort5 parameters (Config Defaults: 20,21,3389,3306,4333). The actual values should reflect your organization's policies. |
| restricted-ssh | TRUE | 1.3, 2.2, 1.3.6, 2.2.2 | Amazon Elastic Compute Cloud (Amazon EC2) Security Groups can help manage network access by providing stateful filtering of ingress and egress network traffic to AWS resources. Not allowing ingress (or remote) traffic from 0.0.0.0/0 to port 22 on your resources help you restricting remote access. |
| root-account-hardware-mfa-enabled | FALSE | 2.2, 8.3.1, 8.3.2 | Manage access to resources in the AWS Cloud by ensuring hardware MFA is enabled for the root user. The root user is the most privileged user in an AWS account. The MFA adds an extra layer of protection for a user name and password. By requiring MFA for the root user, you can reduce the incidents of compromised AWS accounts. |
| root-account-mfa-enabled | FALSE | 2.1, 2.2, 8.3.1, 8.3.2 | Manage access to resources in the AWS Cloud by ensuring MFA is enabled for the root user. The root user is the most privileged user in an AWS account. The MFA adds an extra layer of protection for a user name and password. By requiring MFA for the root user, you can reduce the incidents of compromised AWS accounts. |
| s3-account-level-public-access-blocks-periodic | FALSE | 1.3, 2.2, 1.3.6, 2.2.2 | Manage access to resources in the AWS Cloud by ensuring that Amazon Simple Storage Service (Amazon S3) buckets cannot be publicly accessed. This rule helps keeping sensitive data safe from unauthorized remote users by preventing public access. This rule allows you to optionally set the ignorePublicAcls (Config Default: True), blockPublicPolicy (Config Default: True), blockPublicAcls (Config Default: True), and restrictPublicBuckets parameters (Config Default: True). The actual values should reflect your organization's policies. |
| s3-bucket-acl-prohibited | TRUE | 7.1.1, 7.2.3 | This rule checks to see if Access Control Lists (ACLs) are used to for access control on Amazon S3 Buckets. ACLs are legacy access control mechanisms for Amazon S3 buckets that predate AWS Identity and Access Management (IAM). Instead of ACLs, it is a best practice to use IAM policies or S3 bucket policies to more easily manage access to your S3 buckets. |
| s3-bucket-level-public-access-prohibited | TRUE | 1.3, 1.3.6, 2.2.2 | Manage access to resources in the AWS Cloud by ensuring that Amazon Simple Storage Service (Amazon S3) buckets cannot be publicly accessed. This rule helps keeping sensitive data safe from unauthorized remote users by preventing public access at the bucket level. |
| s3-bucket-logging-enabled | TRUE | 2.2, 10.1, 10.2.1, 10.2.3, 10.2.4, 10.3.1 | Amazon Simple Storage Service (Amazon S3) server access logging provides a method to monitor the network for potential cybersecurity events. The events are monitored by capturing detailed records for the requests that are made to an Amazon S3 bucket. Each access log record provides details about a single access request. The details include the requester, bucket name, request time, request action, response status, and an error code, if relevant. |
| s3-bucket-public-read-prohibited | TRUE | 1.3, 2.2, 1.3.6, 2.2.2 | Manage access to resources in the AWS Cloud by only allowing authorized users, processes, and devices access to Amazon Simple Storage Service (Amazon S3) buckets. The management of access should be consistent with the classification of the data. |
| s3-bucket-public-write-prohibited | TRUE | 1.3, 2.2, 1.3.6, 2.2.2 | Manage access to resources in the AWS Cloud by only allowing authorized users, processes, and devices access to Amazon Simple Storage Service (Amazon S3) buckets. The management of access should be consistent with the classification of the data. |
| s3-bucket-replication-enabled | TRUE | 2.2, 10.5.3 | Amazon Simple Storage Service (Amazon S3) Cross-Region Replication (CRR) supports maintaining adequate capacity and availability. CRR enables automatic, asynchronous copying of objects across Amazon S3 buckets to help ensure that data availability is maintained. |
| s3-bucket-server-side-encryption-enabled | TRUE | 2.2, 3.4, 10.5, 10.5.2, 8.2.1 | To help protect data at rest, ensure encryption is enabled for your Amazon Simple Storage Service (Amazon S3) buckets. Because sensitive data can exist at rest in Amazon S3 buckets, enable encryption to help protect that data. |
| s3-bucket-ssl-requests-only | TRUE | 2.2, 4.1, 8.2.1 | To help protect data in transit, ensure that your Amazon Simple Storage Service (Amazon S3) buckets require requests to use Secure Socket Layer (SSL). Because sensitive data can exist, enable encryption in transit to help protect that data. |
| s3-bucket-versioning-enabled | TRUE | 10.5.5 | Amazon Simple Storage Service (Amazon S3) bucket versioning helps keep multiple variants of an object in the same Amazon S3 bucket. Use versioning to preserve, retrieve, and restore every version of every object stored in your Amazon S3 bucket. Versioning helps you to easily recover from unintended user actions and application failures. |
| s3-default-encryption-kms | TRUE | 3.4, 10.5, 10.5.2, 3.5.3, 8.2.1 | Ensure that encryption is enabled for your Amazon Simple Storage Service (Amazon S3) buckets. Because sensitive data can exist at rest in an Amazon S3 bucket, enable encryption at rest to help protect that data. |
| s3-lifecycle-policy-check | TRUE | 3.1, 10.7, 10.5.3 | Ensure Amazon S3 lifecycle policies are configured to help define actions that you want Amazon S3 to take during an object's lifetime (for example, transition objects to another storage class, archive them, or delete them after a specified period of time). |
| sagemaker-endpoint-configuration-kms-key-configured | TRUE | 3.4, 3.5.3, 8.2.1 | To help protect data at rest, ensure encryption with AWS Key Management Service (AWS KMS) is enabled for your SageMaker endpoint. Because sensitive data can exist at rest in SageMaker endpoint, enable encryption at rest to help protect that data. |
| sagemaker-notebook-instance-kms-key-configured | TRUE | 3.4, 3.5.3, 8.2.1 | To help protect data at rest, ensure encryption with AWS Key Management Service (AWS KMS) is enabled for your SageMaker notebook. Because sensitive data can exist at rest in SageMaker notebook, enable encryption at rest to help protect that data. |
| sagemaker-notebook-no-direct-internet-access | TRUE | 1.3, 1.3.6, 2.2.2 | Manage access to resources in the AWS Cloud by ensuring that Amazon SageMaker notebooks do not allow direct internet access. By preventing direct internet access, you can keep sensitive data from being accessed by unauthorized users. |
| secretsmanager-rotation-enabled-check | TRUE | 8.2.4 | This rule ensures AWS Secrets Manager secrets have rotation enabled. Rotating secrets on a regular schedule can shorten the period a secret is active, and potentially reduce the business impact if the secret is compromised. |
| secretsmanager-using-cmk | TRUE | 8.2.1 | To help protect data at rest, ensure encryption with AWS Key Management Service (AWS KMS) is enabled for AWS Secrets Manager secrets. Because sensitive data can exist at rest in Secrets Manager secrets, enable encryption at rest to help protect that data. |
| securityhub-enabled | FALSE | 11.5 | AWS Security Hub helps to monitor unauthorized personnel, connections, devices, and software. AWS Security Hub aggregates, organizes, and prioritizes the security alerts, or findings, from multiple AWS services. Some such services are Amazon Security Hub, Amazon Inspector, Amazon Macie, AWS Identity and Access Management (IAM) Access Analyzer, and AWS Firewall Manager, and AWS Partner solutions. |
| sns-encrypted-kms | TRUE | 3.4, 8.2.1 | To help protect data at rest, ensure that your Amazon Simple Notification Service (Amazon SNS) topics require encryption using AWS Key Management Service (AWS KMS). Because sensitive data can exist at rest in published messages, enable encryption at rest to help protect that data. |
| ssm-document-not-public | TRUE | 1.3, 2.2.2 | Ensure AWS Systems Manager (SSM) documents are not public, as this may allow unintended access to your SSM documents. A public SSM document can expose information about your account, resources and internal processes. |
| subnet-auto-assign-public-ip-disabled | TRUE | 1.3, 1.3.6, 2.2.2 | Manage access to the AWS Cloud by ensuring Amazon Virtual Private Cloud (VPC) subnets are not automatically assigned a public IP address. Amazon Elastic Compute Cloud (EC2) instances that are launched into subnets that have this attribute enabled have a public IP address assigned to their primary network interface. |
| vpc-default-security-group-closed | TRUE | 1.3, 2.1, 2.2, 1.3.6, 2.2.2 | Amazon Elastic Compute Cloud (Amazon EC2) security groups can help in the management of network access by providing stateful filtering of ingress and egress network traffic to AWS resources. Restricting all the traffic on the default security group helps in restricting remote access to your AWS resources. |
| vpc-flow-logs-enabled | TRUE | 2.2, 10.1, 10.3.1 | The VPC flow logs provide detailed records for information about the IP traffic going to and from network interfaces in your Amazon Virtual Private Cloud (Amazon VPC). By default, the flow log record includes values for the different components of the IP flow, including the source, destination, and protocol. |
| vpc-network-acl-unused-check | TRUE | 2.4 | This rule ensures that Amazon Virtual Private Cloud (VPC) network access control lists are in use. Monitoring for unused network access control lists can assist in accurate inventory and management of your environment. |
| vpc-sg-open-only-to-authorized-ports | FALSE | 1.3, 1.3.6, 2.2.2 | Manage access to resources in the AWS Cloud by ensuring common ports are restricted on Amazon Elastic Compute Cloud (Amazon EC2) Security Groups. Not restricting access on ports to trusted sources can lead to attacks against the availability, integrity and confidentiality of systems. By restricting access to resources within a security group from the internet (0.0.0.0/0) remote access can be controlled to internal systems. |
| waf-regional-rulegroup-not-empty | TRUE | 6.6 | Ensure your AWS WAF has a rule group that is not empty. A rule group that is empty could result in unintended behavior. |
| waf-regional-rule-not-empty | TRUE | 6.6 | Ensure your AWS WAF has a rule that is not empty. A rule with no conditions could result in unintended behavior. |
| waf-regional-webacl-not-empty | TRUE | 6.6 | A Web ACL attached to an AWS WAF can contain a collection of rules and rule groups to inspect and control web requests. If a Web ACL is empty, the web traffic passes without being detected or acted upon by the WAF. |
| wafv2-logging-enabled | TRUE | 10.1, 10.3.1 | To help with logging and monitoring within your environment, enable AWS WAF (V2) logging on regional and global web ACLs. AWS WAF logging provides detailed information about the traffic that is analyzed by your web ACL. The logs record the time that AWS WAF received the request from your AWS resource, information about the request, and an action for the rule that each request matched. |
|
|
||
| ### Warnings | ||
|
|
||
| | Rule ID | Cause | Explanation | Relevant Control ID(s) | |
There was a problem hiding this comment.
The relevant control IDs are wrong. These are using the PCI DSS 3.2.1 IDs when it should be using the 4.0 IDs. I'll provide a list in a different comment
| ### Warnings | ||
|
|
||
| | Rule ID | Cause | Explanation | Relevant Control ID(s) | | ||
| | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------- | |
There was a problem hiding this comment.
This is missing some rules the conformance pack from github doesn't include all the rules that are included in the guidance that can be checked.
For example https://docs.aws.amazon.com/config/latest/developerguide/alb-desync-mode-check.html
| * Check for PCI DSS 4.0 compliance. | ||
| * Based on the PCI DSS 4.0 AWS operational best practices: https://docs.aws.amazon.com/config/latest/developerguide/operational-best-practices-for-pci-dss-v4-including-global-resource-types.html | ||
| */ | ||
| export class PCIDSS400Checks extends NagPack { |
There was a problem hiding this comment.
All packs need a packs test
https://github.com/cdklabs/cdk-nag/blob/main/test/Packs.test.ts
|
Stale PR. |
Rules: https://github.com/awslabs/aws-config-rules/blob/master/aws-config-conformance-packs/Operational-Best-Practices-for-PCI-DSS-v4.0-including-global-resourcetypes.yaml
Fixes #1791