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 example module #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add example module #3

wants to merge 1 commit into from

Conversation

achiar99
Copy link
Owner

No description provided.

Copy link

@bridgecrew-staging bridgecrew-staging bot left a comment

Choose a reason for hiding this comment

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

Bridgecrew has found infrastructure configuration errors in this PR ⬇️

@@ -0,0 +1,26 @@


resource "aws_security_group" "sg" {
Copy link

@bridgecrew-staging bridgecrew-staging bot Jan 27, 2022

Choose a reason for hiding this comment

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

LOW   Ensure every Security Group rule has a description
    Resource: aws_security_group.sg | ID: BC_AWS_NETWORKING_31

Description

Descriptions can be up to 255 characters long and can be set and viewed from the AWS Management Console, AWS Command Line Interface (CLI), and the AWS APIs.

We recommend you add descriptive text to each of your Security Group Rules clarifying each rule's goals, this helps prevent developer errors.

Benchmarks

  • ISO27001 A.10.1.1
  • SOC2 CC6.3.3

@@ -0,0 +1,26 @@


resource "aws_security_group" "sg" {
Copy link

@bridgecrew-staging bridgecrew-staging bot Jan 27, 2022

Choose a reason for hiding this comment

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

CRITICAL   Ensure AWS Security Group does not allow all traffic on SSH port 22
    Resource: aws_security_group.sg | ID: BC_AWS_NETWORKING_1

Description

Security groups are stateful and provide filtering of ingress/egress network traffic to AWS resources. We recommend that security groups do not allow unrestricted ingress access to port 22. Removing unfettered connectivity to remote console services, such as SSH, reduces a server's exposure to risk.

Benchmarks

  • FEDRAMP (MODERATE) SC-7(3), SC-7, AC-4
  • CIS AWS V1.3 5.2
  • CIS AWS V1.2 4.1
  • ISO27001 A.10.1.1
  • NIST-800-53 SC-2, CM-3, CA-9, CA-3, AC-17
  • HIPAA 164.312(E)(1)
  • PCI-DSS V3.2 2
  • PCI-DSS V3.2.1 2.2.2, 1.3, 1.2.1
  • SOC2 CC6.3.3

@@ -0,0 +1,26 @@


resource "aws_security_group" "sg" {
Copy link

@bridgecrew-staging bridgecrew-staging bot Jan 27, 2022

Choose a reason for hiding this comment

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

LOW   Ensure Security Groups are attached to EC2 instances or ENIs
    Resource: aws_security_group.sg | ID: BC_AWS_NETWORKING_51

How to Fix

resource "aws_network_interface" "test" {
  subnet_id       = "aws_subnet.public_a.id"
  security_groups = [aws_security_group.ok_sg.id]
}

resource "aws_instance" "test" {
  ami           = "data.aws_ami.ubuntu.id"
  instance_type = "t3.micro"
  security_groups = [aws_security_group.ok_sg.id]
}

resource "aws_security_group" "ok_sg" {
  ingress {
    description = "TLS from VPC"
    from_port   = 443
    to_port     = 443
    protocol    = "tcp"
    cidr_blocks = 0.0.0.0/0
  }
}

Description

A check to ensure that orphaned Security groups aren't created. Elastic Network Interfaces (ENIs). This checks that Security Groups are attached to provisioning resources.

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.

2 participants