|
| 1 | +name: "CodeQL" |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ "main", "dev" ] |
| 6 | + pull_request: |
| 7 | + branches: [ "main", "dev" ] |
| 8 | + schedule: |
| 9 | + - cron: '28 5 * * 4' |
| 10 | + |
| 11 | +jobs: |
| 12 | + analyze: |
| 13 | + name: Analyze |
| 14 | + # Runner size impacts CodeQL analysis time. To learn more, please see: |
| 15 | + # - https://gh.io/recommended-hardware-resources-for-running-codeql |
| 16 | + # - https://gh.io/supported-runners-and-hardware-resources |
| 17 | + # - https://gh.io/using-larger-runners |
| 18 | + # Consider using larger runners for possible analysis time improvements. |
| 19 | + runs-on: 'ubuntu-latest' |
| 20 | + timeout-minutes: 360 |
| 21 | + permissions: |
| 22 | + # required for all workflows |
| 23 | + security-events: write |
| 24 | + |
| 25 | + # only required for workflows in private repositories |
| 26 | + actions: read |
| 27 | + contents: read |
| 28 | + |
| 29 | + strategy: |
| 30 | + fail-fast: false |
| 31 | + matrix: |
| 32 | + language: [ 'c-cpp', 'go' ] |
| 33 | + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support |
| 34 | + |
| 35 | + steps: |
| 36 | + - name: Checkout repository |
| 37 | + uses: actions/checkout@v4 |
| 38 | + |
| 39 | + # Initializes the CodeQL tools for scanning. |
| 40 | + - name: Initialize CodeQL |
| 41 | + uses: github/codeql-action/init@v3 |
| 42 | + with: |
| 43 | + languages: ${{ matrix.language }} |
| 44 | + # If you wish to specify custom queries, you can do so here or in a config file. |
| 45 | + # By default, queries listed here will override any specified in a config file. |
| 46 | + # Prefix the list here with "+" to use these queries and those in the config file. |
| 47 | + |
| 48 | + # For more 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 |
| 49 | + # queries: security-extended,security-and-quality |
| 50 | + |
| 51 | + |
| 52 | + # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). |
| 53 | + # If this step fails, then you should remove it and run the build manually (see below) |
| 54 | + - name: Autobuild |
| 55 | + uses: github/codeql-action/autobuild@v3 |
| 56 | + |
| 57 | + # ℹ️ Command-line programs to run using the OS shell. |
| 58 | + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun |
| 59 | + |
| 60 | + # If the Autobuild fails above, remove it and uncomment the following three lines. |
| 61 | + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. |
| 62 | + |
| 63 | + # - run: | |
| 64 | + # echo "Run, Build Application using script" |
| 65 | + # ./location_of_script_within_repo/buildscript.sh |
| 66 | + |
| 67 | + - name: Perform CodeQL Analysis |
| 68 | + uses: github/codeql-action/analyze@v3 |
| 69 | + with: |
| 70 | + category: "/language:${{matrix.language}}" |
0 commit comments