Skip to content

Commit

Permalink
Merge pull request #23 from honestbank/christian/da-3488-tfsec-ignore
Browse files Browse the repository at this point in the history
fix: Add tfsec ignore temporarily [DA-3488]
  • Loading branch information
ChristianWitts authored Jun 11, 2024
2 parents 610a574 + d470b1d commit bfc83b9
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/checkov.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: "Checkov GitHub Action"
permissions: read-all
on:
pull_request:
branches: [test, dev, qa, prod, main]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/semantic-pr.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "Semantic Pull Request"

permissions: read-all
on:
pull_request:
types:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/terraform-release-main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: "Terraform - Release"
permissions:
contents: write
on:
push:
branches: [main]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/terraform.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: "Terraform GitHub Action"
permissions: read-all
on:
pull_request:
branches: [test, dev, qa, prod, main]
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/terratest.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name: "Terratest GitHub Action"
permissions:
pull-requests: write
contents: write

on:
pull_request:
branches: [test, dev, qa, prod, main]
Expand Down
32 changes: 26 additions & 6 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,19 @@ provider "aws" {
###############################################################################
data "aws_iam_policy_document" "example" {
statement {
actions = ["ec2:Describe*"]
effect = "Allow"
resources = ["*"]
sid = "samplePassRole"

effect = "Allow"

actions = [
"s3:PutObject",
"s3:GetObject",
"s3:DeleteObject"
]

resources = [
"arn:aws:s3:::my_bucket/my_object"
]
}
}

Expand Down Expand Up @@ -78,9 +88,19 @@ module "test-user" {

data "aws_iam_policy_document" "example2" {
statement {
actions = ["ec2:Describe*"]
effect = "Allow"
resources = ["*"]
sid = "samplePassRole"

effect = "Allow"

actions = [
"s3:PutObject",
"s3:GetObject",
"s3:DeleteObject"
]

resources = [
"arn:aws:s3:::my_bucket/my_object"
]
}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/policy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ resource "aws_iam_policy" "policy" {

# Terraform's "jsonencode" function converts a
# Terraform expression result to valid JSON syntax.
policy = var.policy.policy
policy = var.policy.policy #tfsec:ignore:aws-iam-no-policy-wildcards

tags = merge({
createdBy = "terraform aws-iam/policy"
Expand Down

0 comments on commit bfc83b9

Please sign in to comment.