Add github's CodeQL scanner to CI.

lgtm.com was acquired by github. It is deprecated and on its way out,
because they've integrated the functionality itself into github. Take a
look at what its official replacement can do.

This does run as yet another Actions slot, which is already fairly
excessive, but the average runtime seems about 5 minutes so that's not
too bad...
pull/10747/head
Eli Schwartz 2 years ago committed by Dylan Baker
parent 81d7c24a59
commit 5022fd30e1
  1. 5
      .github/codeql/codeql-config.yml
  2. 4
      .github/codeql/lgtm.qls
  3. 31
      .github/workflows/codeql-analysis.yml

@ -0,0 +1,5 @@
queries:
- uses: ./.github/codeql/lgtm.qls
paths-ignore:
- 'test cases'

@ -0,0 +1,4 @@
# for some reason this doesn't work by default any way I can see
- import: codeql-suites/python-lgtm.qls
from: codeql/python-queries

@ -0,0 +1,31 @@
name: "CodeQL"
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
analyze:
# lgtm.com does not run in forks, for good reason
if: github.repository == 'mesonbuild/meson'
name: Analyze
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
config-file: .github/codeql/codeql-config.yml
languages: python
# we have none
setup-python-dependencies: false
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
Loading…
Cancel
Save