|
| 1 | +--- |
1 | 2 | # For most projects, this workflow file will not need changing; you simply need
|
2 | 3 | # to commit it to your repository.
|
3 | 4 | #
|
4 | 5 | # You may wish to alter this file to override the set of languages analyzed,
|
5 | 6 | # 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 |
| -# |
12 |
| -name: "CodeQL" |
| 7 | +name: CodeQL |
13 | 8 |
|
14 | 9 | on:
|
15 | 10 | push:
|
16 |
| - branches: [ main ] |
| 11 | + # Dependabot triggered push events have read-only access, but uploading code |
| 12 | + # scanning requires write access. |
| 13 | + branches-ignore: |
| 14 | + - dependabot/** |
17 | 15 | pull_request:
|
18 | 16 | # The branches below must be a subset of the branches above
|
19 |
| - branches: [ main ] |
| 17 | + branches-ignore: |
| 18 | + - dependabot/** |
20 | 19 | schedule:
|
21 |
| - - cron: '37 2 * * 4' |
| 20 | + - cron: '0 14 * * 6' |
22 | 21 |
|
23 | 22 | jobs:
|
| 23 | + diagnostics: |
| 24 | + name: Run diagnostics |
| 25 | + runs-on: ubuntu-latest |
| 26 | + steps: |
| 27 | + # Note that a duplicate of this step must be added at the top of |
| 28 | + # each job. |
| 29 | + - id: harden-runner |
| 30 | + name: Harden the runner |
| 31 | + uses: step-security/harden-runner@v2 |
| 32 | + with: |
| 33 | + egress-policy: audit |
| 34 | + - id: github-status |
| 35 | + name: Check GitHub status |
| 36 | + uses: crazy-max/ghaction-github-status@v3 |
| 37 | + - id: dump-context |
| 38 | + name: Dump context |
| 39 | + uses: crazy-max/ghaction-dump-context@v2 |
24 | 40 | analyze:
|
25 | 41 | name: Analyze
|
| 42 | + needs: |
| 43 | + - diagnostics |
26 | 44 | runs-on: ubuntu-latest
|
27 |
| - |
| 45 | + permissions: |
| 46 | + # required for all workflows |
| 47 | + security-events: write |
28 | 48 | strategy:
|
29 | 49 | fail-fast: false
|
30 | 50 | matrix:
|
31 |
| - language: [ 'python' ] |
32 |
| - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] |
33 |
| - # Learn more: |
34 |
| - # 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 |
| 51 | + # Override automatic language detection by changing the below list |
| 52 | + # Supported options are go, javascript, csharp, python, cpp, and java |
| 53 | + language: |
| 54 | + - python |
| 55 | + # Learn more... |
| 56 | + # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection |
35 | 57 |
|
36 | 58 | steps:
|
37 |
| - - name: Checkout repository |
38 |
| - uses: actions/checkout@v2 |
| 59 | + - id: harden-runner |
| 60 | + name: Harden the runner |
| 61 | + uses: step-security/harden-runner@v2 |
| 62 | + with: |
| 63 | + egress-policy: audit |
| 64 | + |
| 65 | + - name: Checkout repository |
| 66 | + uses: actions/checkout@v4 |
39 | 67 |
|
40 |
| - # Initializes the CodeQL tools for scanning. |
41 |
| - - name: Initialize CodeQL |
42 |
| - uses: github/codeql-action/init@v1 |
43 |
| - with: |
44 |
| - languages: ${{ matrix.language }} |
45 |
| - # If you wish to specify custom queries, you can do so here or in a config file. |
46 |
| - # By default, queries listed here will override any specified in a config file. |
47 |
| - # Prefix the list here with "+" to use these queries and those in the config file. |
48 |
| - # queries: ./path/to/local/query, your-org/your-repo/queries@main |
| 68 | + # Initializes the CodeQL tools for scanning. |
| 69 | + - name: Initialize CodeQL |
| 70 | + uses: github/codeql-action/init@v2 |
| 71 | + with: |
| 72 | + languages: ${{ matrix.language }} |
49 | 73 |
|
50 |
| - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). |
51 |
| - # If this step fails, then you should remove it and run the build manually (see below) |
52 |
| - - name: Autobuild |
53 |
| - uses: github/codeql-action/autobuild@v1 |
| 74 | + # Autobuild attempts to build any compiled languages (C/C++, C#, or |
| 75 | + # Java). If this step fails, then you should remove it and run the build |
| 76 | + # manually (see below). |
| 77 | + - name: Autobuild |
| 78 | + uses: github/codeql-action/autobuild@v2 |
54 | 79 |
|
55 |
| - # ℹ️ Command-line programs to run using the OS shell. |
56 |
| - # 📚 https://git.io/JvXDl |
| 80 | + # ℹ️ Command-line programs to run using the OS shell. |
| 81 | + # 📚 https://git.io/JvXDl |
57 | 82 |
|
58 |
| - # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines |
59 |
| - # and modify them (or add more) to build your code if your project |
60 |
| - # uses a compiled language |
| 83 | + # ✏️ If the Autobuild fails above, remove it and uncomment the following |
| 84 | + # three lines and modify them (or add more) to build your code if your |
| 85 | + # project uses a compiled language |
61 | 86 |
|
62 |
| - #- run: | |
63 |
| - # make bootstrap |
64 |
| - # make release |
| 87 | + # - run: | |
| 88 | + # make bootstrap |
| 89 | + # make release |
65 | 90 |
|
66 |
| - - name: Perform CodeQL Analysis |
67 |
| - uses: github/codeql-action/analyze@v1 |
| 91 | + - name: Perform CodeQL Analysis |
| 92 | + uses: github/codeql-action/analyze@v2 |
0 commit comments