|
9 | 9 | schedule: |
10 | 10 | - cron: '0 15 * * 5' |
11 | 11 |
|
| 12 | +permissions: |
| 13 | + contents: read |
| 14 | + |
12 | 15 | jobs: |
13 | 16 | analyze: |
| 17 | + permissions: |
| 18 | + actions: read # for github/codeql-action/init to get workflow details |
| 19 | + contents: read # for actions/checkout to fetch code |
| 20 | + security-events: write # for github/codeql-action/autobuild to send a status report |
14 | 21 | name: Analyze |
15 | 22 | runs-on: ubuntu-latest |
16 | 23 |
|
|
24 | 31 | # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection |
25 | 32 |
|
26 | 33 | steps: |
| 34 | + - name: Harden Runner |
| 35 | + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 |
| 36 | + with: |
| 37 | + egress-policy: audit |
| 38 | + |
27 | 39 | - name: Checkout repository |
28 | | - uses: actions/checkout@v4 |
| 40 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
29 | 41 | with: |
30 | 42 | # We must fetch at least the immediate parents so that if this is |
31 | 43 | # a pull request then we can checkout the head. |
|
38 | 50 |
|
39 | 51 | # Initializes the CodeQL tools for scanning. |
40 | 52 | - name: Initialize CodeQL |
41 | | - uses: github/codeql-action/init@v3 |
| 53 | + uses: github/codeql-action/init@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8 |
42 | 54 | with: |
43 | 55 | languages: ${{ matrix.language }} |
44 | 56 | # If you wish to specify custom queries, you can do so here or in a config file. |
|
49 | 61 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). |
50 | 62 | # If this step fails, then you should remove it and run the build manually (see below) |
51 | 63 | - name: Autobuild |
52 | | - uses: github/codeql-action/autobuild@v3 |
| 64 | + uses: github/codeql-action/autobuild@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8 |
53 | 65 |
|
54 | 66 | # ℹ️ Command-line programs to run using the OS shell. |
55 | 67 | # 📚 https://git.io/JvXDl |
|
63 | 75 | # make release |
64 | 76 |
|
65 | 77 | - name: Perform CodeQL Analysis |
66 | | - uses: github/codeql-action/analyze@v3 |
| 78 | + uses: github/codeql-action/analyze@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8 |
0 commit comments