|
1 | | -name: "Code scanning - action" |
| 1 | +name: "CodeQL" |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
5 | | - branches-ignore: |
6 | | - - pr/* |
7 | | - - scratch/* |
| 5 | + branches: [ "develop" ] |
8 | 6 | pull_request: |
| 7 | + # The branches below must be a subset of the branches above |
| 8 | + branches: [ "develop" ] |
9 | 9 | schedule: |
10 | | - - cron: '0 9 * * MON' |
| 10 | + - cron: '26 5 * * 4' |
11 | 11 |
|
12 | 12 | jobs: |
13 | | - CodeQL-Build: |
14 | | - |
| 13 | + analyze: |
| 14 | + name: Analyze |
15 | 15 | runs-on: ubuntu-latest |
| 16 | + permissions: |
| 17 | + actions: read |
| 18 | + contents: read |
| 19 | + security-events: write |
| 20 | + |
| 21 | + strategy: |
| 22 | + fail-fast: false |
| 23 | + matrix: |
| 24 | + language: [ 'ruby' ] |
16 | 25 |
|
17 | 26 | steps: |
18 | 27 | - name: Checkout repository |
19 | 28 | uses: actions/checkout@v3 |
20 | | - with: |
21 | | - # We must fetch at least the immediate parents so that if this is |
22 | | - # a pull request then we can checkout the head. |
23 | | - fetch-depth: 2 |
24 | | - |
25 | | - # If this run was triggered by a pull request event, then checkout |
26 | | - # the head of the pull request instead of the merge commit. |
27 | | - - run: git checkout HEAD^2 |
28 | | - if: ${{ github.event_name == 'pull_request' }} |
29 | | - |
| 29 | + |
30 | 30 | # Initializes the CodeQL tools for scanning. |
31 | 31 | - name: Initialize CodeQL |
32 | 32 | uses: github/codeql-action/init@v2 |
33 | | - # Override language selection by uncommenting this and choosing your languages |
34 | | - # with: |
35 | | - languages: ruby |
| 33 | + with: |
| 34 | + languages: ${{ matrix.language }} |
| 35 | + # If you wish to specify custom queries, you can do so here or in a config file. |
| 36 | + # By default, queries listed here will override any specified in a config file. |
| 37 | + # Prefix the list here with "+" to use these queries and those in the config file. |
| 38 | + |
| 39 | + # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs |
| 40 | + # queries: security-extended,security-and-quality |
36 | 41 |
|
37 | | - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). |
| 42 | + |
| 43 | + # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). |
38 | 44 | # If this step fails, then you should remove it and run the build manually (see below) |
39 | 45 | - name: Autobuild |
40 | 46 | uses: github/codeql-action/autobuild@v2 |
41 | 47 |
|
42 | 48 | # ℹ️ Command-line programs to run using the OS shell. |
43 | | - # 📚 https://git.io/JvXDl |
| 49 | + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun |
44 | 50 |
|
45 | | - # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines |
46 | | - # and modify them (or add more) to build your code if your project |
47 | | - # uses a compiled language |
| 51 | + # If the Autobuild fails above, remove it and uncomment the following three lines. |
| 52 | + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. |
48 | 53 |
|
49 | | - #- run: | |
50 | | - # make bootstrap |
51 | | - # make release |
| 54 | + # - run: | |
| 55 | + # echo "Run, Build Application using script" |
| 56 | + # ./location_of_script_within_repo/buildscript.sh |
52 | 57 |
|
53 | 58 | - name: Perform CodeQL Analysis |
54 | 59 | uses: github/codeql-action/analyze@v2 |
| 60 | + with: |
| 61 | + category: "/language:${{matrix.language}}" |
0 commit comments