Eliminate MPI dependency, migrate to Expander v0.3.1 / ECC v0.3.1 #334
This file contains hidden or 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: Security Audit | |
| on: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - "**/Cargo.toml" | |
| - "**/Cargo.lock" | |
| - "pyproject.toml" | |
| - "uv.lock" | |
| pull_request: | |
| branches: ["main"] | |
| paths: | |
| - "**/Cargo.toml" | |
| - "**/Cargo.lock" | |
| - "pyproject.toml" | |
| - "uv.lock" | |
| jobs: | |
| rust-audit: | |
| name: Rust Security Audit | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 | |
| with: | |
| toolchain: stable | |
| - name: Install and run cargo-audit | |
| run: | | |
| cargo install cargo-audit --locked | |
| cargo audit | |
| python-audit: | |
| name: Python Security Audit | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install UV | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Install security tools | |
| run: uv pip install --system pip-audit bandit | |
| - name: Export locked dependencies | |
| run: uv export --format requirements.txt --no-emit-project --output-file requirements.lock.txt | |
| - name: Run pip-audit | |
| run: pip-audit --requirement requirements.lock.txt | |
| - name: Run bandit | |
| id: bandit | |
| run: | | |
| set +e | |
| bandit -r ./python --severity-level high -f json -o bandit-report.json | |
| BANDIT_EXIT_CODE=$? | |
| echo "exit_code=$BANDIT_EXIT_CODE" >> $GITHUB_OUTPUT | |
| echo "::group::Bandit Security Report" | |
| bandit -r ./python --severity-level high -f txt | |
| echo "::endgroup::" | |
| exit 0 | |
| - name: Upload security report | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: security-reports | |
| path: bandit-report.json | |
| - name: Check bandit results | |
| if: steps.bandit.outputs.exit_code != '0' | |
| run: | | |
| echo "Bandit found security issues. Please review the report." | |
| exit 1 |