From 1b29643c2c65ddb1c2ab49ffdb74c67bd0c21ea1 Mon Sep 17 00:00:00 2001 From: elyesntc <61362019+elyesntc@users.noreply.github.com> Date: Wed, 22 Oct 2025 16:43:12 +0100 Subject: [PATCH 1/3] Create checkov.yaml --- .github/workflows/checkov.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/checkov.yaml diff --git a/.github/workflows/checkov.yaml b/.github/workflows/checkov.yaml new file mode 100644 index 000000000..00e3ec636 --- /dev/null +++ b/.github/workflows/checkov.yaml @@ -0,0 +1,32 @@ +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 + + - 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 a02bbf147b25e516906d02b4e77160b504b9ee00 Mon Sep 17 00:00:00 2001 From: elyesntc <61362019+elyesntc@users.noreply.github.com> Date: Wed, 22 Oct 2025 16:58:36 +0100 Subject: [PATCH 2/3] Create gcs.tf --- code/build/gcs.tf | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 code/build/gcs.tf diff --git a/code/build/gcs.tf b/code/build/gcs.tf new file mode 100644 index 000000000..3204b6252 --- /dev/null +++ b/code/build/gcs.tf @@ -0,0 +1,21 @@ +provider "google" { + project = "qwiklabs-gcp-03-70428c3b7b6c" + region = "us-central1" +} + +resource "google_storage_bucket" "example" { + name = "demo-${random_id.rand_suffix.hex}" + location = "us-central1" + force_destroy = true + + uniform_bucket_level_access = false + public_access_prevention = "enforced" +} + +resource "random_id" "rand_suffix" { + byte_length = 4 +} + +output "bucket_name" { + value = google_storage_bucket.example.name +} From 30652531bfed34cc27e1f436cc2169572e1507cf Mon Sep 17 00:00:00 2001 From: elyesntc <61362019+elyesntc@users.noreply.github.com> Date: Wed, 22 Oct 2025 17:01:12 +0100 Subject: [PATCH 3/3] Delete code/build directory --- code/build/gcs.tf | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 code/build/gcs.tf diff --git a/code/build/gcs.tf b/code/build/gcs.tf deleted file mode 100644 index 3204b6252..000000000 --- a/code/build/gcs.tf +++ /dev/null @@ -1,21 +0,0 @@ -provider "google" { - project = "qwiklabs-gcp-03-70428c3b7b6c" - region = "us-central1" -} - -resource "google_storage_bucket" "example" { - name = "demo-${random_id.rand_suffix.hex}" - location = "us-central1" - force_destroy = true - - uniform_bucket_level_access = false - public_access_prevention = "enforced" -} - -resource "random_id" "rand_suffix" { - byte_length = 4 -} - -output "bucket_name" { - value = google_storage_bucket.example.name -}