From fe85e86a981dd5c4c01f777a6e6c158b6f524aca Mon Sep 17 00:00:00 2001 From: dimitryk1 Date: Thu, 15 May 2025 15:23:01 -0400 Subject: [PATCH 1/3] Create checkov.yml --- .github/workflows/checkov.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/checkov.yml diff --git a/.github/workflows/checkov.yml b/.github/workflows/checkov.yml new file mode 100644 index 000000000..10ac4d279 --- /dev/null +++ b/.github/workflows/checkov.yml @@ -0,0 +1,35 @@ +name: checkov +on: + pull_request: + push: + branches: + - main +jobs: + scan: + runs-on: ubuntu-latest + permissions: + contents: read # for actions/checkout to fetch code + security-events: write # for GitHub/codeql-action/upload-sarif to upload SARIF results + + steps: + - uses: actions/checkout@v2 + + - name: Run checkov + id: checkov + uses: bridgecrewio/checkov-action@master + with: + directory: code/ + #soft_fail: true + #api-key: ${{ secrets.BC_API_KEY }} + #env: + #PRISMA_API_URL: https://api4.prismacloud.io + + - name: Upload SARIF file + uses: GitHub/codeql-action/upload-sarif@v3 + + # Results are generated only on a success or failure + # this is required since GitHub by default won't run the next step + # when the previous one has failed. Alternatively, enable soft_fail in checkov action. + if: success() || failure() + with: + sarif_file: results.sarif From bac25a8484362639038e5eb7f906ce458aa1a29b Mon Sep 17 00:00:00 2001 From: dimitryk1 Date: Thu, 15 May 2025 17:14:40 -0400 Subject: [PATCH 2/3] Create s3.tf --- code/build/s3.tf | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 code/build/s3.tf diff --git a/code/build/s3.tf b/code/build/s3.tf new file mode 100644 index 000000000..158875e73 --- /dev/null +++ b/code/build/s3.tf @@ -0,0 +1,18 @@ +provider "aws" { + region = "us-west-2" +} + +resource "aws_s3_bucket" "dev_s3" { + bucket_prefix = "dev-" + + tags = { + Environment = "Dev" + } +} + +resource "aws_s3_bucket_ownership_controls" "dev_s3" { + bucket = aws_s3_bucket.dev_s3.id + rule { + object_ownership = "BucketOwnerPreferred" + } +} From a23c1a968aeabec188a0baff0461da34ff82c8c7 Mon Sep 17 00:00:00 2001 From: dimitryk1 Date: Thu, 15 May 2025 17:27:19 -0400 Subject: [PATCH 3/3] Update s3.tf --- code/build/s3.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/build/s3.tf b/code/build/s3.tf index 158875e73..ad4aa9b5c 100644 --- a/code/build/s3.tf +++ b/code/build/s3.tf @@ -6,7 +6,7 @@ resource "aws_s3_bucket" "dev_s3" { bucket_prefix = "dev-" tags = { - Environment = "Dev" + Environment = "Dev" } }