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

Create s3.tf #35

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

Create s3.tf #35

wants to merge 1 commit into from

Conversation

ayala-orca
Copy link
Collaborator

No description provided.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
failed Failed Infrastructure as Code high 10  medium 6  low 0  info 0
passed Passed Vulnerabilities high 0  medium 0  low 0  info 0
passed Passed Secrets high 0  medium 0  low 0  info 0

Copy link
Contributor

@jit-ci jit-ci bot left a comment

Choose a reason for hiding this comment

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

❌ Jit has detected 5 important findings in this PR that you should review.
The findings are detailed below as separate comments.
It’s highly recommended that you fix these security issues before merge.

})
}

resource "aws_s3_bucket_object" "data_object" {
Copy link
Contributor

Choose a reason for hiding this comment

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

Security control: Iac Misconfig Detection Terraform

Type: S3 Bucket Object Should Have Server-Side Encryption Enabled

Description: S3 Bucket Object should have server-side encryption enabled

Severity: HIGH

Learn more about this issue

Fix suggestion:

This fix suggestion was generated by Jit. Please note that the suggestion might not always fit every use case. It is highly recommended that you check and review it before merging.

Suggestion guidelines

S3 Bucket Object should have server-side encryption enabled . This can be achieved by adding the enable server_side_encryption key.

Suggested change
resource "aws_s3_bucket_object" "data_object" {
resource "aws_s3_bucket_object" "data_object" {
server_side_encryption = "AES256"

Jit Bot commands and options (e.g., ignore issue)

You can trigger Jit actions by commenting on this PR review:

  • #jit_ignore_fp Ignore and mark this specific single instance of finding as “False Positive”
  • #jit_ignore_accept Ignore and mark this specific single instance of finding as “Accept Risk”
  • #jit_undo_ignore Undo ignore command

@@ -0,0 +1,141 @@
resource "aws_s3_bucket" "data" {
Copy link
Contributor

Choose a reason for hiding this comment

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

Security control: Iac Misconfig Detection Terraform

Type: If Algorithm Is Aes256 Then The Master Key Is Null, Empty Or Undefined, Otherwise The Master Key Is Required

Description: If algorithm is AES256 then the master key is null, empty or undefined, otherwise the master key is required

Severity: HIGH

Learn more about this issue

Fix suggestion:

This fix suggestion was generated by Jit. Please note that the suggestion might not always fit every use case. It is highly recommended that you check and review it before merging.

Suggestion guidelines

You can encrypt buckets by simply set the server_side_encryption attribute to AES256 in the config. The AES256 encryption method does not required mater key so it standalone in the config.

Suggested change
resource "aws_s3_bucket" "data" {
resource "aws_s3_bucket" "data" {
server_side_encryption_configuration {
rule {
apply_server_side_encryption_by_default {
sse_algorithm = "AES256"
}
}
}

Jit Bot commands and options (e.g., ignore issue)

You can trigger Jit actions by commenting on this PR review:

  • #jit_ignore_fp Ignore and mark this specific single instance of finding as “False Positive”
  • #jit_ignore_accept Ignore and mark this specific single instance of finding as “Accept Risk”
  • #jit_undo_ignore Undo ignore command

})
}

resource "aws_s3_bucket" "data_science" {
Copy link
Contributor

Choose a reason for hiding this comment

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

Security control: Iac Misconfig Detection Terraform

Type: If Algorithm Is Aes256 Then The Master Key Is Null, Empty Or Undefined, Otherwise The Master Key Is Required

Description: If algorithm is AES256 then the master key is null, empty or undefined, otherwise the master key is required

Severity: HIGH

Learn more about this issue

Fix suggestion:

This fix suggestion was generated by Jit. Please note that the suggestion might not always fit every use case. It is highly recommended that you check and review it before merging.

Suggestion guidelines

You can encrypt buckets by simply set the server_side_encryption attribute to AES256 in the config. The AES256 encryption method does not required mater key so it standalone in the config.

Suggested change
resource "aws_s3_bucket" "data_science" {
resource "aws_s3_bucket" "data_science" {
server_side_encryption_configuration {
rule {
apply_server_side_encryption_by_default {
sse_algorithm = "AES256"
}
}
}

Jit Bot commands and options (e.g., ignore issue)

You can trigger Jit actions by commenting on this PR review:

  • #jit_ignore_fp Ignore and mark this specific single instance of finding as “False Positive”
  • #jit_ignore_accept Ignore and mark this specific single instance of finding as “Accept Risk”
  • #jit_undo_ignore Undo ignore command


}

resource "aws_s3_bucket" "operations" {
Copy link
Contributor

Choose a reason for hiding this comment

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

Security control: Iac Misconfig Detection Terraform

Type: If Algorithm Is Aes256 Then The Master Key Is Null, Empty Or Undefined, Otherwise The Master Key Is Required

Description: If algorithm is AES256 then the master key is null, empty or undefined, otherwise the master key is required

Severity: HIGH

Learn more about this issue

Fix suggestion:

This fix suggestion was generated by Jit. Please note that the suggestion might not always fit every use case. It is highly recommended that you check and review it before merging.

Suggestion guidelines

You can encrypt buckets by simply set the server_side_encryption attribute to AES256 in the config. The AES256 encryption method does not required mater key so it standalone in the config.

Suggested change
resource "aws_s3_bucket" "operations" {
resource "aws_s3_bucket" "operations" {
server_side_encryption_configuration {
rule {
apply_server_side_encryption_by_default {
sse_algorithm = "AES256"
}
}
}

Jit Bot commands and options (e.g., ignore issue)

You can trigger Jit actions by commenting on this PR review:

  • #jit_ignore_fp Ignore and mark this specific single instance of finding as “False Positive”
  • #jit_ignore_accept Ignore and mark this specific single instance of finding as “Accept Risk”
  • #jit_undo_ignore Undo ignore command

})
}

resource "aws_s3_bucket" "financials" {
Copy link
Contributor

Choose a reason for hiding this comment

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

Security control: Iac Misconfig Detection Terraform

Type: If Algorithm Is Aes256 Then The Master Key Is Null, Empty Or Undefined, Otherwise The Master Key Is Required

Description: If algorithm is AES256 then the master key is null, empty or undefined, otherwise the master key is required

Severity: HIGH

Learn more about this issue

Fix suggestion:

This fix suggestion was generated by Jit. Please note that the suggestion might not always fit every use case. It is highly recommended that you check and review it before merging.

Suggestion guidelines

You can encrypt buckets by simply set the server_side_encryption attribute to AES256 in the config. The AES256 encryption method does not required mater key so it standalone in the config.

Suggested change
resource "aws_s3_bucket" "financials" {
resource "aws_s3_bucket" "financials" {
server_side_encryption_configuration {
rule {
apply_server_side_encryption_by_default {
sse_algorithm = "AES256"
}
}
}

Jit Bot commands and options (e.g., ignore issue)

You can trigger Jit actions by commenting on this PR review:

  • #jit_ignore_fp Ignore and mark this specific single instance of finding as “False Positive”
  • #jit_ignore_accept Ignore and mark this specific single instance of finding as “Accept Risk”
  • #jit_undo_ignore Undo ignore command

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
passed Passed Vulnerabilities high 0  medium 0  low 0  info 0
passed Passed Secrets high 0  medium 0  low 0  info 0

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
failed Failed Infrastructure as Code high 10  medium 6  low 0  info 0
passed Passed Vulnerabilities high 0  medium 0  low 0  info 0
passed Passed Secrets high 0  medium 0  low 0  info 0

Copy link
Collaborator Author

@ayala-orca ayala-orca left a comment

Choose a reason for hiding this comment

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

bla3

@@ -0,0 +1,141 @@
resource "aws_s3_bucket" "data" {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

bla

# bucket does not have versioning
bucket = "${local.resource_prefix.value}-data"
force_destroy = true
tags = merge({
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

bla2

resource "aws_s3_bucket" "data" {
# bucket is public
# bucket is not encrypted
# bucket does not have access logs
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

bb

git_file = "terraform/aws/s3.tf"
git_last_modified_at = "2020-06-16 14:46:24"
git_last_modified_by = "[email protected]"
git_modifiers = "nimrodkor"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

bbb

git_org = "bridgecrewio"
git_repo = "terragoat"
yor_trace = "a7f01cc7-63c2-41a8-8555-6665e5e39a64"
})
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

bbbb

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.

1 participant