From c8ae0ca11a8c61f5e29e05d95feb823dbabb25e2 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Thu, 27 Oct 2022 09:36:17 -0700 Subject: Add CodeQL workflow CodeQL is a static analyzer from github with a very low false positive rate. We have long wanted to have static analysis runs done on every pull request and using CodeQL, we can. Reviewed-by: Brian Behlendorf Reviewed-by: George Melikov Reviewed-by: Andrew Innes Signed-off-by: Richard Yao Closes #14087 --- .github/workflows/codeql.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/codeql.yml (limited to '.github') diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 000000000..c8a49a7f0 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,36 @@ +name: "CodeQL" + +on: + push: + pull_request: + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'cpp', 'python' ] + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{matrix.language}}" -- cgit v1.2.3