From 5d13129b3a8d236dbd2cf8ece1c6163d7e64174d Mon Sep 17 00:00:00 2001 From: Shiwei Zhang Date: Thu, 23 Jun 2022 23:30:44 +0800 Subject: [PATCH] Add CodeQL Security Scanning (#405) Signed-off-by: Shiwei Zhang --- .github/workflows/codeql-analysis.yml | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 000000000..f697ea039 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,36 @@ +name: CodeQL + +on: + push: + branches: main + pull_request: + branches: main + schedule: + - cron: '43 12 * * 6' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + strategy: + matrix: + go-version: [1.18] + fail-fast: false + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Set up Go ${{ matrix.go-version }} environment + uses: actions/setup-go@v3 + with: + go-version: ${{ matrix.go-version }} + check-latest: true + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: go + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2