|
| 1 | +# CodeQL |
| 2 | +# |
| 3 | +# version 1.0.0 |
| 4 | +# |
| 5 | +# see : https://universe.fugerit.org/src/docs/conventions/workflows/codeql-analysis.html |
| 6 | + |
| 7 | +# For most projects, this workflow file will not need changing; you simply need |
| 8 | +# to commit it to your repository. |
| 9 | +# |
| 10 | +# You may wish to alter this file to override the set of languages analyzed, |
| 11 | +# or to provide custom queries or build logic. |
| 12 | + |
| 13 | +name: "CodeQL" |
| 14 | + |
| 15 | +on: |
| 16 | + push: |
| 17 | + branches: [ "main" ] |
| 18 | + pull_request: |
| 19 | + # The branches below must be a subset of the branches above |
| 20 | + branches: [ "main" ] |
| 21 | + schedule: |
| 22 | + - cron: '29 3 * * 4' |
| 23 | + |
| 24 | +jobs: |
| 25 | + analyze: |
| 26 | + name: Analyze |
| 27 | + runs-on: ubuntu-latest |
| 28 | + permissions: |
| 29 | + actions: read |
| 30 | + contents: read |
| 31 | + security-events: write |
| 32 | + |
| 33 | + strategy: |
| 34 | + fail-fast: false |
| 35 | + matrix: |
| 36 | + language: [ 'java', 'javascript' ] |
| 37 | + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] |
| 38 | + # Use only 'java' to analyze code written in Java, Kotlin or both |
| 39 | + # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both |
| 40 | + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support |
| 41 | + |
| 42 | + steps: |
| 43 | + - name: Checkout repository |
| 44 | + uses: actions/checkout@main |
| 45 | + |
| 46 | + - name: Set up JDK 17 |
| 47 | + uses: actions/setup-java@main |
| 48 | + with: |
| 49 | + java-version: '17' |
| 50 | + distribution: 'corretto' |
| 51 | + cache: 'maven' |
| 52 | + |
| 53 | + # Initializes the CodeQL tools for scanning. |
| 54 | + - name: Initialize CodeQL |
| 55 | + uses: github/codeql-action/init@main |
| 56 | + with: |
| 57 | + languages: ${{ matrix.language }} |
| 58 | + # If you wish to specify custom queries, you can do so here or in a config file. |
| 59 | + # By default, queries listed here will override any specified in a config file. |
| 60 | + # Prefix the list here with "+" to use these queries and those in the config file. |
| 61 | + |
| 62 | + # 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 |
| 63 | + # queries: security-extended,security-and-quality |
| 64 | + |
| 65 | + |
| 66 | + # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). |
| 67 | + # If this step fails, then you should remove it and run the build manually (see below) |
| 68 | + - name: Autobuild |
| 69 | + uses: github/codeql-action/autobuild@main |
| 70 | + |
| 71 | + # ℹ️ Command-line programs to run using the OS shell. |
| 72 | + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun |
| 73 | + |
| 74 | + # If the Autobuild fails above, remove it and uncomment the following three lines. |
| 75 | + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. |
| 76 | + |
| 77 | + # - run: | |
| 78 | + # echo "Run, Build Application using script" |
| 79 | + # ./location_of_script_within_repo/buildscript.sh |
| 80 | + |
| 81 | + - name: Perform CodeQL Analysis |
| 82 | + uses: github/codeql-action/analyze@main |
| 83 | + with: |
| 84 | + category: "/language:${{matrix.language}}" |
0 commit comments