|
| 1 | +# For most projects, this workflow file will not need changing; you simply need |
| 2 | +# to commit it to your repository. |
| 3 | +# |
| 4 | +# You may wish to alter this file to override the set of languages analyzed, |
| 5 | +# or to provide custom queries or build logic. |
| 6 | +# |
| 7 | +# ******** NOTE ******** |
| 8 | +# We have attempted to detect the languages in your repository. Please check |
| 9 | +# the `language` matrix defined below to confirm you have the correct set of |
| 10 | +# supported CodeQL languages. |
| 11 | +# |
| 12 | +name: "CodeQL" |
| 13 | + |
| 14 | +on: |
| 15 | + push: |
| 16 | + branches: [ "master", "*" ] |
| 17 | + pull_request: |
| 18 | + branches: [ "master", "*" ] |
| 19 | + schedule: |
| 20 | + - cron: '35 23 * * 5' |
| 21 | + workflow_call: |
| 22 | + inputs: |
| 23 | + ref: |
| 24 | + required: true |
| 25 | + type: string |
| 26 | + |
| 27 | +jobs: |
| 28 | + analyze: |
| 29 | + name: Analyze ${{ matrix.language }} |
| 30 | + runs-on: ubuntu-latest |
| 31 | + timeout-minutes: 360 |
| 32 | + permissions: |
| 33 | + # required for all workflows |
| 34 | + security-events: write |
| 35 | + # required to fetch internal or private CodeQL packs |
| 36 | + packages: read |
| 37 | + actions: read |
| 38 | + contents: read |
| 39 | + strategy: |
| 40 | + fail-fast: false |
| 41 | + matrix: |
| 42 | + include: |
| 43 | + - language: python |
| 44 | + - language: actions |
| 45 | + |
| 46 | + steps: |
| 47 | + - name: Checkout repository |
| 48 | + uses: actions/checkout@v4 |
| 49 | + with: |
| 50 | + ref: ${{ inputs.ref }} |
| 51 | + persist-credentials: false |
| 52 | + - name: Set up Python |
| 53 | + uses: actions/setup-python@v4 |
| 54 | + with: |
| 55 | + python-version: 3.x |
| 56 | + |
| 57 | + # Initializes the CodeQL tools for scanning. |
| 58 | + - name: Initialize CodeQL |
| 59 | + uses: github/codeql-action/init@28deaeda66b76a05916b6923827895f2b14ab387 # v3 |
| 60 | + with: |
| 61 | + languages: ${{ matrix.language }} |
| 62 | + build-mode: none |
| 63 | + # 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 |
| 64 | + queries: security-extended |
| 65 | + config: | |
| 66 | + paths-ignore: |
| 67 | + - 'test/**' |
| 68 | +
|
| 69 | + - shell: bash |
| 70 | + if: matrix.language == 'python' |
| 71 | + run: | |
| 72 | + pip install -e . |
| 73 | +
|
| 74 | + - name: Perform CodeQL Analysis |
| 75 | + uses: github/codeql-action/analyze@28deaeda66b76a05916b6923827895f2b14ab387 # v3 |
| 76 | + with: |
| 77 | + category: "/language:${{ matrix.language }}" |
0 commit comments