|
| 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 | +# |
| 7 | +# ******** NOTE ******** |
| 8 | +# We have attempted to detect the languages in your repository. Please check |
| 9 | +# the `language` matrix defined below to confirm you have the correct set of |
| 10 | +# supported CodeQL languages. |
| 11 | +# |
1 | 12 | name: "CodeQL"
|
2 | 13 |
|
3 | 14 | on:
|
4 | 15 | push:
|
5 |
| - branches: [master] |
| 16 | + branches: [main] |
6 | 17 | pull_request:
|
7 | 18 | # The branches below must be a subset of the branches above
|
8 |
| - branches: [master] |
| 19 | + branches: [main] |
9 | 20 | schedule:
|
10 |
| - - cron: "0 4 * * 1" |
| 21 | + - cron: "20 21 * * 5" |
11 | 22 |
|
12 | 23 | jobs:
|
13 | 24 | analyze:
|
14 | 25 | name: Analyze
|
15 | 26 | runs-on: ubuntu-latest
|
| 27 | + permissions: |
| 28 | + actions: read |
| 29 | + contents: read |
| 30 | + security-events: write |
16 | 31 |
|
17 | 32 | strategy:
|
18 | 33 | fail-fast: false
|
19 | 34 | matrix:
|
20 |
| - # Override automatic language detection by changing the below list |
21 |
| - # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] |
22 | 35 | language: ["python"]
|
23 |
| - # Learn more... |
24 |
| - # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection |
| 36 | + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] |
| 37 | + # Learn more: |
| 38 | + # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed |
25 | 39 |
|
26 | 40 | steps:
|
27 | 41 | - name: Checkout repository
|
28 | 42 | uses: actions/checkout@v2
|
29 |
| - with: |
30 |
| - # We must fetch at least the immediate parents so that if this is |
31 |
| - # a pull request then we can checkout the head. |
32 |
| - fetch-depth: 2 |
33 |
| - |
34 |
| - # If this run was triggered by a pull request event, then checkout |
35 |
| - # the head of the pull request instead of the merge commit. |
36 |
| - - run: git checkout HEAD^2 |
37 |
| - if: ${{ github.event_name == 'pull_request' }} |
38 | 43 |
|
39 | 44 | # Initializes the CodeQL tools for scanning.
|
40 | 45 | - name: Initialize CodeQL
|
|
0 commit comments