Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cis_v120 benchmark #535

Merged
merged 15 commits into from
Jan 19, 2023
Merged

Add cis_v120 benchmark #535

merged 15 commits into from
Jan 19, 2023

Conversation

madhushreeray30
Copy link
Contributor

No description provided.

tags = merge(local.cis_v120_1_common_tags, {
cis_item_id = "1.15"
cis_level = "1"
cis_type = "not scored"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cis_type = "not scored"
cis_type = "not_scored"

Please change this in all applicable places. 

tags = merge(local.cis_v120_4_common_tags, {
cis_item_id = "4.4"
cis_level = "2"
cis_type = "scored"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cis_type = "scored"
cis_type = "not_scored"

title = "3.4 Ensure a log metric filter and alarm exist for IAM policy changes"
description = "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is recommended that a metric filter and alarm be established changes made to Identity and Access Management (IAM) policies."
sql = query.log_metric_filter_iam_policy.sql
documentation = file("./cis_v120/docs/cis_v120_3_3.md")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
documentation = file("./cis_v120/docs/cis_v120_3_3.md")
documentation = file("./cis_v120/docs/cis_v120_3_4.md")

title = "3.14 Ensure a log metric filter and alarm exist for VPC changes"
description = "Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is possible to have more than 1 VPC within an account, in addition it is also possible to create a peer connection between 2 VPCs enabling network traffic to route between VPCs. It is recommended that a metric filter and alarm be established for changes made to VPCs."
sql = query.log_metric_filter_vpc.sql
documentation = file("./cis_v120/docs/cis_v120_3_13.md")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
documentation = file("./cis_v120/docs/cis_v120_3_13.md")
documentation = file("./cis_v120/docs/cis_v120_3_14.md")

control "cis_v120_1_17" {
title = "1.17 Maintain current contact details"
description = "Ensure contact email and telephone details for AWS accounts are current and map to more than one individual in your organization. An AWS account supports a number of contact details, and AWS will use these to contact the account owner if activity judged to be in breach of Acceptable Use Policy or indicative of likely security compromise is observed by the AWS Abuse team. Contact details should not be for a single individual, as circumstances may arise where that individual is unavailable. Email contact details should point to a mail alias which forwards email to multiple individuals within the organization; where feasible, phone contact details should point to a PABX hunt group or other call-forwarding system."
sql = query.manual_control.sql
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can try to build a query using the aws_account_contact table.

Comment on lines 6 to 10

- Passwords can be stolen or compromised sometimes without your knowledge. This can happen via a system compromise, software vulnerability, or internal threat.
- Certain corporate and government web filters or proxy servers have the ability to intercept and record traffic even if it's encrypted.
- Many people use the same password for many systems such as work, email, and personal.
- Compromised end user workstations might have a keystroke logger.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Passwords can be stolen or compromised sometimes without your knowledge. This can happen via a system compromise, software vulnerability, or internal threat.
- Certain corporate and government web filters or proxy servers have the ability to intercept and record traffic even if it's encrypted.
- Many people use the same password for many systems such as work, email, and personal.
- Compromised end user workstations might have a keystroke logger.
- Passwords can be stolen or compromised sometimes without your knowledge. This can happen via a system compromise, software vulnerability, or internal threat.
- Certain corporate and government web filters or proxy servers have the ability to intercept and record traffic even if it's encrypted.
- Many people use the same password for many systems such as work, email, and personal.
- Compromised end user workstations might have a keystroke logger.

Comment on lines +20 to +21
- Click on `Make Inactive` - (Temporarily disable Key - may be needed again).
- Click `Delete` - (Deleted keys cannot be recovered).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Click on `Make Inactive` - (Temporarily disable Key - may be needed again).
- Click `Delete` - (Deleted keys cannot be recovered).
- Click on `Make Inactive` - (Temporarily disable Key - may be needed again).
- Click `Delete` - (Deleted keys cannot be recovered).

control "cis_v120_2_1" {
title = "2.1 Ensure CloudTrail is enabled in all regions"
description = "AWS CloudTrail is a web service that records AWS API calls for your account and delivers log files to you. The recorded information includes the identity of the API caller, the time of the API call, the source IP address of the API caller, the request parameters, and the response elements returned by the AWS service. CloudTrail provides a history of AWS API calls for an account, including API calls made via the Management Console, SDKs, command line tools, and higher-level AWS services (such as CloudFormation)."
sql = query.cloudtrail_multi_region_read_write_enabled.sql
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sql = query.cloudtrail_multi_region_read_write_enabled.sql
query = query.cloudtrail_multi_region_read_write_enabled

Please make changes to all places wherever applicable.

Copy link
Contributor

@misraved misraved left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take a look at the review comments 👍. Thanks!!!

Comment on lines 21 to 25
- Click `Add new trail`.
- Enter a trail name in the `Trail name` box.
- Set the `Apply trail to all regions` option to `Yes`.
- Specify an S3 bucket name in the `S3 bucket` box.
- Click `Create`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Click `Add new trail`.
- Enter a trail name in the `Trail name` box.
- Set the `Apply trail to all regions` option to `Yes`.
- Specify an S3 bucket name in the `S3 bucket` box.
- Click `Create`.
- Click `Add new trail`.
- Enter a trail name in the `Trail name` box.
- Set the `Apply trail to all regions` option to `Yes`.
- Specify an S3 bucket name in the `S3 bucket` box.
- Click `Create`.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update all such instances across the documents 👍 .

Comment on lines 25 to 26
- Create/Select an `IAM Role` and `Policy Name`.
- Click `Allow` to continue.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the indentation.

Comment on lines 18 to 20
- Click on `Enabled` checkbox.
- Select Target Bucket from list.
- Enter a Target Prefix.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Click on `Enabled` checkbox.
- Select Target Bucket from list.
- Enter a Target Prefix.
- Click on `Enabled` checkbox.
- Select Target Bucket from list.
- Enter a Target Prefix.

Comment on lines 19 to 20
- Note: Ensure the CMK is located in the same region as the S3 bucket
- Note: You will need to apply a KMS Key policy on the selected CMK in order for
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the indentation

end as status,
case
when ingress_rdp_rules.group_id is null then sg.group_id || ' ingress restricted for RDP from 0.0.0.0/0.'
else sg.group_id || ' contains ' || ingress_rdp_rules.num_rdp_rules || ' ingress rule(s) allowing RDP from 0.0.0.0/0.'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
else sg.group_id || ' contains ' || ingress_rdp_rules.num_rdp_rules || ' ingress rule(s) allowing RDP from 0.0.0.0/0.'
else sg.group_id || ' contains ' || ingress_rdp_rules.num_rdp_rules || ' ingress rule(s) allowing RDP from 0.0.0.0/0.'

@misraved misraved changed the title Add cis_v120 (downgrade) Add cis_v120 benchmark Jan 19, 2023
@misraved misraved merged commit 9a220f5 into release/v0.55 Jan 19, 2023
@misraved misraved deleted the add-cis-v120 branch January 19, 2023 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Evaluate & Add CIS Amazon Web Services Foundation Benchmark v1.2.0
3 participants