From e212cc76078c1f4940456c7a0ae9f1ba6e0859be Mon Sep 17 00:00:00 2001 From: Alexandre Forestier <69115925+AlxFrst@users.noreply.github.com> Date: Thu, 18 Apr 2024 12:22:11 +0200 Subject: [PATCH] Create codeql.yml --- .github/workflows/codeql.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..ecea5e3 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,31 @@ +name: Kubelinter on Dev Branch + +on: + push: + branches: + - main + +jobs: + kubelinter: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install Kubelinter + run: | + curl -Lo kubelinter.tar.gz https://github.com/stackrox/kube-linter/releases/latest/download/kube-linter-linux.tar.gz + tar -xzf kubelinter.tar.gz + chmod +x kube-linter + sudo mv kube-linter /usr/local/bin/ + + - name: lint and post a sarif report + run: | + kube-linter lint --output-format=sarif --output kube-linter-report.sarif + continue-on-error: true + + - name: Upload SARIF report + uses: github/codeql-action/upload-sarif@v3 + with: + sarif_file: kube-linter-report.sarif