aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/codeql/codeql-config.yml5
-rw-r--r--.github/codeql/lgtm.qls4
-rw-r--r--.github/workflows/codeql-analysis.yml31
3 files changed, 40 insertions, 0 deletions
diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml
new file mode 100644
index 0000000..9b14488
--- /dev/null
+++ b/.github/codeql/codeql-config.yml
@@ -0,0 +1,5 @@
+queries:
+ - uses: ./.github/codeql/lgtm.qls
+
+paths-ignore:
+ - 'test cases'
diff --git a/.github/codeql/lgtm.qls b/.github/codeql/lgtm.qls
new file mode 100644
index 0000000..9befc76
--- /dev/null
+++ b/.github/codeql/lgtm.qls
@@ -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
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
new file mode 100644
index 0000000..c152647
--- /dev/null
+++ b/.github/workflows/codeql-analysis.yml
@@ -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