|
| 1 | +name: "CodeQL" |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ "main" ] |
| 6 | + pull_request: |
| 7 | + branches: [ "main" ] |
| 8 | + |
| 9 | +jobs: |
| 10 | + analyze: |
| 11 | + name: Analyze (${{ matrix.language }}) |
| 12 | + # Runner size impacts CodeQL analysis time. To learn more, please see: |
| 13 | + # - https://gh.io/recommended-hardware-resources-for-running-codeql |
| 14 | + # - https://gh.io/supported-runners-and-hardware-resources |
| 15 | + # - https://gh.io/using-larger-runners (GitHub.com only) |
| 16 | + # Consider using larger runners or machines with greater resources for possible analysis time improvements. |
| 17 | + runs-on: 'ubuntu-latest' |
| 18 | + timeout-minutes: 360 |
| 19 | + permissions: |
| 20 | + # required for all workflows |
| 21 | + security-events: write |
| 22 | + |
| 23 | + # required to fetch internal or private CodeQL packs |
| 24 | + packages: read |
| 25 | + |
| 26 | + # only required for workflows in private repositories |
| 27 | + actions: read |
| 28 | + contents: read |
| 29 | + |
| 30 | + strategy: |
| 31 | + fail-fast: false |
| 32 | + matrix: |
| 33 | + include: |
| 34 | + - language: javascript-typescript |
| 35 | + build-mode: none |
| 36 | + # CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' |
| 37 | + # Use `c-cpp` to analyze code written in C, C++ or both |
| 38 | + # Use 'java-kotlin' to analyze code written in Java, Kotlin or both |
| 39 | + # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both |
| 40 | + # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, |
| 41 | + # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. |
| 42 | + # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how |
| 43 | + # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages |
| 44 | + steps: |
| 45 | + - name: Checkout repository |
| 46 | + uses: actions/checkout@v4 |
| 47 | + |
| 48 | + # Initializes the CodeQL tools for scanning. |
| 49 | + - name: Initialize CodeQL |
| 50 | + uses: github/codeql-action/init@v3 |
| 51 | + with: |
| 52 | + languages: ${{ matrix.language }} |
| 53 | + build-mode: ${{ matrix.build-mode }} |
| 54 | + # If you wish to specify custom queries, you can do so here or in a config file. |
| 55 | + # By default, queries listed here will override any specified in a config file. |
| 56 | + # Prefix the list here with "+" to use these queries and those in the config file. |
| 57 | + |
| 58 | + # 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 |
| 59 | + # queries: security-extended,security-and-quality |
| 60 | + source-root: "./src" |
| 61 | + |
| 62 | + - name: Perform CodeQL Analysis |
| 63 | + uses: github/codeql-action/analyze@v3 |
| 64 | + with: |
| 65 | + category: "/language:${{matrix.language}}" |
0 commit comments