From 4a6754d21eb0f6df7d3749a0986cd7209129e121 Mon Sep 17 00:00:00 2001 From: Keanu Date: Thu, 20 Aug 2020 16:35:35 +0200 Subject: [PATCH] Added CodeQL. (#5) --- .github/codeql/codeql-config.yml | 6 ++++ .github/workflows/codeql-analysis.yml | 41 +++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 .github/codeql/codeql-config.yml create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml new file mode 100644 index 0000000..e3dae69 --- /dev/null +++ b/.github/codeql/codeql-config.yml @@ -0,0 +1,6 @@ +name: "CodeQL Config" + +queries: + - uses: security-and-quality +paths: + - dist diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..f22f74b --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,41 @@ +name: "CodeQL" + +on: + push: + branches: [typescript] + pull_request: + branches: [typescript] + schedule: + - cron: '0 5 * * 1' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 2 + + - run: git checkout HEAD^2 + if: ${{ github.event_name == 'pull_request' }} + + - name: Setup Node.JS + uses: actions/setup-node@v2-beta + with: + node-version: '12' + - run: npm ci + + - name: Build codebase + run: npm run build + + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + config-file: ./.github/codeql/codeql-config.yml + languages: javascript + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1