OpenSSF Scorecard #290
This file contains 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: OpenSSF Scorecard | |
on: | |
branch_protection_rule: | |
schedule: | |
- cron: '0 5 * * 0' | |
push: | |
branches: [main] | |
workflow_dispatch: | |
# Declare default permissions as read only. | |
permissions: read-all | |
jobs: | |
analysis: | |
name: Scorecards analysis | |
runs-on: ubuntu-latest | |
permissions: | |
# Needed to upload the results to code-scanning dashboard. | |
security-events: write | |
actions: read | |
contents: read | |
steps: | |
- name: 'Checkout code' | |
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v2.4.0 | |
with: | |
persist-credentials: false | |
- name: 'Run analysis' | |
uses: ossf/scorecard-action@f10ec7151e838890a3fbfa27875a33f80869977b # v1.0.2 | |
with: | |
results_file: results.sarif | |
results_format: sarif | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_results: true | |
# Upload the results as artifacts. | |
- name: 'Upload artifact' | |
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v2.3.1 | |
with: | |
name: SARIF file | |
path: results.sarif | |
retention-days: 5 | |
# Upload the results to GitHub's code scanning dashboard. | |
- name: 'Upload to code-scanning' | |
uses: github/codeql-action/upload-sarif@f0705a6d6f9c8ebf64b5188fdd89bc4cd20313bc # v1.0.26 | |
with: | |
sarif_file: results.sarif |