From f1f6868a2c5950bead6a2a4d153b0ce985b62145 Mon Sep 17 00:00:00 2001 From: David Anson Date: Thu, 1 Oct 2020 21:18:35 -0700 Subject: [PATCH] Initialize GitHub code scanning workflow using security-and-quality suite. --- .github/codeql-config.yaml | 7 ++++++ .github/workflows/codeql-analysis.yml | 36 +++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 .github/codeql-config.yaml create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/codeql-config.yaml b/.github/codeql-config.yaml new file mode 100644 index 00000000..5b48037b --- /dev/null +++ b/.github/codeql-config.yaml @@ -0,0 +1,7 @@ +name: "CodeQL Config" + +queries: + - uses: security-and-quality + +paths-ignore: + - demo/markdownlint-browser.js diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 00000000..1fdeba37 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,36 @@ +name: "CodeQL" + +on: + pull_request: + push: + schedule: + - cron: '30 12 * * *' + workflow_dispatch: + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + language: ['javascript'] + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 2 + + - run: git checkout HEAD^2 + if: ${{ github.event_name == 'pull_request' }} + + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + config-file: ./.github/codeql-config.yaml + languages: ${{ matrix.language }} + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1