Debian Codegraph @

.github/workflows/codeql-analysis.yml

raw
1 # 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.
6 name: "CodeQL"
7
8 on:
9 push:
10 branches: [main]
11 pull_request:
12 # The branches below must be a subset of the branches above
13 branches: [main]
14 schedule:
15 - cron: '0 23 * * 0'
16
17 permissions:
18 contents: read
19
20 jobs:
21 analyze:
22 permissions:
23 actions: read # for github/codeql-action/init to get workflow details
24 contents: read # for actions/checkout to fetch code
25 security-events: write # for github/codeql-action/autobuild to send a status report
26 name: Analyze
27 runs-on: ubuntu-latest
28
29 strategy:
30 fail-fast: false
31
32
33 steps:
34 - name: Checkout repository
35 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
36 with:
37 # We must fetch at least the immediate parents so that if this is
38 # a pull request then we can checkout the head.
39 fetch-depth: 2
40 persist-credentials: false
41
42 # If this run was triggered by a pull request event, then checkout
43 # the head of the pull request instead of the merge commit.
44 - run: git checkout HEAD^2
45 if: ${{ github.event_name == 'pull_request' }}
46
47 # Initializes the CodeQL tools for scanning.
48 - name: Initialize CodeQL
49 uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
50 with:
51 languages: "python"
52 # If you wish to specify custom queries, you can do so here or in a config file.
53 # By default, queries listed here will override any specified in a config file.
54 # Prefix the list here with "+" to use these queries and those in the config file.
55 # queries: ./path/to/local/query, your-org/your-repo/queries@main
56
57 # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
58 # If this step fails, then you should remove it and run the build manually (see below)
59 - name: Autobuild
60 uses: github/codeql-action/autobuild@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
61
62 # â„šī¸ Command-line programs to run using the OS shell.
63 # 📚 https://git.io/JvXDl
64
65 # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines
66 # and modify them (or add more) to build your code if your project
67 # uses a compiled language
68
69 #- run: |
70 # make bootstrap
71 # make release
72
73 - name: Perform CodeQL Analysis
74 uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1