| # This workflow uses actions that are not certified by GitHub. | |
| # They are provided by a third-party and are governed by | |
| # separate terms of service, privacy policy, and support | |
| # documentation. | |
| name: flawfinder | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: [ "develop" ] | |
| pull_request: | |
| # The branches below must be a subset of the branches above | |
| branches: [ "develop" ] | |
| schedule: | |
| - cron: '41 14 * * 3' | |
| jobs: | |
| flawfinder: | |
| name: Flawfinder | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: read | |
| contents: read | |
| security-events: write | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@ccd8616d44fd3846e67624a50d5aad6d37bf2d25 # v2.22.1 | |
| with: | |
| egress-policy: audit | |
| - name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: flawfinder_scan | |
| uses: david-a-wheeler/flawfinder@c4216b74cf2639ffa98503768bd6e4299b5440c9 # v2.0.20 | |
| with: | |
| # single_include/ is omitted: it is generated from include/ and would report every finding twice | |
| arguments: '--sarif ./cmake ./docs ./include ./src ./tests ./tools' | |
| output: 'flawfinder_results.sarif' | |
| - name: Upload analysis results to GitHub Security tab | |
| uses: github/codeql-action/upload-sarif@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0 | |
| with: | |
| sarif_file: ${{github.workspace}}/flawfinder_results.sarif |