From e4319dfac0b46865249bbed49a16708f8c8d125f Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 12 Dec 2022 15:33:56 -0500 Subject: [PATCH] Add CodeQL workflow I saw this as part of https://securityscorecards.dev/ which was linked from https://internals.rust-lang.org/t/security-enhancement-scorecard-github-action --- .github/workflows/codeql.yaml | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/codeql.yaml diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml new file mode 100644 index 0000000000..cebf59e209 --- /dev/null +++ b/.github/workflows/codeql.yaml @@ -0,0 +1,36 @@ + +name: "CodeQL" + +on: + push: + branches: [main] + pull_request: + branches: [main] + schedule: + - cron: '30 1 * * 0' + +jobs: + CodeQL: + runs-on: ubuntu-latest + + permissions: + # required for all workflows + security-events: write + actions: read + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: cpp + + - name: Build + run: ./ci/build.sh + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2