From c8b473daa8c4d5117a01e2c88130a384edfebc1b Mon Sep 17 00:00:00 2001 From: pmacius Date: Mon, 23 Sep 2024 15:47:53 +0200 Subject: [PATCH 1/3] OPSEXP-2121 Add kics scan --- .github/workflows/kics.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/kics.yml diff --git a/.github/workflows/kics.yml b/.github/workflows/kics.yml new file mode 100644 index 00000000..661b54df --- /dev/null +++ b/.github/workflows/kics.yml @@ -0,0 +1,27 @@ +name: kics + +on: + pull_request: + branches: [main] + +permissions: + pull-requests: write + +jobs: + kics: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - name: run kics Scan + uses: checkmarx/kics-github-action@530ac1f8efe6202b0f12c9a6e952597ae707b755 # v2.1.2 + with: + path: 'charts' + ignore_on_exit: results + output_path: report-dir/ + output_formats: 'sarif' + token: ${{ secrets.GITHUB_TOKEN }} + enable_comments: true + - name: Upload SARIF file + uses: github/codeql-action/upload-sarif@323f5ef653b88011bf10e9a0a56d70d742463c9a # v3.26.8 + with: + sarif_file: report-dir/results.sarif From be87bb9379c2998ab8122db665e6678a3d4baf7f Mon Sep 17 00:00:00 2001 From: pmacius Date: Wed, 25 Sep 2024 15:18:14 +0200 Subject: [PATCH 2/3] fix --- .github/workflows/kics.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/kics.yml b/.github/workflows/kics.yml index 661b54df..e1aaf225 100644 --- a/.github/workflows/kics.yml +++ b/.github/workflows/kics.yml @@ -3,6 +3,14 @@ name: kics on: pull_request: branches: [main] + paths: + - 'charts/**' + - '.github/workflows/kics.yml' + push: + branches: [main] + paths: + - 'charts/**' + - '.github/workflows/kics.yml' permissions: pull-requests: write @@ -12,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - - name: run kics Scan + - name: Run KICS Scan uses: checkmarx/kics-github-action@530ac1f8efe6202b0f12c9a6e952597ae707b755 # v2.1.2 with: path: 'charts' @@ -20,7 +28,9 @@ jobs: output_path: report-dir/ output_formats: 'sarif' token: ${{ secrets.GITHUB_TOKEN }} - enable_comments: true + enable_jobs_summary: true + platform_type: 'kubernetes' + disable_secrets: true - name: Upload SARIF file uses: github/codeql-action/upload-sarif@323f5ef653b88011bf10e9a0a56d70d742463c9a # v3.26.8 with: From 630775fcffeb451e2ed30986521b5a4f28c12634 Mon Sep 17 00:00:00 2001 From: pmacius Date: Thu, 26 Sep 2024 09:10:45 +0200 Subject: [PATCH 3/3] fix --- .github/workflows/kics.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kics.yml b/.github/workflows/kics.yml index e1aaf225..eaf04dee 100644 --- a/.github/workflows/kics.yml +++ b/.github/workflows/kics.yml @@ -13,7 +13,7 @@ on: - '.github/workflows/kics.yml' permissions: - pull-requests: write + security-events: write jobs: kics: