Skip to content

Commit

Permalink
updated with new resource_type format (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
harkirat22 authored Aug 19, 2021
1 parent 7d83f8e commit 8cd6ee1
Show file tree
Hide file tree
Showing 322 changed files with 5,864 additions and 5,402 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"file": "apiGatewayName.rego",
"policy_type": "aws",
"resource_type": {
"aws_api_gateway_stage": true
"aws_api_gateway_stage": true,
"aws_cloudwatch_log_group": true
},
"template_args": null,
"severity": "MEDIUM",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"file": "cloudFormationTerminationProtection.rego",
"policy_type": "aws",
"resource_type": {
"aws_cloudformation_stack": true
"aws_cloudformation_stack": true,
"aws_cloudformation_stack_set_instance": true
},
"template_args": null,
"severity": "MEDIUM",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"file": "ecr_make_tags_immutable.rego",
"policy_type": "aws",
"resource_type": {
"aws_cloudtrail": true
"aws_cloudtrail": true,
"aws_ecr_repository": true
},
"template_args": {
"prefix": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"file": "ec2_ebs_not_optimized.rego",
"policy_type": "aws",
"resource_type": {
"aws_cloudtrail": true
"aws_cloudtrail": true,
"aws_instance": true
},
"template_args": {
"prefix": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"file": "configEnabled.rego",
"policy_type": "aws",
"resource_type": {
"aws_cloudtrail": true
"aws_cloudtrail": true,
"aws_config_configuration_aggregator": true
},
"template_args": {
"prefix": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"file": "logGroupNotEncryptedWithKms.rego",
"policy_type": "aws",
"resource_type": {
"aws_cloudwatch": true
"aws_cloudwatch": true,
"aws_cloudwatch_log_group": true
},
"template_args": null,
"severity": "HIGH",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"file": "awsCloudWatchRetentionPreiod.rego",
"policy_type": "aws",
"resource_type": {
"aws_cloudwatch": true
"aws_cloudwatch": true,
"aws_cloudwatch_log_group": true
},
"template_args": null,
"severity": "MEDIUM",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"file": "ebsSnapshot.rego",
"policy_type": "aws",
"resource_type": {
"aws_ebs_volume": true
"aws_ebs_volume": true,
"aws_ebs_snapshot": true
},
"template_args": {
"name": "ebsSnapshotDisabled",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"file": "overlyPermissiveInstance.rego",
"policy_type": "aws",
"resource_type": {
"aws_instance": true
"aws_instance": true,
"aws_iam_role_policy_attachment": true,
"aws_iam_policy": true
},
"template_args": {
"prefix": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
"file": "instanceExposedToInternet.rego",
"policy_type": "aws",
"resource_type": {
"aws_instance": true
"aws_instance": true,
"aws_security_group": true,
"aws_route_table": true,
"aws_subnet": true,
"aws_route_table_association": true
},
"template_args": {
"prefix": ""
Expand Down
41 changes: 21 additions & 20 deletions pkg/policies/opa/rego/aws/aws_security_group/AC_AWS_0227.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
{
"name": "port22OpenToInternet",
"file": "portOpenToInternet.rego",
"policy_type": "aws",
"resource_type": {
"aws_security_group": true
},
"template_args": {
"defaultValue": "<cidr>",
"name": "port22OpenToInternet",
"portNumber": 22,
"prefix": "",
"protocol": "tcp",
"suffix": ""
},
"severity": "HIGH",
"description": "Security Groups - Unrestricted Specific Ports - (SSH,22)",
"reference_id": "AC_AWS_0227",
"category": "Infrastructure Security",
"version": 2,
"id": "AC_AWS_0227"
"name": "port22OpenToInternet",
"file": "portOpenToInternet.rego",
"policy_type": "aws",
"resource_type": {
"aws_security_group": true,
"aws_security_group_rule": true
},
"template_args": {
"defaultValue": "<cidr>",
"name": "port22OpenToInternet",
"portNumber": 22,
"prefix": "",
"protocol": "tcp",
"suffix": ""
},
"severity": "HIGH",
"description": "Security Groups - Unrestricted Specific Ports - (SSH,22)",
"reference_id": "AC_AWS_0227",
"category": "Infrastructure Security",
"version": 2,
"id": "AC_AWS_0227"
}
41 changes: 21 additions & 20 deletions pkg/policies/opa/rego/aws/aws_security_group/AC_AWS_0228.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
{
"name": "port80OpenToInternet",
"file": "portOpenToInternet.rego",
"policy_type": "aws",
"resource_type": {
"aws_security_group": true
},
"template_args": {
"defaultValue": "<cidr>",
"name": "port80OpenToInternet",
"portNumber": 80,
"prefix": "",
"protocol": "tcp",
"suffix": ""
},
"severity": "HIGH",
"description": "Security Groups - Unrestricted Specific Ports - (HTTP,80)",
"reference_id": "AC_AWS_0228",
"category": "Infrastructure Security",
"version": 2,
"id": "AC_AWS_0228"
"name": "port80OpenToInternet",
"file": "portOpenToInternet.rego",
"policy_type": "aws",
"resource_type": {
"aws_security_group": true,
"aws_security_group_rule": true
},
"template_args": {
"defaultValue": "<cidr>",
"name": "port80OpenToInternet",
"portNumber": 80,
"prefix": "",
"protocol": "tcp",
"suffix": ""
},
"severity": "HIGH",
"description": "Security Groups - Unrestricted Specific Ports - (HTTP,80)",
"reference_id": "AC_AWS_0228",
"category": "Infrastructure Security",
"version": 2,
"id": "AC_AWS_0228"
}
41 changes: 21 additions & 20 deletions pkg/policies/opa/rego/aws/aws_security_group/AC_AWS_0229.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
{
"name": "port443OpenToInternet",
"file": "portOpenToInternet.rego",
"policy_type": "aws",
"resource_type": {
"aws_security_group": true
},
"template_args": {
"defaultValue": "<cidr>",
"name": "port443OpenToInternet",
"portNumber": 443,
"prefix": "",
"protocol": "tcp",
"suffix": ""
},
"severity": "LOW",
"description": "Security Groups - Unrestricted Specific Ports - (HTTPS,443)",
"reference_id": "AC_AWS_0229",
"category": "Infrastructure Security",
"version": 2,
"id": "AC_AWS_0229"
"name": "port443OpenToInternet",
"file": "portOpenToInternet.rego",
"policy_type": "aws",
"resource_type": {
"aws_security_group": true,
"aws_security_group_rule": true
},
"template_args": {
"defaultValue": "<cidr>",
"name": "port443OpenToInternet",
"portNumber": 443,
"prefix": "",
"protocol": "tcp",
"suffix": ""
},
"severity": "LOW",
"description": "Security Groups - Unrestricted Specific Ports - (HTTPS,443)",
"reference_id": "AC_AWS_0229",
"category": "Infrastructure Security",
"version": 2,
"id": "AC_AWS_0229"
}
41 changes: 21 additions & 20 deletions pkg/policies/opa/rego/aws/aws_security_group/AC_AWS_0230.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
{
"name": "port3389OpenToInternet",
"file": "portOpenToInternet.rego",
"policy_type": "aws",
"resource_type": {
"aws_security_group": true
},
"template_args": {
"defaultValue": "<cidr>",
"name": "port3389OpenToInternet",
"portNumber": 3389,
"prefix": "",
"protocol": "tcp",
"suffix": ""
},
"severity": "HIGH",
"description": "Security Groups - Unrestricted Specific Ports - remote desktop port (TCP,3389)",
"reference_id": "AC_AWS_0230",
"category": "Infrastructure Security",
"version": 2,
"id": "AC_AWS_0230"
"name": "port3389OpenToInternet",
"file": "portOpenToInternet.rego",
"policy_type": "aws",
"resource_type": {
"aws_security_group": true,
"aws_security_group_rule": true
},
"template_args": {
"defaultValue": "<cidr>",
"name": "port3389OpenToInternet",
"portNumber": 3389,
"prefix": "",
"protocol": "tcp",
"suffix": ""
},
"severity": "HIGH",
"description": "Security Groups - Unrestricted Specific Ports - remote desktop port (TCP,3389)",
"reference_id": "AC_AWS_0230",
"category": "Infrastructure Security",
"version": 2,
"id": "AC_AWS_0230"
}
37 changes: 19 additions & 18 deletions pkg/policies/opa/rego/aws/aws_security_group/AC_AWS_0231.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
{
"name": "unrestrictedIngressAccess",
"file": "unrestrictedIngressAccess.rego",
"policy_type": "aws",
"resource_type": {
"aws_security_group": true
},
"template_args": {
"defaultValue": "<cidr>",
"name": "unrestrictedIngressAccess",
"prefix": "",
"suffix": ""
},
"severity": "HIGH",
"description": "Ensure no security groups allow ingress from 0.0.0.0/0 to ALL ports and protocols",
"reference_id": "AC_AWS_0231",
"category": "Infrastructure Security",
"version": 2,
"id": "AC_AWS_0231"
"name": "unrestrictedIngressAccess",
"file": "unrestrictedIngressAccess.rego",
"policy_type": "aws",
"resource_type": {
"aws_security_group": true,
"aws_security_group_rule": true
},
"template_args": {
"defaultValue": "<cidr>",
"name": "unrestrictedIngressAccess",
"prefix": "",
"suffix": ""
},
"severity": "HIGH",
"description": "Ensure no security groups allow ingress from 0.0.0.0/0 to ALL ports and protocols",
"reference_id": "AC_AWS_0231",
"category": "Infrastructure Security",
"version": 2,
"id": "AC_AWS_0231"
}
35 changes: 18 additions & 17 deletions pkg/policies/opa/rego/aws/aws_security_group/AC_AWS_0232.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"name": "defaultSGNotRestrictsAllTraffic",
"file": "defaultSGNotRestrictsAllTraffic.rego",
"policy_type": "aws",
"resource_type": {
"aws_security_group": true
},
"template_args": {
"name": "defaultSGNotRestrictsAllTraffic",
"prefix": "",
"suffix": ""
},
"severity": "HIGH",
"description": "Ensure no default security groups are used as they allow ingress from 0.0.0.0/0 to ALL ports and protocols",
"reference_id": "AC_AWS_0232",
"category": "Infrastructure Security",
"version": 2,
"id": "AC_AWS_0232"
"name": "defaultSGNotRestrictsAllTraffic",
"file": "defaultSGNotRestrictsAllTraffic.rego",
"policy_type": "aws",
"resource_type": {
"aws_security_group": true,
"aws_security_group_rule": true
},
"template_args": {
"name": "defaultSGNotRestrictsAllTraffic",
"prefix": "",
"suffix": ""
},
"severity": "HIGH",
"description": "Ensure no default security groups are used as they allow ingress from 0.0.0.0/0 to ALL ports and protocols",
"reference_id": "AC_AWS_0232",
"category": "Infrastructure Security",
"version": 2,
"id": "AC_AWS_0232"
}
Loading

0 comments on commit 8cd6ee1

Please sign in to comment.