analysis #942
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: analysis | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: [ "master" ] | |
schedule: | |
- cron: '36 22 * * 2' | |
jobs: | |
codeql: | |
name: CodeQL | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@4f3212b61783c3c68e8309a0f18a699764811cda # v3 | |
with: | |
languages: 'python' | |
config-file: ./.github/codeql/codeql-config.yml | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@4f3212b61783c3c68e8309a0f18a699764811cda # v3 | |
bandit: | |
name: Bandit | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- run: pip install -r requirements_analysis.txt | |
- name: Run Bandit | |
run: bandit -r ./cxroots -x ./cxroots/tests | |
- name: Run Bandit with SARIF output | |
if: always() | |
run: bandit -r ./cxroots -x ./cxroots/tests --format sarif --output out.sarif | |
- name: Upload SARIF file | |
if: always() | |
uses: github/codeql-action/upload-sarif@4f3212b61783c3c68e8309a0f18a699764811cda # v3 | |
with: | |
sarif_file: out.sarif | |
category: Bandit |