blob: d84920b22e02a8035814594ab604a92b123b8104 [file] [log] [blame]
Bram Moolenaarfa79be62020-10-02 10:29:45 +02001# For most projects, this workflow file will not need changing; you simply need
2# to commit it to your repository.
3#
4# You may wish to alter this file to override the set of languages analyzed,
5# or to provide custom queries or build logic.
6name: "CodeQL"
7
8on:
9 push:
10 branches: [master]
11 pull_request:
12 # The branches below must be a subset of the branches above
13 branches: [master]
14 schedule:
15 - cron: '0 18 * * 1'
16
Yegappan Lakshmanan7f4a6282021-12-25 11:20:30 +000017# Cancels all previous workflow runs for pull requests that have not completed.
18concurrency:
19 # The concurrency group contains the workflow name and the branch name for
20 # pull requests or the commit hash for any other events.
21 group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
22 cancel-in-progress: true
23
Alex311df6b2022-09-26 15:52:46 +010024permissions:
25 contents: read # to fetch code (actions/checkout)
26
Bram Moolenaarfa79be62020-10-02 10:29:45 +020027jobs:
28 analyze:
Alex311df6b2022-09-26 15:52:46 +010029 permissions:
30 contents: read # to fetch code (actions/checkout)
31 security-events: write # (github/codeql-action/autobuild)
32
Bram Moolenaarfa79be62020-10-02 10:29:45 +020033 name: Analyze
34 runs-on: ubuntu-latest
35
36 strategy:
37 fail-fast: false
38 matrix:
39 # Override automatic language detection by changing the below list
40 # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
41 language: ['cpp', 'python']
42 # Learn more...
43 # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
44
45 steps:
Philip Hbfaa24f2022-06-01 21:26:34 +010046 - name: Checkout repository from github
dependabot[bot]213c3232023-09-11 19:43:33 +020047 uses: actions/checkout@v4
Bram Moolenaarfa79be62020-10-02 10:29:45 +020048
Bram Moolenaarfa79be62020-10-02 10:29:45 +020049 # Initializes the CodeQL tools for scanning.
50 - name: Initialize CodeQL
dependabot[bot]ec497572023-12-18 07:30:50 +000051 uses: github/codeql-action/init@v3
Bram Moolenaarfa79be62020-10-02 10:29:45 +020052 with:
53 languages: ${{ matrix.language }}
54 # If you wish to specify custom queries, you can do so here or in a config file.
Bram Moolenaar89a9c152021-08-29 21:55:35 +020055 # By default, queries listed here will override any specified in a config file.
Bram Moolenaarfa79be62020-10-02 10:29:45 +020056 # Prefix the list here with "+" to use these queries and those in the config file.
57 # queries: ./path/to/local/query, your-org/your-repo/queries@main
58
59 # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
60 # If this step fails, then you should remove it and run the build manually (see below)
61 - name: Autobuild
dependabot[bot]ec497572023-12-18 07:30:50 +000062 uses: github/codeql-action/autobuild@v3
Bram Moolenaarfa79be62020-10-02 10:29:45 +020063
64 # â„šī¸ Command-line programs to run using the OS shell.
65 # 📚 https://git.io/JvXDl
66
67 # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines
68 # and modify them (or add more) to build your code if your project
69 # uses a compiled language
70
71 #- run: |
72 # make bootstrap
73 # make release
74
75 - name: Perform CodeQL Analysis
dependabot[bot]ec497572023-12-18 07:30:50 +000076 uses: github/codeql-action/analyze@v3