OSSF Scorecard #54
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: OSSF Scorecard | |
| on: | |
| branch_protection_rule: | |
| push: | |
| branches: [main] | |
| schedule: | |
| # Weekly, Monday 04:00 UTC. | |
| - cron: "0 4 * * 1" | |
| workflow_dispatch: | |
| concurrency: | |
| group: scorecard-${{ github.ref }} | |
| cancel-in-progress: true | |
| # Per https://github.com/ossf/scorecard-action#workflow-restrictions | |
| permissions: read-all | |
| jobs: | |
| analysis: | |
| name: Scorecard analysis | |
| runs-on: ubuntu-latest | |
| permissions: | |
| security-events: write # upload SARIF to code-scanning | |
| id-token: write # publish results to the OpenSSF REST API | |
| contents: read | |
| actions: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Run OSSF Scorecard | |
| uses: ossf/scorecard-action@v2.4.0 | |
| with: | |
| results_file: results.sarif | |
| results_format: sarif | |
| # Publish so the scorecard.dev badge works. | |
| publish_results: true | |
| # Uncomment if a fine-grained PAT with `repo_deployment` is configured for non-public repos. | |
| # repo_token: ${{ secrets.SCORECARD_TOKEN }} | |
| - name: Upload Scorecard artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: scorecard-results | |
| path: results.sarif | |
| retention-days: 30 | |
| - name: Upload SARIF to code-scanning | |
| uses: github/codeql-action/upload-sarif@v3 | |
| with: | |
| sarif_file: results.sarif | |
| category: ossf-scorecard |