Scorecard #20
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: Scorecard | |
| on: | |
| branch_protection_rule: | |
| schedule: | |
| - cron: '0 6 * * 1' | |
| push: | |
| branches: [main, develop] | |
| permissions: | |
| contents: read | |
| jobs: | |
| analysis: | |
| name: Scorecard analysis | |
| runs-on: ubuntu-latest | |
| permissions: | |
| security-events: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 | |
| with: | |
| persist-credentials: false | |
| - name: Run Scorecard | |
| uses: ossf/scorecard-action@ff5dd8929f96a8a4dc67d13f32b8c75057829621 | |
| with: | |
| results_file: results.sarif | |
| results_format: sarif | |
| publish_results: false | |
| - name: Filter out CII-Best-Practices from SARIF | |
| run: | | |
| if ! command -v jq >/dev/null; then | |
| sudo apt-get update && sudo apt-get install -y jq | |
| fi | |
| # Remove results whose ruleId is CII-Best-Practices | |
| jq '(.runs[] .results) |= [ .[] | select(.ruleId != "CII-Best-Practices") ]' results.sarif > filtered.sarif || true | |
| mv filtered.sarif results.sarif | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 | |
| with: | |
| name: SARIF file | |
| path: results.sarif | |
| retention-days: 5 | |
| - name: Upload to code-scanning | |
| uses: github/codeql-action/upload-sarif@3b1a19a80ab047f35cbb237b5bd9bdc1e14f166c | |
| with: | |
| sarif_file: results.sarif | |