Create codeql-analysis.yml
Pixis authored 3 years ago
GitHub committed 3 years ago
0 | # For most projects, this workflow file will not need changing; you simply need | |
1 | # to commit it to your repository. | |
2 | # | |
3 | # You may wish to alter this file to override the set of languages analyzed, | |
4 | # or to provide custom queries or build logic. | |
5 | name: "CodeQL" | |
6 | ||
7 | on: | |
8 | push: | |
9 | branches: [master] | |
10 | pull_request: | |
11 | # The branches below must be a subset of the branches above | |
12 | branches: [master] | |
13 | schedule: | |
14 | - cron: '0 17 * * 4' | |
15 | ||
16 | jobs: | |
17 | analyze: | |
18 | name: Analyze | |
19 | runs-on: ubuntu-latest | |
20 | ||
21 | strategy: | |
22 | fail-fast: false | |
23 | matrix: | |
24 | # Override automatic language detection by changing the below list | |
25 | # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] | |
26 | language: ['python'] | |
27 | # Learn more... | |
28 | # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection | |
29 | ||
30 | steps: | |
31 | - name: Checkout repository | |
32 | uses: actions/checkout@v2 | |
33 | with: | |
34 | # We must fetch at least the immediate parents so that if this is | |
35 | # a pull request then we can checkout the head. | |
36 | fetch-depth: 2 | |
37 | ||
38 | # If this run was triggered by a pull request event, then checkout | |
39 | # the head of the pull request instead of the merge commit. | |
40 | - run: git checkout HEAD^2 | |
41 | if: ${{ github.event_name == 'pull_request' }} | |
42 | ||
43 | # Initializes the CodeQL tools for scanning. | |
44 | - name: Initialize CodeQL | |
45 | uses: github/codeql-action/init@v1 | |
46 | with: | |
47 | languages: ${{ matrix.language }} | |
48 | # If you wish to specify custom queries, you can do so here or in a config file. | |
49 | # By default, queries listed here will override any specified in a config file. | |
50 | # Prefix the list here with "+" to use these queries and those in the config file. | |
51 | # queries: ./path/to/local/query, your-org/your-repo/queries@main | |
52 | ||
53 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | |
54 | # If this step fails, then you should remove it and run the build manually (see below) | |
55 | - name: Autobuild | |
56 | uses: github/codeql-action/autobuild@v1 | |
57 | ||
58 | # âšī¸ Command-line programs to run using the OS shell. | |
59 | # đ https://git.io/JvXDl | |
60 | ||
61 | # âī¸ If the Autobuild fails above, remove it and uncomment the following three lines | |
62 | # and modify them (or add more) to build your code if your project | |
63 | # uses a compiled language | |
64 | ||
65 | #- run: | | |
66 | # make bootstrap | |
67 | # make release | |
68 | ||
69 | - name: Perform CodeQL Analysis | |
70 | uses: github/codeql-action/analyze@v1 |