|
6 | 6 | - cron: "0 19 * * 1-5"
|
7 | 7 | push:
|
8 | 8 | branches:
|
| 9 | + - develop |
9 | 10 | - releases/*
|
10 | 11 | workflow_dispatch: # run on request (no need for PR)
|
| 12 | + workflow_call: # run by other workflow |
11 | 13 |
|
12 | 14 | # Declare default permissions as read only.
|
13 | 15 | permissions: read-all
|
|
67 | 69 | path: bandit-scan-results.txt
|
68 | 70 | # Use always() to always run this step to publish scan results when there are test failures
|
69 | 71 | if: ${{ always() }}
|
| 72 | + |
| 73 | + CodeQL-Scan: |
| 74 | + runs-on: ubuntu-22.04 |
| 75 | + timeout-minutes: 60 |
| 76 | + permissions: |
| 77 | + # required for all workflows |
| 78 | + security-events: write |
| 79 | + |
| 80 | + # only required for workflows in private repositories |
| 81 | + actions: read |
| 82 | + contents: read |
| 83 | + |
| 84 | + strategy: |
| 85 | + fail-fast: false |
| 86 | + matrix: |
| 87 | + language: ["python"] |
| 88 | + # CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ] |
| 89 | + # Use only 'java-kotlin' to analyze code written in Java, Kotlin or both |
| 90 | + # Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both |
| 91 | + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support |
| 92 | + |
| 93 | + steps: |
| 94 | + - name: Checkout repository |
| 95 | + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
| 96 | + |
| 97 | + # Initializes the CodeQL tools for scanning. |
| 98 | + - name: Initialize CodeQL |
| 99 | + uses: github/codeql-action/init@47b3d888fe66b639e431abf22ebca059152f1eea # v3.24.5 |
| 100 | + with: |
| 101 | + languages: ${{ matrix.language }} |
| 102 | + # If you wish to specify custom queries, you can do so here or in a config file. |
| 103 | + # By default, queries listed here will override any specified in a config file. |
| 104 | + # Prefix the list here with "+" to use these queries and those in the config file. |
| 105 | + |
| 106 | + # 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 |
| 107 | + # queries: security-extended,security-and-quality |
| 108 | + |
| 109 | + - name: Perform CodeQL Analysis |
| 110 | + uses: github/codeql-action/analyze@47b3d888fe66b639e431abf22ebca059152f1eea # v3.24.5 |
| 111 | + with: |
| 112 | + category: "/language:${{matrix.language}}" |
| 113 | + - name: Generate Security Report |
| 114 | + uses: rsdmike/github-security-report-action@a149b24539044c92786ec39af8ba38c93496495d # v3.0.4 |
| 115 | + with: |
| 116 | + template: report |
| 117 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 118 | + - name: Upload CodeQL Artifacts |
| 119 | + uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2 |
| 120 | + with: |
| 121 | + name: codeql-scan-results |
| 122 | + path: "./report.pdf" |
0 commit comments