From 1fe1f4f9bc7bbcc69d718591c9a1f67041e6d80a Mon Sep 17 00:00:00 2001 From: "lgtm-com[bot]" <43144390+lgtm-com[bot]@users.noreply.github.com> Date: Wed, 9 Nov 2022 12:51:34 +0300 Subject: [PATCH] Add CodeQL workflow for GitHub code scanning (#39) https://github.com/temoto/robotstxt/pull/39 Co-authored-by: LGTM Migrator Co-authored-by: Sergey Shepelev --- .github/workflows/codeql.yml | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 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..718bed1 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,41 @@ +name: "CodeQL" + +on: + push: + pull_request: + schedule: + - cron: "3 14 * * 6" + +jobs: + analyze: + # https://github.community/t/duplicate-checks-on-push-and-pull-request-simultaneous-event/18012/5 + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ go ] + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + queries: +security-and-quality + + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{ matrix.language }}"