CodeQL SAST #187
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
| # .github/workflows/codeql.yml | |
| name: "CodeQL SAST" | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| schedule: | |
| - cron: "30 5 * * 3" # Wednesday 05:30 UTC | |
| permissions: {} | |
| jobs: | |
| analyze: | |
| name: "CodeQL Analysis" | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| security-events: write # required to upload SARIF | |
| actions: read # needed for private repos | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| language: [actions] # scan GH Actions definitions for injection vulns | |
| # NOTE: CodeQL does not have a native Rust extractor. | |
| # For Rust SAST, we rely on clippy + cargo-deny + cargo-audit. | |
| # 'actions' catches injection vulns in workflow YAML files. | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0 | |
| with: | |
| languages: ${{ matrix.language }} | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0 | |
| with: | |
| category: "/language:${{ matrix.language }}" |